sched-rgn.c (CONST_BASED_ADDRESS_P): CONST_INT -> CONSTANT_P.
authorDaniel Berlin <dan@cgsoftware.com>
Tue, 11 Dec 2001 22:50:35 +0000 (22:50 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Tue, 11 Dec 2001 22:50:35 +0000 (22:50 +0000)
2001-12-11  Daniel Berlin  <dan@cgsoftware.com>

* sched-rgn.c (CONST_BASED_ADDRESS_P): CONST_INT -> CONSTANT_P.
(may_trap_exp): Stores only are risk if they trap, too, not just
if code == MEM.

From-SVN: r47900

gcc/ChangeLog
gcc/sched-rgn.c

index 22edc49e5ffb78f5fb3f3dcf0d60fc4a614e9890..acd76f34710820d3c64b0099c5a10e2ff08fc8ec 100644 (file)
@@ -1,3 +1,9 @@
+2001-12-11  Daniel Berlin  <dan@cgsoftware.com>
+
+       * sched-rgn.c (CONST_BASED_ADDRESS_P): CONST_INT -> CONSTANT_P.
+       (may_trap_exp): Stores only are risk if they trap, too, not just
+       if code == MEM.
+
 2001-12-11  Aldy Hernandez  <aldyh@redhat.com>
 
         * flow.c (find_regno_partial): Indent properly.  Add a default to
index cc3fc9ae05e1d9dbffd8a43675e9937203206518..ab5adee81592224e0b6ca0ecfd6028aae0842df1 100644 (file)
@@ -1566,8 +1566,8 @@ enum INSN_TRAP_CLASS
   (GET_CODE (x) == REG                                 \
    || ((GET_CODE (x) == PLUS || GET_CODE (x) == MINUS   \
        || (GET_CODE (x) == LO_SUM))                    \
-       && (GET_CODE (XEXP (x, 0)) == CONST_INT         \
-          || GET_CODE (XEXP (x, 1)) == CONST_INT)))
+       && (CONSTANT_P (XEXP (x, 0))            \
+          || CONSTANT_P (XEXP (x, 1)))))
 
 /* Turns on the fed_by_spec_load flag for insns fed by load_insn.  */
 
@@ -1738,7 +1738,7 @@ may_trap_exp (x, is_store)
   code = GET_CODE (x);
   if (is_store)
     {
-      if (code == MEM)
+      if (code == MEM && may_trap_p (x))
        return TRAP_RISKY;
       else
        return TRAP_FREE;