aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-12 01:10:15 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2003-12-12 01:10:15 +0000
commitdedd274a2cb100c13b3b68b9322efe698f4d5d8f (patch)
treeb721ea218be63ba893cb946138fa0d5a26f0cbd8 /gcc/tree-inline.c
parent0dd57dfb2e256e4f77e22400684bce806fd5f8f6 (diff)
* tree-inline.c (initialize_inlined_parameters): Disable
constant propagation for non-gimple-min-invariant when preserving gimple form. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/tree-ssa-20020619-branch@74556 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 6a9fdb74754..93a0450bfbc 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -738,7 +738,14 @@ DECL_ARGUMENTS (fn);
Theoretically, we could check the expression to see if
all of the variables that determine its value are
read-only, but we don't bother. */
- if (TREE_CONSTANT (value) || TREE_READONLY_DECL_P (value))
+ if ((TREE_CONSTANT (value) || TREE_READONLY_DECL_P (value))
+ /* We may produce non-gimple trees by adding NOPs or introduce
+ invalid sharing when operand is not really constant.
+ It is not big deal to prohibit constant propagation here as
+ we will constant propagate in DOM1 pass anyway. */
+ && (!lang_hooks.gimple_before_inlining
+ || (is_gimple_min_invariant (value)
+ && TREE_TYPE (value) == TREE_TYPE (p))))
{
/* If this is a declaration, wrap it a NOP_EXPR so that
we don't try to put the VALUE on the list of