/// Set the debug location in the builder \p Ptr using the debug location in
/// \p V. If \p Ptr is None then it uses the class member's Builder.
- void setDebugLocFromInst(const Value *V,
- Optional<IRBuilderBase *> CustomBuilder = None);
+ void setDebugLocFromInst(const Value *V);
/// Fix the non-induction PHIs in \p Plan.
void fixNonInductionPHIs(VPlan &Plan, VPTransformState &State);
}
void InnerLoopVectorizer::setDebugLocFromInst(
- const Value *V, Optional<IRBuilderBase *> CustomBuilder) {
- IRBuilderBase *B = (CustomBuilder == None) ? &Builder : *CustomBuilder;
+ const Value *V) {
if (const Instruction *Inst = dyn_cast_or_null<Instruction>(V)) {
const DILocation *DIL = Inst->getDebugLoc();
auto NewDIL =
DIL->cloneByMultiplyingDuplicationFactor(UF * VF.getKnownMinValue());
if (NewDIL)
- B->SetCurrentDebugLocation(NewDIL.getValue());
+ Builder.SetCurrentDebugLocation(NewDIL.getValue());
else
LLVM_DEBUG(dbgs()
<< "Failed to create new discriminator: "
<< DIL->getFilename() << " Line: " << DIL->getLine());
} else
- B->SetCurrentDebugLocation(DIL);
+ Builder.SetCurrentDebugLocation(DIL);
} else
- B->SetCurrentDebugLocation(DebugLoc());
+ Builder.SetCurrentDebugLocation(DebugLoc());
}
/// Write a \p DebugMsg about vectorization to the debug output stream. If \p I
}
void VPBlendRecipe::execute(VPTransformState &State) {
- State.ILV->setDebugLocFromInst(Phi, &State.Builder);
+ State.ILV->setDebugLocFromInst(Phi);
// We know that all PHIs in non-header blocks are converted into
// selects, so we don't have to worry about the insertion order and we
// can just use the builder.