[llvm] 16da9d5 - [VPlan] Remove redundant set of debug loc in VPInstruction (NFCI).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 02:46:58 PDT 2024


Author: Florian Hahn
Date: 2024-04-02T10:43:34+01:00
New Revision: 16da9d53519214475c04109d953022f272ac8022

URL: https://github.com/llvm/llvm-project/commit/16da9d53519214475c04109d953022f272ac8022
DIFF: https://github.com/llvm/llvm-project/commit/16da9d53519214475c04109d953022f272ac8022.diff

LOG: [VPlan] Remove redundant set of debug loc in VPInstruction (NFCI).

Consistently use setDebugLocFrom and remove redundant setDebugLocFrom.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 23d025cf33ea2d..124ae3108d8a07 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -455,8 +455,6 @@ Value *VPInstruction::generatePerPart(VPTransformState &State, unsigned Part) {
 
     RecurKind RK = RdxDesc.getRecurrenceKind();
 
-    State.setDebugLocFrom(getDebugLoc());
-
     VPValue *LoopExitingDef = getOperand(1);
     Type *PhiTy = OrigPhi->getType();
     VectorParts RdxParts(State.UF);
@@ -551,7 +549,7 @@ void VPInstruction::execute(VPTransformState &State) {
          "Recipe not a FPMathOp but has fast-math flags?");
   if (hasFastMathFlags())
     State.Builder.setFastMathFlags(getFastMathFlags());
-  State.Builder.SetCurrentDebugLocation(getDebugLoc());
+  State.setDebugLocFrom(getDebugLoc());
   bool GeneratesPerFirstLaneOnly =
       canGenerateScalarForFirstLane() &&
       (vputils::onlyFirstLaneUsed(this) ||


        


More information about the llvm-commits mailing list