OSDN Git Service

Use only nonvarying rtxs as known values
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Mar 2001 17:36:43 +0000 (17:36 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 Mar 2001 17:36:43 +0000 (17:36 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40505 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/alias.c

index bcdc3b9..3ae6198 100644 (file)
@@ -25,6 +25,10 @@ Thu Mar 15 11:24:29 EST 2001  John Wehle  (john@feith.com)
        * cselib.c (hash_rtx): For REG and MEM, just use value of expression
        without adding in rtx code and mode.
 
+       * alias.c (init_alias_analysis): Don't use any rtx whose value
+       varies as a known value.
+       Delete a superfluous test.
+
        * config/ia64/ia64.c (maybe_rotate): New function, broken out of
        ia64_sched_reorder.
        (ia64_sched_reorder): Call maybe_rotate; also rotate after
index 4aca90d..6b20df7 100644 (file)
@@ -2276,6 +2276,7 @@ init_alias_analysis ()
                           && REG_N_SETS (regno) == 1)
                          || (note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != 0)
                      && GET_CODE (XEXP (note, 0)) != EXPR_LIST
+                     && ! rtx_varies_p (XEXP (note, 0), 1)
                      && ! reg_overlap_mentioned_p (SET_DEST (set), XEXP (note, 0)))
                    {
                      reg_known_value[regno] = XEXP (note, 0);
@@ -2289,8 +2290,7 @@ init_alias_analysis ()
                           && GET_CODE (XEXP (src, 1)) == CONST_INT)
                    {
                      rtx op0 = XEXP (src, 0);
-                     if (reg_known_value[REGNO (op0)])
-                       op0 = reg_known_value[REGNO (op0)];
+                     op0 = reg_known_value[REGNO (op0)];
                      reg_known_value[regno]
                        = plus_constant_for_output (op0,
                                                    INTVAL (XEXP (src, 1)));