[gardening] Replace some uses of setDebugLoc(DebugLoc()) with dropLocation(), NFC
authorVedant Kumar <vsk@apple.com>
Wed, 30 Sep 2020 00:37:36 +0000 (17:37 -0700)
committerVedant Kumar <vsk@apple.com>
Wed, 30 Sep 2020 00:39:07 +0000 (17:39 -0700)
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp

index 631fa2f..bc581e7 100644 (file)
@@ -2159,7 +2159,7 @@ bool llvm::promoteLoopAccessesToScalars(
   if (SawUnorderedAtomic)
     PreheaderLoad->setOrdering(AtomicOrdering::Unordered);
   PreheaderLoad->setAlignment(Alignment);
-  PreheaderLoad->setDebugLoc(DebugLoc());
+  PreheaderLoad->dropLocation();
   if (AATags)
     PreheaderLoad->setAAMetadata(AATags);
   SSA.AddAvailableValue(Preheader, PreheaderLoad);
index 124a7c4..1672293 100644 (file)
@@ -2218,7 +2218,7 @@ bool SimplifyCFGOpt::SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB,
   // be misleading while debugging.
   for (auto &I : *ThenBB) {
     if (!SpeculatedStoreValue || &I != SpeculatedStore)
-      I.setDebugLoc(DebugLoc());
+      I.dropLocation();
     I.dropUnknownNonDebugMetadata();
   }
 
@@ -2878,7 +2878,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, MemorySSAUpdater *MSSAU,
       // When we fold the bonus instructions we want to make sure we
       // reset their debug locations in order to avoid stepping on dead
       // code caused by folding dead branches.
-      NewBonusInst->setDebugLoc(DebugLoc());
+      NewBonusInst->dropLocation();
 
       RemapInstruction(NewBonusInst, VMap,
                        RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
@@ -2902,7 +2902,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, MemorySSAUpdater *MSSAU,
 
     // Reset the condition debug location to avoid jumping on dead code
     // as the result of folding dead branches.
-    CondInPred->setDebugLoc(DebugLoc());
+    CondInPred->dropLocation();
 
     RemapInstruction(CondInPred, VMap,
                      RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);