[PATCH] D157621: [CHR] Fix up phi nodes with unreachable predecessors

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 10 07:42:57 PDT 2023


nikic created this revision.
nikic added reviewers: davidxl, kazu, aeubanks.
Herald added subscribers: Enna1, StephenFan, wenlei, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If a block in the CHR region has an unreachable predecessor, then there will be no edge from that predecessor to the newly cloned block. However, a phi node entry for it will be left behind. Make sure that these incoming blocks get dropped as well.


https://reviews.llvm.org/D157621

Files:
  llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
  llvm/test/Transforms/PGOProfile/chr-dead-pred.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157621.549037.patch
Type: text/x-patch
Size: 5796 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230810/deb3affa/attachment.bin>


More information about the llvm-commits mailing list