public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] MIPS VTA fixes
@ 2009-09-03 19:59 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2009-09-03 19:59 UTC (permalink / raw)
  To: gcc-patches

This patch restores mipsisa64-elfoabi builds.  I haven't finished
running the testsuite, although initial results look promising.

The effect is to exclude debug insns from various *INSN_P checks.
In each case, we're just rewriting insns into an equivalent form,
using the same resources, so any debug insns would be unaffected.
E.g. the mips_reorg_process_insns checks are for inserting nops,
mips16_lay_out_constants is for replacing constants with references
to the constant pool, mips16e_collect_argument_saves is folding
stores into an earlier SAVE, and so on.

Richard


gcc/
	* config/mips/mips.c (USEFUL_INSN_P): Use NONDEBUG_INSN_P instead
	of INSN_P.
	(mips16e_collect_argument_saves): Skip debug instructions.
	(mips_74k_agen_init): Use CALL_P || JUMP_P instead of !NONJUMP_INSN_P.
	(mips16_lay_out_constants): Use USEFUL_INSN_P instead of INSN_P.
	(r10k_insert_cache_barriers): Likewise.
	(mips_reorg_process_insns): Likewise.

Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2009-09-03 19:45:16.000000000 +0100
+++ gcc/config/mips/mips.c	2009-09-03 19:49:43.000000000 +0100
@@ -97,7 +97,7 @@ #define MIPS_MAX_FIRST_STACK_STEP					\
 
 /* True if INSN is a mips.md pattern or asm statement.  */
 #define USEFUL_INSN_P(INSN)						\
-  (INSN_P (INSN)							\
+  (NONDEBUG_INSN_P (INSN)						\
    && GET_CODE (PATTERN (INSN)) != USE					\
    && GET_CODE (PATTERN (INSN)) != CLOBBER				\
    && GET_CODE (PATTERN (INSN)) != ADDR_VEC				\
@@ -8264,7 +8264,7 @@ mips16e_collect_argument_saves (void)
   for (insn = get_insns (); insn; insn = next)
     {
       next = NEXT_INSN (insn);
-      if (NOTE_P (insn))
+      if (NOTE_P (insn) || DEBUG_INSN_P (insn))
 	continue;
 
       if (!INSN_P (insn))
@@ -11771,7 +11771,7 @@ static enum attr_type mips_last_74k_agen
 static void
 mips_74k_agen_init (rtx insn)
 {
-  if (!insn || !NONJUMP_INSN_P (insn))
+  if (!insn || CALL_P (insn) || JUMP_P (insn))
     mips_last_74k_agen_insn = TYPE_UNKNOWN;
   else
     {
@@ -13080,7 +13080,7 @@ mips16_lay_out_constants (void)
   for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
     {
       /* Rewrite constant pool references in INSN.  */
-      if (INSN_P (insn))
+      if (USEFUL_INSN_P (insn))
 	{
 	  info.insn = insn;
 	  info.pool = &pool;
@@ -13450,7 +13450,7 @@ r10k_insert_cache_barriers (void)
 	 - the first instruction in an unprotected region otherwise.  */
       for (insn = BB_HEAD (bb); insn != end; insn = NEXT_INSN (insn))
 	{
-	  if (unprotected_region && INSN_P (insn))
+	  if (unprotected_region && USEFUL_INSN_P (insn))
 	    {
 	      if (recog_memoized (insn) == CODE_FOR_mips_cache)
 		/* This CACHE instruction protects the following code.  */
@@ -14113,7 +14113,7 @@ mips_reorg_process_insns (void)
   /* Make a first pass over the instructions, recording all the LO_SUMs.  */
   for (insn = get_insns (); insn != 0; insn = NEXT_INSN (insn))
     FOR_EACH_SUBINSN (subinsn, insn)
-      if (INSN_P (subinsn))
+      if (USEFUL_INSN_P (subinsn))
 	for_each_rtx (&PATTERN (subinsn), mips_record_lo_sum, htab);
 
   last_insn = 0;
@@ -14127,7 +14127,7 @@ mips_reorg_process_insns (void)
   for (insn = get_insns (); insn != 0; insn = next_insn)
     {
       next_insn = NEXT_INSN (insn);
-      if (INSN_P (insn))
+      if (USEFUL_INSN_P (insn))
 	{
 	  if (GET_CODE (PATTERN (insn)) == SEQUENCE)
 	    {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-09-03 19:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-03 19:59 [committed] MIPS VTA fixes Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).