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: [tree-tailcall] Check if function returns it's argument


On 12/09/2016 01:10 AM, Richard Biener wrote:

Yea.  Not sure how often something like that would happen in practice, but
using the equivalence to simplify rather than for propagation seems like the
way to go.

I keep thinking about doing some similar in DOM, but haven't gotten around to
seeing what the fallout would be.

Shouldn't be too bad (it would require to keep an additional
what-to-substitute-for-value-X lattice during the DOM walk).  But it
will still require some "magic" to decide about those conditional
equivalences... (I think).

Separating "values" from what we substitute during elimination is a good
thing in general, so we can be more aggressive with the value parts.
I think we'd just need to change SSA_NAME_VALUE from a vector of trees to a pair representation or to have an on-the-side bitmap to indicate values that can be used for simplification but not for propagation.

It shouldn't be terrible.
jeff


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