[PATCH] Fix PR50031, take 2

Jakub Jelinek jakub@redhat.com
Fri Feb 10 15:52:00 GMT 2012

On Fri, Feb 10, 2012 at 09:36:01AM -0600, William J. Schmidt wrote:
> Per Jakub's explanation, the replacement statements are distributed over
> the original pattern statements.  Visiting STMT_VINFO_RELATED_STMT for a
> statement marked STMT_VINFO_IN_PATTERN_P will find zero or one
> replacement statements that should be examined.  Visiting
> STMT_VINFO_PATTERN_DEF_SEQ may pick up some leftover replacement
> statements that didn't fit in the 1-1 mapping.  The point is that all of
> these related statements and pattern-def-seq statements are disjoint,
> and Ira's logic is ensuring that they all get examined once.
> It's not a very clean way to represent the replacement of a pattern --
> not how you'd do it if designing from scratch -- but I guess I can see
> how it got this way when the STMT_VINFO_PATTERN_DEF_SEQ was glued onto
> the existing 1-1 mapping.

Still in 4.6 we have just a 1-1 or 1-0 mapping (as I wrote in the previous
mail, I think those orig stmts that don't need any replacements, e.g.
if you have 2 orig stmts mapping to just one pattern stmt, are just marked
as not relevant).  Then 4.7 first added (Ira's changes)
STMT_VINFO_PATTERN_DEF_STMT, i.e. in addition to 1-1 and 1-0 there was
a possibility for 1-2 mapping.  And then I needed more than 2, but it was
too late in the game to do large changes, so we end up with 1-1+N scheme
by changing the DEF_STMT into DEF_SEQ. For 4.8 we definitely at least should
remove STMT_VINFO_RELATED_STMT as a way to represent pattern stmts,
even for 1-1 mapping the pattern stmt should go into a sequence.


More information about the Gcc-patches mailing list