Small flow.c fix for new_ia32_branch

Jan Hubicka hubicka@atrey.karlin.mff.cuni.cz
Sat Jul 3 16:03:00 GMT 1999


Hi
This is patch to flow.c in new backend to stop it complain about dead stores
in peepholers2. This is needed for my previous patch changing add/subs to
push/pops

Sat Jul  3 08:48:45 CEST 1999  Jan Hubicka <hubicka@freesoft.cz>
	* flow.c (new_insn_dead_notes): Handle dead stores nicely.

*** flow.c.old	Fri Jul  2 05:08:17 1999
--- flow.c	Sat Jul  3 07:05:23 1999
*************** new_insn_dead_notes (pat, insn, first, l
*** 5357,5364 ****
  		    break;
  		}
  
  	      if (! TEST_HARD_REG_BIT (res.regs, REGNO (dest)))
! 		abort ();
  	    }
  	}
        if (insn != first)
--- 5379,5395 ----
  		    break;
  		}
  
+ 	      /* In case reg was not used later, it is dead store.
+ 	         add REG_UNUSED note.  */
  	      if (! TEST_HARD_REG_BIT (res.regs, REGNO (dest)))
! 	        {
! 	          rtx note = rtx_alloc (EXPR_LIST);
! 	          PUT_REG_NOTE_KIND (note, REG_UNUSED);
! 	          XEXP (note, 0) = dest;
! 	          XEXP (note, 1) = REG_NOTES (insn);
! 	          REG_NOTES (insn) = note;
! 	          return;
! 	        }
  	    }
  	}
        if (insn != first)


More information about the Gcc-patches mailing list