[PATCH] D54189: [HotColdSplitting] Ensure PHIs have unique incoming values
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 17:14:43 PST 2018
vsk added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/HotColdSplitting.cpp:411
+ // Ignore successor PHIs without an incoming value from BB.
+ int BBIndex = SuccPhi.getBasicBlockIndex(&BB);
+ if (BBIndex == -1)
----------------
hiraditya wrote:
> When can we have a case where PHI does not have incoming value from immediate predecessor?
When the successor block has no uses of values defined in the predecessor. A special case of this is when the successor block just contains a terminator:
```
foo:
%sink = ...
br label %bar
bar:
br label %baz
```
https://reviews.llvm.org/D54189
More information about the llvm-commits
mailing list