Skip to content

Commit 674f578

Browse files
committed
[gardening] Replace some uses of setDebugLoc(DebugLoc()) with dropLocation(), NFC
1 parent bd14d6e commit 674f578

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Transforms/Scalar/LICM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,7 @@ bool llvm::promoteLoopAccessesToScalars(
21592159
if (SawUnorderedAtomic)
21602160
PreheaderLoad->setOrdering(AtomicOrdering::Unordered);
21612161
PreheaderLoad->setAlignment(Alignment);
2162-
PreheaderLoad->setDebugLoc(DebugLoc());
2162+
PreheaderLoad->dropLocation();
21632163
if (AATags)
21642164
PreheaderLoad->setAAMetadata(AATags);
21652165
SSA.AddAvailableValue(Preheader, PreheaderLoad);

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ bool SimplifyCFGOpt::SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB,
22182218
// be misleading while debugging.
22192219
for (auto &I : *ThenBB) {
22202220
if (!SpeculatedStoreValue || &I != SpeculatedStore)
2221-
I.setDebugLoc(DebugLoc());
2221+
I.dropLocation();
22222222
I.dropUnknownNonDebugMetadata();
22232223
}
22242224

@@ -2878,7 +2878,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, MemorySSAUpdater *MSSAU,
28782878
// When we fold the bonus instructions we want to make sure we
28792879
// reset their debug locations in order to avoid stepping on dead
28802880
// code caused by folding dead branches.
2881-
NewBonusInst->setDebugLoc(DebugLoc());
2881+
NewBonusInst->dropLocation();
28822882

28832883
RemapInstruction(NewBonusInst, VMap,
28842884
RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
@@ -2902,7 +2902,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, MemorySSAUpdater *MSSAU,
29022902

29032903
// Reset the condition debug location to avoid jumping on dead code
29042904
// as the result of folding dead branches.
2905-
CondInPred->setDebugLoc(DebugLoc());
2905+
CondInPred->dropLocation();
29062906

29072907
RemapInstruction(CondInPred, VMap,
29082908
RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);

0 commit comments

Comments
 (0)