langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check flag_really_no_inline...
authorAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 21 Mar 2002 23:15:38 +0000 (23:15 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Thu, 21 Mar 2002 23:15:38 +0000 (23:15 +0000)
2002-03-21  Aldy Hernandez  <aldyh@redhat.com>

        * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check
        flag_really_no_inline instead of optimize == 0.

        * c-objc-common.c (c_cannot_inline_tree_fn): Same.

        * cp/tree.c (cp_cannot_inline_tree_fn): Same.

        * flags.h (flag_really_no_inline): New.

        * c-common.c (c_common_post_options): Initialzie
        flag_really_no_inline.

        * toplev.c (flag_really_no_inline): New.

From-SVN: r51146

gcc/ChangeLog
gcc/c-common.c
gcc/c-objc-common.c
gcc/cp/tree.c
gcc/flags.h
gcc/langhooks.c
gcc/toplev.c

index 77b121f25f312c0bd41c1ecdb42fa481690cdfde..67d1cd5992458439585ff5898fc22584f63caaac 100644 (file)
@@ -1,3 +1,19 @@
+2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
+
+        * langhooks.c (lhd_tree_inlining_cannot_inline_tree_fn): Check
+        flag_really_no_inline instead of optimize == 0.
+
+        * c-objc-common.c (c_cannot_inline_tree_fn): Same.
+
+        * cp/tree.c (cp_cannot_inline_tree_fn): Same.
+
+        * flags.h (flag_really_no_inline): New.
+
+        * c-common.c (c_common_post_options): Initialzie
+        flag_really_no_inline.
+
+        * toplev.c (flag_really_no_inline): New.
+
 2002-03-21  Jakub Jelinek  <jakub@redhat.com>
 
        * config/avr/avr.md (length): Fix length computation for
@@ -360,6 +376,7 @@ Tue Mar 19 14:12:32 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
        (movqi): Use gen_lowpart in place of gen_rtx_SUBREG.
        Replace gen_rtx (SUBREG) with gen_rtx_SUBREG.
 
+>>>>>>> 1.13452
 2002-03-18  Aldy Hernandez  <aldyh@redhat.com>
 
        * config/rs6000/rs6000.h (PREDICATE_CODES): Add PARALLEL to
index cae7ca8240d450407ca4a301ee984cacfa339e6c..228f41b10fe9ed0b561ba7e712e36fdfe383b43a 100644 (file)
@@ -4100,6 +4100,9 @@ c_common_post_options ()
 {
   cpp_post_options (parse_in);
 
+  /* Save no-inline information we may clobber below.  */
+  flag_really_no_inline = flag_no_inline;
+
   flag_inline_trees = 1;
 
   /* Use tree inlining if possible.  Function instrumentation is only
index 7e6ecad26715494f242d564281eb54b7fdcefdb4..6c0aef673f70fd5d7bd5617727853f166fcf0b0a 100644 (file)
@@ -146,7 +146,7 @@ c_cannot_inline_tree_fn (fnp)
   tree fn = *fnp;
   tree t;
 
-  if (optimize == 0
+  if (flag_really_no_inline
       && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)
     return 1;
 
index c547209d943621a286e725dc5930f42cce7015f8..4f1b168d7ca2f1d8c57e004df4d9dde7f1a6f66a 100644 (file)
@@ -2131,7 +2131,7 @@ cp_cannot_inline_tree_fn (fnp)
 {
   tree fn = *fnp;
 
-  if (optimize == 0
+  if (flag_really_no_inline
       && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) == NULL)
     return 1;
 
index c87575b7d2c68346037fe8ce8965207d8bccb898..a3e4a043bf542b7553837cbf3c321e354d476504 100644 (file)
@@ -380,6 +380,11 @@ extern int flag_keep_inline_functions;
 
 extern int flag_no_inline;
 
+/* Nonzero means that we don't want inlining by virtue of -fno-inline,
+   not just because the tree inliner turned us off.  */
+
+extern int flag_really_no_inline;
+
 /* Nonzero if we are only using compiler to check syntax errors.  */
 
 extern int flag_syntax_only;
index 4416ba937a5bdc1ba5b989e35202d91a4d839c82..4c4d7d6f1204cb7ad1ce840c03c1b4fc736fda69 100644 (file)
@@ -174,7 +174,7 @@ int
 lhd_tree_inlining_cannot_inline_tree_fn (fnp)
      tree *fnp;
 {
-  if (optimize == 0
+  if (flag_really_no_inline
       && lookup_attribute ("always_inline", DECL_ATTRIBUTES (*fnp)) == NULL)
     return 1;
 
index 0f70fe13dec314c5cdaa2580577bcc59678e1d9e..121d3f782bb7fc9a836460c514a27c6ad23e2810 100644 (file)
@@ -646,6 +646,11 @@ int flag_keep_inline_functions;
 
 int flag_no_inline;
 
+/* Nonzero means that we don't want inlining by virtue of -fno-inline,
+   not just because the tree inliner turned us off.  */
+
+int flag_really_no_inline;
+
 /* Nonzero means that we should emit static const variables
    regardless of whether or not optimization is turned on.  */