From 58f16b13a500b4549d80887cd2c131ffade6c0a1 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Thu, 10 Sep 2015 00:44:10 +0000 Subject: [PATCH] [RewriteStatepointsForGC] Minor refactor to use shared implementation [NFC] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247223 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 57687def2d9..2bb0918f6eb 100644 --- a/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/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 -- 2.34.1