[PATCH] D28129: NewGVN: Sort Dominator Tree in RPO order, and use that for generating order.

Friedman, Eli via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 28 13:18:33 PST 2016


On 12/28/2016 1:03 PM, Daniel Berlin via llvm-commits wrote:
>
>
> On Wed, Dec 28, 2016 at 7:04 AM, Davide Italiano via Phabricator 
> <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
>
>     davide accepted this revision.
>     davide added a comment.
>     This revision is now accepted and ready to land.
>
>     Sorry for the slow response, I'm out('ish) of the office these
>     days. I took a close look at your patch.
>
>
> No worries.
>
>     I happen to be lucky enough to hit a case in the wild where this
>     already matters.  The number of iteration goes down from hundreds
>     to ~10, which makes compile time/me happier.
>
>
> yay.
>
> The current code, excepting super-weird cases, should operate in 
> O(d+3) iterations, where d is the loop connectedness of the SSA graph 
> (not the CFG), which is the number of backedges in any path. This will 
> change when we move to equality propagation, but for now, ...
> We could  calculate this number and see if we are screwing up :)
>
> For most programs, the loop connectedness of the SSA graph is the same 
> or less than the CFG.
>
> However,  IIRC, we allow  dependent phis in the same block (this is 
> not strictly SSA, since all phi nodes are supposed to be evaluated 
> simultaneously).

I'm not sure what you're trying to say here?  PHI nodes for a given 
basic block are evaluated simultaneously. From LangRef: "For the 
purposes of the SSA form, the use of each incoming value is deemed to 
occur on the edge from the corresponding predecessor block to the 
current block (but after any definition of an ‘|invoke|‘ instruction’s 
return value on the same edge)."

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161228/5e992b71/attachment.html>


More information about the llvm-commits mailing list