[llvm] r247223 - [RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 17:44:10 PDT 2015
Author: reames
Date: Wed Sep 9 19:44:10 2015
New Revision: 247223
URL: http://llvm.org/viewvc/llvm-project?rev=247223&view=rev
Log:
[RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC]
Modified:
llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=247223&r1=247222&r2=247223&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Wed Sep 9 19:44:10 2015
@@ -1029,14 +1029,7 @@ static Value *findBasePointer(Value *I,
auto *BdvIE = cast<InsertElementInst>(BDV);
auto UpdateOperand = [&](int OperandIdx) {
Value *InVal = BdvIE->getOperand(OperandIdx);
- Value *Base = findBaseOrBDV(InVal, cache);
- if (!isKnownBaseResult(Base)) {
- // Either conflict or base.
- assert(States.count(Base));
- Base = States[Base].getBase();
- assert(Base != nullptr && "unknown BDVState!");
- }
- assert(Base && "can't be null");
+ Value *Base = getBaseForInput(InVal, BaseIE);
BaseIE->setOperand(OperandIdx, Base);
};
UpdateOperand(0); // vector operand
More information about the llvm-commits
mailing list