This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix i?86 eh regressions (PR middle-end/40304)


Jakub Jelinek <jakub@redhat.com> writes:

> 2009-05-31  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR middle-end/40304
> 	* recog.c (peephole2_optimize): When seeing a RTX_FRAME_RELATED_P
> 	insn, reinitialize peep2_insn_data and peep2_current in addition
> 	to clearing peep2_current_count.
>
> --- gcc/recog.c.jj	2009-05-19 10:51:33.000000000 +0200
> +++ gcc/recog.c	2009-05-30 21:23:44.000000000 +0200
> @@ -3118,7 +3118,13 @@ peephole2_optimize (void)
>  		  /* If an insn has RTX_FRAME_RELATED_P set, peephole
>  		     substitution would lose the
>  		     REG_FRAME_RELATED_EXPR that is attached.  */
> +		  for (i = 0; i < MAX_INSNS_PER_PEEP2; ++i)
> +		    peep2_insn_data[i].insn = NULL_RTX;
>  		  peep2_current_count = 0;
> +		  peep2_insn_data[MAX_INSNS_PER_PEEP2].insn = PEEP2_EOB;
> +		  peep2_current = MAX_INSNS_PER_PEEP2;
> +		  bitmap_copy (peep2_insn_data[peep2_current].live_before,
> +			       live);

Put this in a helper function, I think, one that is also called from the
loop at the start of each block, passing in the live bitmap to use.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]