From: Andreas Krebbel Date: Mon, 15 Apr 2013 13:09:50 +0000 (+0000) Subject: emit-rtl.c (reset_all_used_flags): New function. X-Git-Tag: releases/gcc-4.9.0~6424 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a24243a0e5e09bd562eeb362c1c89ee497ea67e7;p=thirdparty%2Fgcc.git emit-rtl.c (reset_all_used_flags): New function. 2013-04-15 Andreas Krebbel * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f6d63f21db71..fd1731e7e8d2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-04-15 Andreas Krebbel + + * 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 * config/arm/arm.c (const_ok_for_dimode_op): Handle AND case. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 82e476683ca4..5a24a7913c45 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -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); }