[PATCH] D69689: [SimplifyCFG] Use a (trivially) dominanting widenable branch to remove later slow path blocks

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 16:35:39 PDT 2019


reames created this revision.
reames added reviewers: apilipenko, fedor.sergeev.
Herald added subscribers: bollu, hiraditya, mcrosier.
Herald added a project: LLVM.

This transformation is a variation on the GuardWidening transformation we have checked in as it's own pass.  Instead of focusing on merge (i.e. hoisting and simplifying) two widenable branches, this transform makes the observation that simply removing a second slowpath block (by reusing an existing one) is often a very useful canonicalization.  This may lead to later merging, or may not.  This is a useful generalization when the intermediate block has loads whose dereferenceability is hard to establish.

As noted in the patch, this can be generalized further.  I'd like to get this in, and then iterate on top if that's okay with reviewers.


Repository:
  rL LLVM

https://reviews.llvm.org/D69689

Files:
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Transforms/SimplifyCFG/wc-widen-block.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69689.227371.patch
Type: text/x-patch
Size: 15115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191031/7821afc0/attachment.bin>


More information about the llvm-commits mailing list