diff mbox

[RFC,combine] PR48308 - Fix issue with missing(?) LOG_LINKS

Message ID CACUk7=UQx7nWcV34o5v85C_JOF5YnErFh89GqJv6w91TLOhyQQ@mail.gmail.com
State Not Applicable
Headers show

Commit Message

Ramana Radhakrishnan Jan. 23, 2012, 8:51 a.m. UTC
On 22 January 2012 10:53, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> The un-combining thing around line 2800 is somewhat of a kludge and I
>> wouldn't be surprised if there were other fallouts.  But your change is
>> clearly correct and looks relatively safe, so OK for trunk and 4.6 branch
>> after full testing.
>
> I overlooked something though: it might be possible for combine_instructions to
> try to combine i2 again if the previous combination fails (if it succeeds, i1
> is deleted so this is OK) so the stall LOG_LINKS could be problematic.  That's
> why LOG_LINKS (i2) needs to SUBST-ituted like the two lines just above

Do you mean something like this instead ? I'm testing this - Ok if no
regressions ?

Ramana





.
>
> --
> Eric Botcazou

Comments

Eric Botcazou Jan. 23, 2012, 9:02 a.m. UTC | #1
> Do you mean something like this instead ? I'm testing this - Ok if no
> regressions ?

OK with an appropriate ChangeLog.
diff mbox

Patch

=== modified file 'gcc/combine.c'
--- gcc/combine.c	2012-01-11 22:59:12 +0000
+++ gcc/combine.c	2012-01-23 08:50:14 +0000
@@ -2865,6 +2865,7 @@ 
 	  SUBST (PATTERN (i2), XVECEXP (PATTERN (i2), 0, 0));
 	  SUBST (XEXP (SET_SRC (PATTERN (i2)), 0),
 		 SET_DEST (PATTERN (i1)));
+	  SUBST (LOG_LINKS (i2), alloc_insn_link (i1, LOG_LINKS (i2)));
 	}
     }
 #endif