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, delay-slot] Fix overload of "unchanging" bit


Richard Henderson <rth@redhat.com> writes:
> As found by a c6x build failure, INSN_ANNULLED_BRANCH_P and RTL_CONST_CALL_P
> both resolve to the same bit for CALL_INSNs.  I want to fix this by
> restricting INSN_ANNULLED_BRANCH_P to JUMP_INSNs, since annulling the slots
> for a call or a plain insn doesn't really make sense.
>
> The following has passed stage2-gcc on sparc64-linux host (full build still
> in progress), with --enable-checking=yes,rtl.  It surely needs more than that,
> and I'm asking for help from the relevant maintainers to give this a try.

'spect you'll have noticed this by now, but there was a typo in:

> +        rtx annul_p = JUMP_P (control) && INSN_ANNULLED_BRANCH_P (control);

(should be bool).  Otherwise it tests fine on mips64-linux-gnu with the
additional patch below, which I've just applied.

Richard


gcc/
	* config/mips/mips.c (mips_reorg_process_insns): Check for jumps
	before checking for annulled branches.

Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2011-08-20 19:44:06.000000000 +0100
+++ gcc/config/mips/mips.c	2011-08-20 19:44:44.000000000 +0100
@@ -14831,6 +14831,7 @@ mips_reorg_process_insns (void)
 		 executed.  */
 	      else if (recog_memoized (insn) == CODE_FOR_r10k_cache_barrier
 		       && last_insn
+		       && JUMP_P (SEQ_BEGIN (last_insn))
 		       && INSN_ANNULLED_BRANCH_P (SEQ_BEGIN (last_insn)))
 		delete_insn (insn);
 	      else


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