mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 18:16:42 +00:00
[VPlan] Use recipe debug loc instead of instr DLs in more cases (NFC)
Update both VPInterleaveRecipe and VPReplicateRecipe codegen to use debug location directly from the recipe, not the underlying instruction. This removes another dependency on underlying instructions.
This commit is contained in:
parent
a1b0b4997e
commit
4b67c53e20
@ -2385,7 +2385,7 @@ void InnerLoopVectorizer::scalarizeInstruction(const Instruction *Instr,
|
||||
|
||||
RepRecipe->setFlags(Cloned);
|
||||
|
||||
if (auto DL = Instr->getDebugLoc())
|
||||
if (auto DL = RepRecipe->getDebugLoc())
|
||||
State.setDebugLocFrom(DL);
|
||||
|
||||
// Replace the operands of the cloned instructions with their scalar
|
||||
|
@ -2190,8 +2190,9 @@ public:
|
||||
VPInterleaveRecipe(const InterleaveGroup<Instruction> *IG, VPValue *Addr,
|
||||
ArrayRef<VPValue *> StoredValues, VPValue *Mask,
|
||||
bool NeedsMaskForGaps)
|
||||
: VPRecipeBase(VPDef::VPInterleaveSC, {Addr}), IG(IG),
|
||||
NeedsMaskForGaps(NeedsMaskForGaps) {
|
||||
: VPRecipeBase(VPDef::VPInterleaveSC, {Addr},
|
||||
IG->getInsertPos()->getDebugLoc()),
|
||||
IG(IG), NeedsMaskForGaps(NeedsMaskForGaps) {
|
||||
for (unsigned i = 0; i < IG->getFactor(); ++i)
|
||||
if (Instruction *I = IG->getMember(i)) {
|
||||
if (I->getType()->isVoidTy())
|
||||
|
@ -3110,7 +3110,7 @@ void VPInterleaveRecipe::execute(VPTransformState &State) {
|
||||
ResAddr = State.Builder.CreateGEP(ScalarTy, ResAddr, Index, "", InBounds);
|
||||
}
|
||||
|
||||
State.setDebugLocFrom(Instr->getDebugLoc());
|
||||
State.setDebugLocFrom(getDebugLoc());
|
||||
Value *PoisonVec = PoisonValue::get(VecTy);
|
||||
|
||||
auto CreateGroupMask = [&BlockInMask, &State,
|
||||
|
Loading…
x
Reference in New Issue
Block a user