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: RFA: Fix PR38785


On Fri, Mar 6, 2009 at 2:49 PM, Joern Rennecke <amylaar@spamcop.net> wrote:
>>> The lunacy of turning simple ALU operations into expensive phi nodes
>>> creates new anticipatable constants.
>>>
>>> Without ssa, you don't have phi nodes, so this kind of code explosion
>>> won't happen.
>
> Quoting Daniel Berlin <dberlin@dberlin.org>:
>>
>> Of course it will.
>> It will simply insert the appropriate copy statements instead of phi
>> nodes.
>
> All right, it seems we have a different notion of what it means to
> improve RTL level PRE.

Okay, i was using "eliminate more computations" as a benchmark.

> The new constants are not generated by LCM itself, but when you iterate
> over it and do constant substitution with different constants for
> different incoming edges.

Except that LCM would also want to do these inserts if the initial
expression equivalence was as good as the tree level's is.

>  ?In rtl it should be obvious that inserting
> expensive constant loads in each of the blocks of the postdominance
> frontier in order to eliminate a simple ALU operation is not a good
> idea.

No doubt, but it won't prevent it from doing it right now if you
actually fixed it's expression equivalence  to detect more than
absolutely trivial lexical equivalence.


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