[PATCH] D28459: Make processing @llvm.assume more efficient - Add affected values to the assumption cache
Piotr Padlewski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 02:23:43 PST 2017
Prazek added inline comments.
================
Comment at: lib/Analysis/AssumptionCache.cpp:52
+ I->getOpcode() == Instruction::PtrToInt) {
+ V = I->getOperand(0);
+ if (isa<Instruction>(V) || isa<Argument>(V))
----------------
auto *Op = I->getOperand(0)
reassigning V can be easy to miss
================
Comment at: lib/Analysis/AssumptionCache.cpp:59-63
+ Value *Cond = CI->getArgOperand(0), *A, *B;
+ AddAffected(Cond);
+
+ CmpInst::Predicate Pred;
+ if (match(Cond, m_ICmp(Pred, m_Value(A), m_Value(B)))) {
----------------
A and B are undefined, and they are not assigned in m_Value, so what is going on here?
I am just not familiar with this matcher library, but it looks very odd.
https://reviews.llvm.org/D28459
More information about the llvm-commits
mailing list