summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/c-common.c3
-rw-r--r--gcc/c-objc-common.c2
-rw-r--r--gcc/cp/tree.c2
-rw-r--r--gcc/flags.h5
-rw-r--r--gcc/langhooks.c2
-rw-r--r--gcc/toplev.c5
7 files changed, 33 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 77b121f25f3..67d1cd59924 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/c-common.c b/gcc/c-common.c
index cae7ca8240d..228f41b10fe 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -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
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c
index 7e6ecad2671..6c0aef673f7 100644
--- a/gcc/c-objc-common.c
+++ b/gcc/c-objc-common.c
@@ -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;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c547209d943..4f1b168d7ca 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -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;
diff --git a/gcc/flags.h b/gcc/flags.h
index c87575b7d2c..a3e4a043bf5 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -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;
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 4416ba937a5..4c4d7d6f120 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -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;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 0f70fe13dec..121d3f782bb 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -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. */
OpenPOWER on IntegriCloud