diff options
author | Diego Novillo <dnovillo@redhat.com> | 2004-07-30 00:16:17 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2004-07-29 20:16:17 -0400 |
commit | 4fa204dac6966690c6d2490a6e1d11416e90c040 (patch) | |
tree | 08a719996377675a32d8694feb5cf80ef3a927e9 /gcc | |
parent | aac864b08d063598a11eda07018a3f7377e3ec5e (diff) | |
download | gcc-4fa204dac6966690c6d2490a6e1d11416e90c040.zip gcc-4fa204dac6966690c6d2490a6e1d11416e90c040.tar.gz gcc-4fa204dac6966690c6d2490a6e1d11416e90c040.tar.bz2 |
tree-ssa-ccp.c (visit_assignment): Move code to prevent setting a non-register to UNDEFINED right before the call...
* tree-ssa-ccp.c (visit_assignment): Move code to prevent
setting a non-register to UNDEFINED right before the call to
set_lattice_value.
From-SVN: r85318
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-ccp.c | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 259ddec..ae11799 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-07-29 Diego Novillo <dnovillo@redhat.com> + + * tree-ssa-ccp.c (visit_assignment): Move code to prevent + setting a non-register to UNDEFINED right before the call to + set_lattice_value. + 2004-07-29 Kaz Kojima <kkojima@gcc.gnu.org> * config/sh/lib1funcs.asm: Make aliases movstr* for movmem*. diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 82479f0..c8ab92a 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -755,12 +755,6 @@ visit_assignment (tree stmt) /* For a simple copy operation, we copy the lattice values. */ value *nval = get_value (rhs); val = *nval; - - /* If lhs is not a gimple register, then it cannot take on - an undefined value. */ - if (!is_gimple_reg (SSA_NAME_VAR (lhs)) - && val.lattice_val == UNDEFINED) - val.lattice_val = UNKNOWN_VAL; } else if (DECL_P (rhs) && NUM_VUSES (vuses) == 1 @@ -798,6 +792,12 @@ visit_assignment (tree stmt) } } + /* If LHS is not a gimple register, then it cannot take on an + UNDEFINED value. */ + if (!is_gimple_reg (SSA_NAME_VAR (lhs)) + && val.lattice_val == UNDEFINED) + val.lattice_val = UNKNOWN_VAL; + /* Set the lattice value of the statement's output. */ set_lattice_value (lhs, val); if (val.lattice_val == VARYING) |