[PATCH] D44627: [CallSiteSplitting] Only record conditions up to the IDom(call site).
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 8 13:25:07 PST 2018
junbuml accepted this revision.
junbuml added a comment.
This revision is now accepted and ready to land.
Thanks for revisiting this.
LGTM.
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:159-160
SmallPtrSet<BasicBlock *, 4> Visited;
while (!Visited.count(From->getSinglePredecessor()) &&
- (From = From->getSinglePredecessor())) {
+ (From = From->getSinglePredecessor()) && To != StopAt) {
recordCondition(CS, From, To, Conditions);
----------------
It seems better to place "To != StopAt" first :
```
while (To != StopAt && !Visited.count(From->getSinglePredecessor()) &&
(From = From->getSinglePredecessor()))
```
https://reviews.llvm.org/D44627
More information about the llvm-commits
mailing list