[PATCH] D36287: [SimplifyCFG] Simplify based on a dominating condition (looking past hammocks and diamonds).

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 11:00:13 PDT 2017


I'm quite confident jump threading and the like easily capture what's 
captured by D36287.  In other words, I'm confident JT/GVN isn't missing 
anything that D36287 is trying to do, so it's difficult to assess the 
value of adding a predicateinfo based pass.  The patch itself removed on 
the order of 10-15 static instruction from each of the impacted 
benchmarks and again that was only about 1/3 of SPEC20XX and maybe 10-15 
of the llvmts tests (i.e., not very exciting).

I'm much much more interested in solving 
http://lists.llvm.org/pipermail/llvm-dev/2017-August/116183.html, which 
is where is idea of this patch came from..


On 8/4/2017 1:18 PM, Daniel Berlin via llvm-commits wrote:
> If you do discover testcases where these passes are actually *missing* 
> optimization, we'd love to see them.
> (as you surmise, there's little we can do about the ones that come 
> after ;P).
>
> Otherwise, it would be pretty easy to build a predicateinfo based pass 
> to clean up here if it's valuable.
> Predicateinfo takes < 600ms on > 1 million blocks/conditionals (where 
> even constructing the dominator tree takes 700-800ms), so it's 
> unlikely to affect compile time in any real way.
>
>
>
>
> On Fri, Aug 4, 2017 at 9:41 AM, Chad Rosier via Phabricator 
> <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
>
>     mcrosier added a comment.
>
>     In https://reviews.llvm.org/D36287#831132
>     <https://reviews.llvm.org/D36287#831132>, @efriedma wrote:
>
>     > We already have a couple other passes which can do optimize your
>     testcase (JumpThreading and GVN); what do we gain from doing this
>     analysis here specifically?
>
>
>     Just to follow up on your question, Eli.  I suspect the fact that
>     SimplifyCFG runs more frequently than JT and GVN result in a few
>     additional cases being captured (perhaps cases exposed after
>     JT/GVN).  However, I honestly haven't done the full investigation
>     to get a definitive answer. Again, this is just derivative work
>     and I'm not particularly set on getting this committed.
>
>
>     https://reviews.llvm.org/D36287 <https://reviews.llvm.org/D36287>
>
>
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170804/840cb6a5/attachment.html>


More information about the llvm-commits mailing list