postreload.c (reload_combine): Mark reg_state as invalid at volatile insns if there has been a use already.

2011-11-22  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* postreload.c (reload_combine): Mark reg_state as invalid at
	volatile insns if there has been a use already.

From-SVN: r181631
This commit is contained in:
Andreas Krebbel 2011-11-22 19:52:34 +00:00 committed by Andreas Krebbel
parent 57ac2606c4
commit 2195c9beb6
2 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2011-11-22 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* postreload.c (reload_combine): Mark reg_state as invalid at
volatile insns if there has been a use already.
2011-11-21 Aldy Hernandez <aldyh@redhat.com>
* opts.c (finish_options): Do not fail for -fgnu-tm.

View File

@ -1312,11 +1312,21 @@ reload_combine (void)
is and then later disable any optimization that would cross it. */
if (LABEL_P (insn))
last_label_ruid = reload_combine_ruid;
else if (BARRIER_P (insn)
|| (INSN_P (insn) && volatile_insn_p (PATTERN (insn))))
for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
if (! fixed_regs[r])
else if (BARRIER_P (insn))
{
/* Crossing a barrier resets all the use information. */
for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
if (! fixed_regs[r])
reg_state[r].use_index = RELOAD_COMBINE_MAX_USES;
}
else if (INSN_P (insn) && volatile_insn_p (PATTERN (insn)))
/* Optimizations across insns being marked as volatile must be
prevented. All the usage information is invalidated
here. */
for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
if (! fixed_regs[r]
&& reg_state[r].use_index != RELOAD_COMBINE_MAX_USES)
reg_state[r].use_index = -1;
if (! NONDEBUG_INSN_P (insn))
continue;