On Wed, Nov 28, 2012 at 12:58 AM, Steven Bosscher <stevenb....@gmail.com> wrote: > On Wed, Nov 28, 2012 at 12:53 AM, Steven Bosscher wrote: >> On Wed, Nov 28, 2012 at 12:47 AM, Eric Botcazou wrote: >>>> Count me in, too. So let's avoid it: >>>> >>>> * gcse.c (struct reg_use): Remove unused struct. >>>> (gcse_emit_move_after): Do not create REG_EQUAL notes that >>>> reference >>>> the SET_DEST of the instruction the note would be attached to. >>> >>> OK (with PR rtl-optimization/55006) if it passes bootstrap & regtest, >>> thanks. >> >> Thanks for the quick review. >> >> >>>> And perhaps a bit in emit-rtl.c for good measure? I'll see if/where >>>> this causes breakage... >>> >>> I think this would need to be wrapped in a #ifdef ENABLE_CHECKING/#endif >>> pair. >> >> Well, let me first try to make it pass some set of tests. This breaks >> the compiler in too many places to name right now. Here's the first of >> what's probably going to be a whole series of patches if I keep >> hitting this internal_error as often as I am now in my set of cc1-i >> files... >> >> I know: ChangeLog, testing and all that. That's not the point yet. >> This is just a brain dump, to get this saved in some places safer than >> the compile farm or (worse) my head ;-) > > And another one:
And one to end the night here. Again: Is this really the direction we should be going in? (I haven't any better ideas...) Index: fwprop.c =================================================================== --- fwprop.c (revision 193394) +++ fwprop.c (working copy) @@ -1321,7 +1321,9 @@ forward_propagate_and_simplify (df_ref u separately try plugging the definition in the note and simplifying. And only install a REQ_EQUAL note when the destination is a REG, as the note would be invalid otherwise. */ - set_reg_equal = (note == NULL_RTX && REG_P (SET_DEST (use_set))); + set_reg_equal = (note == NULL_RTX && REG_P (SET_DEST (use_set)) + && ! reg_mentioned_p (SET_DEST (use_set), + SET_SRC (use_set))); } if (GET_MODE (*loc) == VOIDmode)