From 05659606a2af76710fb19a65fbd1a6c88ba12dad Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Wed, 30 Sep 2020 09:43:29 +0100 Subject: [PATCH] Revert "[gardening] Replace some uses of setDebugLoc(DebugLoc()) with dropLocation(), NFC" Some of the buildbots have croaked with this patch, for examples failures that begin in this build: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/29933 This reverts commit 674f57870f4c8a7fd7b629bffc85b149cbefd3e0. --- llvm/lib/Transforms/Scalar/LICM.cpp | 2 +- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index bc581e7..631fa2f 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -2159,7 +2159,7 @@ bool llvm::promoteLoopAccessesToScalars( if (SawUnorderedAtomic) PreheaderLoad->setOrdering(AtomicOrdering::Unordered); PreheaderLoad->setAlignment(Alignment); - PreheaderLoad->dropLocation(); + PreheaderLoad->setDebugLoc(DebugLoc()); if (AATags) PreheaderLoad->setAAMetadata(AATags); SSA.AddAvailableValue(Preheader, PreheaderLoad); diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 1672293..124a7c4 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -2218,7 +2218,7 @@ bool SimplifyCFGOpt::SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB, // be misleading while debugging. for (auto &I : *ThenBB) { if (!SpeculatedStoreValue || &I != SpeculatedStore) - I.dropLocation(); + I.setDebugLoc(DebugLoc()); 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->dropLocation(); + NewBonusInst->setDebugLoc(DebugLoc()); 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->dropLocation(); + CondInPred->setDebugLoc(DebugLoc()); RemapInstruction(CondInPred, VMap, RF_NoModuleLevelChanges | RF_IgnoreMissingLocals); -- 2.7.4