[PATCH] D29747: PredicateInfo: Support switch statements
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 11 05:22:23 PST 2017
dberlin marked 3 inline comments as done.
dberlin added inline comments.
================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:845
+ DEBUG(dbgs() << "Found predicate info from instruction !\n");
+ if (auto *PSwitch = dyn_cast<PredicateSwitch>(PI)) {
+ // For switch statements, we know the value of the condition, and that is
----------------
See comment below about branch having two parents.
The switch code is the only real new code in this function,
================
Comment at: lib/Transforms/Scalar/NewGVN.cpp:1061
}
const Expression *NewGVN::performSymbolicCmpEvaluation(Instruction *I) {
+ auto *CI = dyn_cast<CmpInst>(I);
----------------
Just a friendly note: This branch has two parents (the critical edge patch and the initial newgvn patch).
So this diff shows a lot more than is actually here.
In particular, this function is not really being added here.
https://reviews.llvm.org/D29747
More information about the llvm-commits
mailing list