From 953817b65d122e5e5a9fa333a80836352ba799a9 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Thu, 10 Sep 2015 00:44:10 +0000 Subject: [RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC] llvm-svn: 247223 --- llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'llvm/lib/Transforms') diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 57687def2d9..2bb0918f6eb 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1029,14 +1029,7 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) { auto *BdvIE = cast(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 -- cgit v1.2.3