[PATCH] D19743: [SimplifyCFG] Prefer a simplification based on dominating conditions over merging a common destination.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 14:03:04 PDT 2016
mcrosier created this revision.
mcrosier added reviewers: reames, sanjoy, chandlerc, echristo, gberry.
mcrosier added a subscriber: llvm-commits.
Herald added a subscriber: joker.eph.
Often we can simplify the CFG based on dominating conditions. However, we miss opportunities when we merge blocks with a common destination.
For example, before this change we would need to run -simplifycfg -instcombine -simplifycfg on test4_fold to arrive at the code in test4_no_fold after only a single run of -simplifycfg.
I found a case in Spec2006/soplex where this further removed unreachable code. As expected, I found no cases where code size increased across Spec2000/Spec2006. As isImpliedCondition continues to expand in capabilities I expect more opportunities to be exposed. This may also improve compile-time, but I didn't measure the impact directly.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4217 bytes
Desc: not available
More information about the llvm-commits