[PATCH] D81584: [BreakCritEdges] Support preserving loop-simplify form with indirectbr. (WIP)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 09:17:51 PDT 2020


fhahn created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This patch updates SplitCriticalEdges preserve loop-simplify form, even
if we would have to split the predecessors of the exit block.

Instead of splitting the predecessors of the exit block, it splits the
exit block at the first non-PHI instruction and updates the branch in
the new block to jump to the new split block. It also adds PHIs as
required.

Unfortunately a few users rely on the contents of a block not being
moved. I managed to fix most of them, but I am not too sure what to do
about the caching in MemoryDependenceAnalsysis.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81584

Files:
  llvm/lib/Transforms/Scalar/GVN.cpp
  llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
  llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
  llvm/test/Transforms/GVN/PRE/2011-06-01-NonLocalMemdepMiscompile.ll
  llvm/test/Transforms/GVN/critical-edge-split-indbr-pred-in-loop.ll
  llvm/test/Transforms/Util/PR37334-break-crit-edges-require-dt.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81584.269876.patch
Type: text/x-patch
Size: 8863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200610/376b4f64/attachment.bin>


More information about the llvm-commits mailing list