diff options
author | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2013-04-15 11:50:59 +0000 |
---|---|---|
committer | Andreas Krebbel <Andreas.Krebbel@de.ibm.com> | 2013-04-15 11:50:59 +0000 |
commit | 36217676d5ed29d0c8f325f58aaa23d698e7f15a (patch) | |
tree | 232f23c068c82f2e95b80cd77b44ca81186869ba /gcc/emit-rtl.c | |
parent | 676f820ba9a56c0c91e024b704606ac3b9188895 (diff) |
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.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@197967 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 59cd38d40f4..b5278bf4318 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2660,16 +2660,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)) { @@ -2693,6 +2690,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)) @@ -2703,6 +2713,8 @@ verify_rtl_sharing (void) verify_rtx_sharing (CALL_INSN_FUNCTION_USAGE (p), p); } + reset_all_used_flags (); + timevar_pop (TV_VERIFY_RTL_SHARING); } |