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: RTL sharing bootstrap failure on sparc-sun-solaris2.10


> Hi,
> I already have fix for this just waiting for Andreas Tobler to verify
> that it does what expected.  If you could give it a try, it would be
> nice.
> 
> The problem is 
> 
> /* Called when INSN is being moved from a location near the target of a jump.
>    We leave a marker of the form (use (INSN)) immediately in front
>    of WHERE for mark_target_live_regs.  These markers will be deleted when
>    reorg finishes.
> 
>    We used to try to update the live status of registers if WHERE is at
>    the start of a basic block, but that can't work since we may remove a
>    BARRIER in relax_delay_slots.  */
> 
> static void
> update_block (rtx insn, rtx where)
> {
>   /* Ignore if this was in a delay slot and it came from the target of
>      a branch.  */
>   if (INSN_FROM_TARGET_P (insn))
>     return;
> 
>   emit_insn_before (gen_rtx_USE (VOIDmode, insn), where);
> 
>   /* INSN might be making a value live in a block where it didn't use to
>      be.  So recompute liveness information for this block.  */
> 
>   incr_ticks_for_insn (insn);
> }
> 
> Producing USE expressions embedding whole INSN.  The comment promise
> that those will be removed before reorg ends, but they are not.  This
> patch just adds simple code to remove them in very last dbr_schedule
> pass. 
> 
> Honza

Since patch seems to work for Andreas, would it be OK?
	* recog.c (dbr_schedule): Remove placeholder USE insns
	previously inserted by update_block.
> 
> Index: reorg.c
> ===================================================================
> --- reorg.c	(revision 128145)
> +++ reorg.c	(working copy)
> @@ -3991,6 +3991,9 @@ dbr_schedule (rtx first)
>  	  if (GET_CODE (pat) == SEQUENCE)
>  	    insn = XVECEXP (pat, 0, 0);
>  	}
> +      if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> +	  && INSN_P (XEXP (PATTERN (insn), 0)))
> +	delete_insn (insn);
>        if (!JUMP_P (insn))
>  	continue;
>  


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