[PATCH] D51471: [SimplifyCFG] Reduce memory churn during common case for branch commoning [NFC]
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 30 00:39:59 PDT 2018
mkazantsev requested changes to this revision.
mkazantsev added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2694
+ Instruction *CondInPred = nullptr;
+ if (PredCount == 1) {
+ for (auto BonusInstItr = BB->begin(); Cond != &*BonusInstItr;) {
----------------
What if the predecessor block has more than one successor? You'll end up moving loads and other dangerous instruction across conditional branches.
https://reviews.llvm.org/D51471
More information about the llvm-commits
mailing list