This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions


On Sun, 19 Oct 2014, Marc Glisse wrote:

> Hello,
> 
> looking though the patterns on the branch (not specifically the ones attached
> here), I am surprised to see so few calls to has_single_use. In RTL-land, we
> don't even valueize if there are several uses, so the question doesn't occur.
> In generic, we assume everything is single use (CSE could later disagree, but
> that's the user's fault for writing his code that way). In
> tree-ssa-forwprop.c, helpers like get_prop_source_stmt do test for single use.
> Since has_single_use is a bit painful to use in .pd files (separate test for
> generic and constants), it might deserve another helper function, or a special
> syntax.

But I don't think "has_single_use" is a good tool to disable transforms 
on.  It's also used very inconsistently in tree-ssa-forwprop.c.

See also my other mail.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]