-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[DebugInfo] Strip more debug-intrinsic code from local utils #149037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
SROA and a few other facilities use generic-lambdas and some overloaded functions to deal with both intrinsics and debug-records at the same time. As part of stripping out intrinsic support, delete a swathe of this code from things in the Utils directory.
@llvm/pr-subscribers-llvm-transforms Author: Jeremy Morse (jmorse) ChangesSROA and a few other facilities use generic-lambdas and some overloaded This is a large diff, but is mostly about removing functions that were All of this is chipping away at intrinsic-specific code until we get to removing Patch is 50.93 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/149037.diff 8 Files Affected:
diff --git a/llvm/include/llvm/Transforms/Utils/Local.h b/llvm/include/llvm/Transforms/Utils/Local.h
index df146458b4e6f..bb79d2568fca0 100644
--- a/llvm/include/llvm/Transforms/Utils/Local.h
+++ b/llvm/include/llvm/Transforms/Utils/Local.h
@@ -36,7 +36,6 @@ class BasicBlock;
class BranchInst;
class CallBase;
class CallInst;
-class DbgVariableIntrinsic;
class DIBuilder;
class DomTreeUpdater;
class Function;
@@ -275,36 +274,23 @@ LLVM_ABI CallInst *changeToCall(InvokeInst *II, DomTreeUpdater *DTU = nullptr);
LLVM_ABI void InsertDebugValueAtStoreLoc(DbgVariableRecord *DVR, StoreInst *SI,
DIBuilder &Builder);
-/// Creates and inserts an llvm.dbg.value intrinsic before a store
-/// that has an associated llvm.dbg.value intrinsic.
-LLVM_ABI void InsertDebugValueAtStoreLoc(DbgVariableIntrinsic *DII,
- StoreInst *SI, DIBuilder &Builder);
-
-/// Inserts a llvm.dbg.value intrinsic before a store to an alloca'd value
-/// that has an associated llvm.dbg.declare intrinsic.
-LLVM_ABI void ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII,
- StoreInst *SI,
- DIBuilder &Builder);
+/// Inserts a dbg.value record before a store to an alloca'd value
+/// that has an associated dbg.declare record.
LLVM_ABI void ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR,
StoreInst *SI,
DIBuilder &Builder);
-/// Inserts a llvm.dbg.value intrinsic before a load of an alloca'd value
-/// that has an associated llvm.dbg.declare intrinsic.
-LLVM_ABI void ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII,
- LoadInst *LI, DIBuilder &Builder);
+/// Inserts a dbg.value record before a load of an alloca'd value
+/// that has an associated dbg.declare record.
LLVM_ABI void ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR,
LoadInst *LI, DIBuilder &Builder);
-/// Inserts a llvm.dbg.value intrinsic after a phi that has an associated
-/// llvm.dbg.declare intrinsic.
-LLVM_ABI void ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII,
- PHINode *LI, DIBuilder &Builder);
+/// Inserts a dbg.value record after a phi that has an associated
+/// llvm.dbg.declare record.
LLVM_ABI void ConvertDebugDeclareToDebugValue(DbgVariableRecord *DVR,
PHINode *LI, DIBuilder &Builder);
-/// Lowers llvm.dbg.declare intrinsics into appropriate set of
-/// llvm.dbg.value intrinsics.
+/// Lowers dbg.declare records into appropriate set of dbg.value records.
LLVM_ABI bool LowerDbgDeclare(Function &F);
/// Propagate dbg.value intrinsics through the newly inserted PHIs.
@@ -312,7 +298,7 @@ LLVM_ABI void
insertDebugValuesForPHIs(BasicBlock *BB,
SmallVectorImpl<PHINode *> &InsertedPHIs);
-/// Replaces llvm.dbg.declare instruction when the address it
+/// Replaces dbg.declare record when the address it
/// describes is replaced with a new value. If Deref is true, an
/// additional DW_OP_deref is prepended to the expression. If Offset
/// is non-zero, a constant displacement is added to the expression
@@ -321,10 +307,10 @@ LLVM_ABI bool replaceDbgDeclare(Value *Address, Value *NewAddress,
DIBuilder &Builder, uint8_t DIExprFlags,
int Offset);
-/// Replaces multiple llvm.dbg.value instructions when the alloca it describes
+/// Replaces multiple dbg.value records when the alloca it describes
/// is replaced with a new value. If Offset is non-zero, a constant displacement
/// is added to the expression (after the mandatory Deref). Offset can be
-/// negative. New llvm.dbg.value instructions are inserted at the locations of
+/// negative. New dbg.value records are inserted at the locations of
/// the instructions they replace.
LLVM_ABI void replaceDbgValueForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
DIBuilder &Builder, int Offset = 0);
diff --git a/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h b/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
index 8b7daf616b110..f288bdfb84f49 100644
--- a/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
+++ b/llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h
@@ -23,7 +23,6 @@
namespace llvm {
class DominatorTree;
-class DbgVariableIntrinsic;
class IntrinsicInst;
class PostDominatorTree;
class AllocaInst;
@@ -53,8 +52,6 @@ struct AllocaInfo {
AllocaInst *AI;
SmallVector<IntrinsicInst *, 2> LifetimeStart;
SmallVector<IntrinsicInst *, 2> LifetimeEnd;
- SmallVector<DbgVariableIntrinsic *, 2> DbgVariableIntrinsics;
- // Non-intrinsic records of variable locations.
SmallVector<DbgVariableRecord *, 2> DbgVariableRecords;
};
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 91a1b61ddc483..abee26fc9c222 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -3644,9 +3644,6 @@ Instruction *InstCombinerImpl::visitAllocSite(Instruction &MI) {
ConstantInt::get(Type::getInt1Ty(C->getContext()),
C->isFalseWhenEqual()));
} else if (auto *SI = dyn_cast<StoreInst>(I)) {
- for (auto *DVI : DVIs)
- if (DVI->isAddressOfVariable())
- ConvertDebugDeclareToDebugValue(DVI, SI, *DIB);
for (auto *DVR : DVRs)
if (DVR->isAddressOfVariable())
ConvertDebugDeclareToDebugValue(DVR, SI, *DIB);
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 70b4552190a4e..23256cf2acbd2 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -315,18 +315,11 @@ calculateFragment(DILocalVariable *Variable,
return UseFrag;
}
-static DebugVariable getAggregateVariable(DbgVariableIntrinsic *DVI) {
- return DebugVariable(DVI->getVariable(), std::nullopt,
- DVI->getDebugLoc().getInlinedAt());
-}
static DebugVariable getAggregateVariable(DbgVariableRecord *DVR) {
return DebugVariable(DVR->getVariable(), std::nullopt,
DVR->getDebugLoc().getInlinedAt());
}
-/// Helpers for handling new and old debug info modes in migrateDebugInfo.
-/// These overloads unwrap a DbgInstPtr {Instruction* | DbgRecord*} union based
-/// on the \p Unused parameter type.
DbgVariableRecord *UnwrapDbgInstPtr(DbgInstPtr P, DbgVariableRecord *Unused) {
(void)Unused;
return static_cast<DbgVariableRecord *>(cast<DbgRecord *>(P));
@@ -376,9 +369,6 @@ static void migrateDebugInfo(AllocaInst *OldAlloca, bool IsSplit,
/// Map of aggregate variables to their fragment associated with OldAlloca.
DenseMap<DebugVariable, std::optional<DIExpression::FragmentInfo>>
BaseFragments;
- for (auto *DAI : at::getAssignmentMarkers(OldAlloca))
- BaseFragments[getAggregateVariable(DAI)] =
- DAI->getExpression()->getFragmentInfo();
for (auto *DVR : at::getDVRAssignmentMarkers(OldAlloca))
BaseFragments[getAggregateVariable(DVR)] =
DVR->getExpression()->getFragmentInfo();
@@ -391,7 +381,7 @@ static void migrateDebugInfo(AllocaInst *OldAlloca, bool IsSplit,
DIBuilder DIB(*OldInst->getModule(), /*AllowUnresolved*/ false);
assert(OldAlloca->isStaticAlloca());
- auto MigrateDbgAssign = [&](auto *DbgAssign) {
+ auto MigrateDbgAssign = [&](DbgVariableRecord *DbgAssign) {
LLVM_DEBUG(dbgs() << " existing dbg.assign is: " << *DbgAssign
<< "\n");
auto *Expr = DbgAssign->getExpression();
@@ -486,7 +476,6 @@ static void migrateDebugInfo(AllocaInst *OldAlloca, bool IsSplit,
LLVM_DEBUG(dbgs() << "Created new assign: " << *NewAssign << "\n");
};
- for_each(MarkerRange, MigrateDbgAssign);
for_each(DVRAssignMarkerRange, MigrateDbgAssign);
}
@@ -5119,36 +5108,13 @@ AllocaInst *SROA::rewritePartition(AllocaInst &AI, AllocaSlices &AS,
}
// There isn't a shared interface to get the "address" parts out of a
-// dbg.declare and dbg.assign, so provide some wrappers now for
-// both debug intrinsics and records.
-const Value *getAddress(const DbgVariableIntrinsic *DVI) {
- if (const auto *DAI = dyn_cast<DbgAssignIntrinsic>(DVI))
- return DAI->getAddress();
- return cast<DbgDeclareInst>(DVI)->getAddress();
-}
-
-const Value *getAddress(const DbgVariableRecord *DVR) {
- return DVR->getAddress();
-}
-
-bool isKillAddress(const DbgVariableIntrinsic *DVI) {
- if (const auto *DAI = dyn_cast<DbgAssignIntrinsic>(DVI))
- return DAI->isKillAddress();
- return cast<DbgDeclareInst>(DVI)->isKillLocation();
-}
-
+// dbg.declare and dbg.assign, so provide some wrappers.
bool isKillAddress(const DbgVariableRecord *DVR) {
if (DVR->getType() == DbgVariableRecord::LocationType::Assign)
return DVR->isKillAddress();
return DVR->isKillLocation();
}
-const DIExpression *getAddressExpression(const DbgVariableIntrinsic *DVI) {
- if (const auto *DAI = dyn_cast<DbgAssignIntrinsic>(DVI))
- return DAI->getAddressExpression();
- return cast<DbgDeclareInst>(DVI)->getExpression();
-}
-
const DIExpression *getAddressExpression(const DbgVariableRecord *DVR) {
if (DVR->getType() == DbgVariableRecord::LocationType::Assign)
return DVR->getAddressExpression();
@@ -5236,66 +5202,6 @@ static DIExpression *createOrReplaceFragment(const DIExpression *Expr,
return DIExpression::get(Expr->getContext(), Ops);
}
-/// Insert a new dbg.declare.
-/// \p Orig Original to copy debug loc and variable from.
-/// \p NewAddr Location's new base address.
-/// \p NewAddrExpr New expression to apply to address.
-/// \p BeforeInst Insert position.
-/// \p NewFragment New fragment (absolute, non-relative).
-/// \p BitExtractAdjustment Offset to apply to any extract_bits op.
-static void
-insertNewDbgInst(DIBuilder &DIB, DbgDeclareInst *Orig, AllocaInst *NewAddr,
- DIExpression *NewAddrExpr, Instruction *BeforeInst,
- std::optional<DIExpression::FragmentInfo> NewFragment,
- int64_t BitExtractAdjustment) {
- if (NewFragment)
- NewAddrExpr = createOrReplaceFragment(NewAddrExpr, *NewFragment,
- BitExtractAdjustment);
- if (!NewAddrExpr)
- return;
-
- DIB.insertDeclare(NewAddr, Orig->getVariable(), NewAddrExpr,
- Orig->getDebugLoc(), BeforeInst->getIterator());
-}
-
-/// Insert a new dbg.assign.
-/// \p Orig Original to copy debug loc, variable, value and value expression
-/// from.
-/// \p NewAddr Location's new base address.
-/// \p NewAddrExpr New expression to apply to address.
-/// \p BeforeInst Insert position.
-/// \p NewFragment New fragment (absolute, non-relative).
-/// \p BitExtractAdjustment Offset to apply to any extract_bits op.
-static void
-insertNewDbgInst(DIBuilder &DIB, DbgAssignIntrinsic *Orig, AllocaInst *NewAddr,
- DIExpression *NewAddrExpr, Instruction *BeforeInst,
- std::optional<DIExpression::FragmentInfo> NewFragment,
- int64_t BitExtractAdjustment) {
- // DIBuilder::insertDbgAssign will insert the #dbg_assign after NewAddr.
- (void)BeforeInst;
-
- // A dbg.assign puts fragment info in the value expression only. The address
- // expression has already been built: NewAddrExpr.
- DIExpression *NewFragmentExpr = Orig->getExpression();
- if (NewFragment)
- NewFragmentExpr = createOrReplaceFragment(NewFragmentExpr, *NewFragment,
- BitExtractAdjustment);
- if (!NewFragmentExpr)
- return;
-
- // Apply a DIAssignID to the store if it doesn't already have it.
- if (!NewAddr->hasMetadata(LLVMContext::MD_DIAssignID)) {
- NewAddr->setMetadata(LLVMContext::MD_DIAssignID,
- DIAssignID::getDistinct(NewAddr->getContext()));
- }
-
- Instruction *NewAssign = cast<Instruction *>(DIB.insertDbgAssign(
- NewAddr, Orig->getValue(), Orig->getVariable(), NewFragmentExpr, NewAddr,
- NewAddrExpr, Orig->getDebugLoc()));
- LLVM_DEBUG(dbgs() << "Created new assign intrinsic: " << *NewAssign << "\n");
- (void)NewAssign;
-}
-
/// Insert a new DbgRecord.
/// \p Orig Original to copy record type, debug loc and variable from, and
/// additionally value and value expression for dbg_assign records.
@@ -5457,12 +5363,12 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
// Migrate debug information from the old alloca to the new alloca(s)
// and the individual partitions.
- auto MigrateOne = [&](auto *DbgVariable) {
+ auto MigrateOne = [&](DbgVariableRecord *DbgVariable) {
// Can't overlap with undef memory.
if (isKillAddress(DbgVariable))
return;
- const Value *DbgPtr = getAddress(DbgVariable);
+ const Value *DbgPtr = DbgVariable->getAddress();
DIExpression::FragmentInfo VarFrag =
DbgVariable->getFragmentOrEntireVariable();
// Get the address expression constant offset if one exists and the ops
@@ -5543,7 +5449,6 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
if (SameVariableFragment(OldDII, DbgVariable))
OldDII->eraseFromParent();
};
- for_each(findDbgDeclares(Fragment.Alloca), RemoveOne);
for_each(findDVRDeclares(Fragment.Alloca), RemoveOne);
for_each(findDVRValues(Fragment.Alloca), RemoveOne);
insertNewDbgInst(DIB, DbgVariable, Fragment.Alloca, NewExpr, &AI,
@@ -5553,10 +5458,8 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
// Migrate debug information from the old alloca to the new alloca(s)
// and the individual partitions.
- for_each(findDbgDeclares(&AI), MigrateOne);
for_each(findDVRDeclares(&AI), MigrateOne);
for_each(findDVRValues(&AI), MigrateOne);
- for_each(at::getAssignmentMarkers(&AI), MigrateOne);
for_each(at::getDVRAssignmentMarkers(&AI), MigrateOne);
return Changed;
@@ -5777,8 +5680,6 @@ bool SROA::deleteDeadInstructions(
// not be able to find it.
if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) {
DeletedAllocas.insert(AI);
- for (DbgDeclareInst *OldDII : findDbgDeclares(AI))
- OldDII->eraseFromParent();
for (DbgVariableRecord *OldDII : findDVRDeclares(AI))
OldDII->eraseFromParent();
}
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index fccb73a36b182..b187208bc238c 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -576,9 +576,8 @@ void PruningFunctionCloner::CloneBlock(
}
// Eagerly remap operands to the newly cloned instruction, except for PHI
- // nodes for which we defer processing until we update the CFG. Also defer
- // debug intrinsic processing because they may contain use-before-defs.
- if (!isa<PHINode>(NewInst) && !isa<DbgVariableIntrinsic>(NewInst)) {
+ // nodes for which we defer processing until we update the CFG.
+ if (!isa<PHINode>(NewInst)) {
RemapInstruction(NewInst, VMap,
ModuleLevelChanges ? RF_None : RF_NoModuleLevelChanges);
@@ -733,15 +732,6 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc,
StartingInst = &StartingBB->front();
}
- // Collect debug intrinsics for remapping later.
- SmallVector<const DbgVariableIntrinsic *, 8> DbgIntrinsics;
- for (const auto &BB : *OldFunc) {
- for (const auto &I : BB) {
- if (const auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I))
- DbgIntrinsics.push_back(DVI);
- }
- }
-
// Clone the entry block, and anything recursively reachable from it.
std::vector<const BasicBlock *> CloneWorklist;
PFC.CloneBlock(StartingBB, StartingInst->getIterator(), CloneWorklist);
@@ -899,21 +889,11 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc,
// Restore attributes.
NewFunc->setAttributes(Attrs);
- // Remap debug intrinsic operands now that all values have been mapped.
- // Doing this now (late) preserves use-before-defs in debug intrinsics. If
+ // Remap debug records operands now that all values have been mapped.
+ // Doing this now (late) preserves use-before-defs in debug records. If
// we didn't do this, ValueAsMetadata(use-before-def) operands would be
// replaced by empty metadata. This would signal later cleanup passes to
- // remove the debug intrinsics, potentially causing incorrect locations.
- for (const auto *DVI : DbgIntrinsics) {
- if (DbgVariableIntrinsic *NewDVI =
- cast_or_null<DbgVariableIntrinsic>(VMap.lookup(DVI)))
- RemapInstruction(NewDVI, VMap,
- ModuleLevelChanges ? RF_None : RF_NoModuleLevelChanges,
- TypeMapper, Materializer);
- }
-
- // Do the same for DbgVariableRecords, touching all the instructions in the
- // cloned range of blocks.
+ // remove the debug records, potentially causing incorrect locations.
Function::iterator Begin = cast<BasicBlock>(VMap[StartingBB])->getIterator();
for (BasicBlock &BB : make_range(Begin, NewFunc->end())) {
for (Instruction &I : BB) {
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 81d85375b9e1d..12186b3e2df6e 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -428,10 +428,6 @@ bool llvm::wouldInstructionBeTriviallyDead(const Instruction *I,
if (I->isEHPad())
return false;
- // We don't want debug info removed by anything this general.
- if (isa<DbgVariableIntrinsic>(I))
- return false;
-
if (const DbgLabelInst *DLI = dyn_cast<DbgLabelInst>(I)) {
if (DLI->getLabel())
return false;
@@ -1632,33 +1628,6 @@ static bool PhiHasDebugValue(DILocalVariable *DIVar,
/// describes an alloca'd variable, so we need to use the alloc size of the
/// value when doing the comparison. E.g. an i1 value will be identified as
/// covering an n-bit fragment, if the store size of i1 is at least n bits.
-static bool valueCoversEntireFragment(Type *ValTy, DbgVariableIntrinsic *DII) {
- const DataLayout &DL = DII->getDataLayout();
- TypeSize ValueSize = DL.getTypeAllocSizeInBits(ValTy);
- if (std::optional<uint64_t> FragmentSize =
- DII->getExpression()->getActiveBits(DII->getVariable()))
- return TypeSize::isKnownGE(ValueSize, TypeSize::getFixed(*FragmentSize));
-
- // We can't always calculate the size of the DI variable (e.g. if it is a
- // VLA). Try to use the size of the alloca that the dbg intrinsic describes
- // instead.
- if (DII->isAddressOfVariable()) {
- // DII should have exactly 1 location when it is an address.
- assert(DII->getNumVariableLocationOps() == 1 &&
- "address of variable must have exactly 1 location operand.");
- if (auto *AI =
- dyn_cast_or_null<AllocaInst>(DII->getVariableLocationOp(0))) {
- if (std::optional<TypeSize> FragmentSize =
- AI->getAllocationSizeInBits(DL)) {
- return TypeSize::isKnownGE(ValueSize, *FragmentSize);
- }
- }
- }
- // Could not determine size of variable. Conservatively return false.
- return false;
-}
-// RemoveDIs: duplicate implementation of the above, using DbgVariableRecords,
-// the replacement for dbg.values.
static bool valueCoversEntireFragment(Type *ValTy, DbgVariableRecord *DVR) {
const DataLayout &DL = DVR->getModule()->getDataLayout();
TypeSize ValueSize = DL.getTypeAllocSizeInBits(ValTy);
@@ -1703,98 +1672,12 @@ static void insertDbgValueOrDbgVariableRecordAfter(
insertDbgValueOrDbgVariableRecord(Builder, DV, DIVar, DIExpr, NewLoc, NextIt);
}
-/// Inserts a llvm.dbg.value intrinsic before a store to an alloca'd value
-/// that has an associated llvm.dbg.declare intrinsic.
-void llvm::ConvertDebugDeclareToDebugValue(DbgVariableIntrinsic *DII,
- StoreInst *SI, DIBuilder &Builder) {
- assert(DII->isAddressOfVariable() || isa<DbgAssignIntrinsic>(DII));
- auto *DIVar...
[truncated]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
+69 −541, nice to see a chunk removed! |
Conflicts: llvm/lib/Transforms/Utils/Local.cpp
You can test this locally with the following command:git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/Transforms/Utils/Local.h llvm/include/llvm/Transforms/Utils/MemoryTaggingSupport.h llvm/lib/Transforms/InstCombine/InstructionCombining.cpp llvm/lib/Transforms/Scalar/SROA.cpp llvm/lib/Transforms/Utils/CloneFunction.cpp llvm/lib/Transforms/Utils/Local.cpp llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp View the diff from clang-format here.diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 72bc09431..2d1fa342b 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -2457,8 +2457,8 @@ static bool rewriteDebugUsers(
DomPoint.getParent()->insertDbgRecordAfter(DVR, &DomPoint);
Changed = true;
- // Users which otherwise aren't dominated by the replacement value must
- // be salvaged or deleted.
+ // Users which otherwise aren't dominated by the replacement value must
+ // be salvaged or deleted.
} else if (!DT.dominates(&DomPoint, MarkedInstr)) {
UndefOrSalvageDVR.insert(DVR);
}
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/23501 Here is the relevant piece of the build log for the reference
|
SROA and a few other facilities use generic-lambdas and some overloaded
functions to deal with both intrinsics and debug-records at the same time.
As part of stripping out intrinsic support, delete a swathe of this code
from things in the Utils directory.
This is a large diff, but is mostly about removing functions that were
duplicated during the migration to debug records. I've taken a few opportunities
to replace comments about "intrinsics" with "records", and replace generic
lambdas with plain lambdas (I believe this makes it more readable).
All of this is chipping away at intrinsic-specific code until we get to removing
parts of findDbgUsers, which is the final boss -- we can't remove that until
almost everything else is gone.