sel-sched-ir.c (init_global_and_expr_for_insn): Forbid copying of recognized by canno...
authorDmitry Melnik <dm@ispras.ru>
Thu, 11 Aug 2011 11:41:27 +0000 (11:41 +0000)
committerAlexander Monakov <amonakov@gcc.gnu.org>
Thu, 11 Aug 2011 11:41:27 +0000 (15:41 +0400)
2011-08-11  Dmitry Melnik  <dm@ispras.ru>

* sel-sched-ir.c (init_global_and_expr_for_insn): Forbid copying of
recognized by cannot_copy_insn_p hook and volatile instructions.

From-SVN: r177652

gcc/ChangeLog
gcc/sel-sched-ir.c

index a2e42c7711bdce5e5ec9f90c8b84cc4a9d3c1a7a..560007065b56dfd32d9e23ad3fc67740715ec30f 100644 (file)
@@ -1,3 +1,8 @@
+2011-08-11  Dmitry Melnik  <dm@ispras.ru>
+
+       * sel-sched-ir.c (init_global_and_expr_for_insn): Forbid copying of
+       recognized by cannot_copy_insn_p hook and volatile instructions.
+
 2011-08-11  Dmitry Melnik  <dm@ispras.ru>
 
        * sel-sched-ir.c (merge_expr_data): Take maximum spec.
index 599714b44e4c4d5fc2ddc87206983021e6841250..1e6e55e663217220e1af8a6e4964aa4af424fda3 100644 (file)
@@ -2956,7 +2956,10 @@ init_global_and_expr_for_insn (insn_t insn)
           /* Exception handling insns are always unique.  */
           || (cfun->can_throw_non_call_exceptions && can_throw_internal (insn))
           /* TRAP_IF though have an INSN code is control_flow_insn_p ().  */
-          || control_flow_insn_p (insn))
+          || control_flow_insn_p (insn)
+          || volatile_insn_p (PATTERN (insn))
+          || (targetm.cannot_copy_insn_p
+              && targetm.cannot_copy_insn_p (insn)))
         force_unique_p = true;
       else
         force_unique_p = false;