]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
emit-rtl.c (reset_all_used_flags): New function.
authorAndreas Krebbel <Andreas.Krebbel@de.ibm.com>
Mon, 15 Apr 2013 13:09:50 +0000 (13:09 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Mon, 15 Apr 2013 13:09:50 +0000 (13:09 +0000)
2013-04-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

* emit-rtl.c (reset_all_used_flags): New function.
(verify_rtl_sharing): Call reset_all_used_flags before and after
performing the checks.

From-SVN: r197971

gcc/ChangeLog
gcc/emit-rtl.c

index f6d63f21db71c4806db9b22216f47808c1a19837..fd1731e7e8d202e3444d6ef74211d2ba0c5e2620 100644 (file)
@@ -1,3 +1,9 @@
+2013-04-15  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+       * emit-rtl.c (reset_all_used_flags): New function.
+       (verify_rtl_sharing): Call reset_all_used_flags before and after
+       performing the checks.
+
 2013-04-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/arm/arm.c (const_ok_for_dimode_op): Handle AND case.
index 82e476683ca4351a57637aa74ed384a0fdad2bf5..5a24a7913c45c7c4cdfaf66a782020b04f27b7ab 100644 (file)
@@ -2596,16 +2596,13 @@ verify_rtx_sharing (rtx orig, rtx insn)
   return;
 }
 
-/* Go through all the RTL insn bodies and check that there is no unexpected
-   sharing in between the subexpressions.  */
+/* Go through all the RTL insn bodies and clear all the USED bits.  */
 
-DEBUG_FUNCTION void
-verify_rtl_sharing (void)
+static void
+reset_all_used_flags (void)
 {
   rtx p;
 
-  timevar_push (TV_VERIFY_RTL_SHARING);
-
   for (p = get_insns (); p; p = NEXT_INSN (p))
     if (INSN_P (p))
       {
@@ -2629,6 +2626,19 @@ verify_rtl_sharing (void)
              }
          }
       }
+}
+
+/* Go through all the RTL insn bodies and check that there is no unexpected
+   sharing in between the subexpressions.  */
+
+DEBUG_FUNCTION void
+verify_rtl_sharing (void)
+{
+  rtx p;
+
+  timevar_push (TV_VERIFY_RTL_SHARING);
+
+  reset_all_used_flags ();
 
   for (p = get_insns (); p; p = NEXT_INSN (p))
     if (INSN_P (p))
@@ -2639,6 +2649,8 @@ verify_rtl_sharing (void)
          verify_rtx_sharing (CALL_INSN_FUNCTION_USAGE (p), p);
       }
 
+  reset_all_used_flags ();
+
   timevar_pop (TV_VERIFY_RTL_SHARING);
 }