[PATCH] D55678: [CVP] Use LVI to constant fold deopt operands
Anna Thomas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 21 10:34:02 PST 2018
anna added inline comments.
================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:471
+ // single use rules in instcombine). Since deopt uses tend to,
+ // idiomatically, appear along rare conditional paths, it's reasonable likely
+ // we may have a conditional fact with which LVI can fold.
----------------
Nit: reasonably.
================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:485
+ // instruction as per the checked in test in test/CVP/deopt.ll
+ Constant *C = LVI->getConstant(V, CS.getParent());
+ if (!C) continue;
----------------
>From the code, `getConstant` calls `getValueInBlock` which returns the value at the end of the BasicBlock. The BB passed in here is the callsite's parent. We want the value which is true at the beginning of the `CS.getParent()` right?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55678/new/
https://reviews.llvm.org/D55678
More information about the llvm-commits
mailing list