aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Debugify.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2025-06-17 15:55:14 +0100
committerGitHub <noreply@github.com>2025-06-17 15:55:14 +0100
commit9eb0020555fc643582b2802abb8c1bc92059c248 (patch)
tree3b96308747d3865fdb209f227e2315d7c7d63709 /llvm/lib/Transforms/Utils/Debugify.cpp
parent7ec103a984ff114d24f26d935fe2292379269b53 (diff)
downloadllvm-9eb0020555fc643582b2802abb8c1bc92059c248.zip
llvm-9eb0020555fc643582b2802abb8c1bc92059c248.tar.gz
llvm-9eb0020555fc643582b2802abb8c1bc92059c248.tar.bz2
[DebugInfo][RemoveDIs] Remove a swathe of debug-intrinsic code (#144389)
Seeing how we can't generate any debug intrinsics any more: delete a variety of codepaths where they're handled. For the most part these are plain deletions, in others I've tweaked comments to remain coherent, or added a type to (what was) type-generic-lambdas. This isn't all the DbgInfoIntrinsic call sites but it's most of the simple scenarios. Co-authored-by: Nikita Popov <github@npopov.com>
Diffstat (limited to 'llvm/lib/Transforms/Utils/Debugify.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/Debugify.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Utils/Debugify.cpp b/llvm/lib/Transforms/Utils/Debugify.cpp
index ff8a91b..c2dbdc5 100644
--- a/llvm/lib/Transforms/Utils/Debugify.cpp
+++ b/llvm/lib/Transforms/Utils/Debugify.cpp
@@ -353,7 +353,7 @@ bool llvm::collectDebugInfoMetadata(Module &M,
// Cllect dbg.values and dbg.declare.
if (DebugifyLevel > Level::Locations) {
- auto HandleDbgVariable = [&](auto *DbgVar) {
+ auto HandleDbgVariable = [&](DbgVariableRecord *DbgVar) {
if (!SP)
return;
// Skip inlined variables.
@@ -368,14 +368,8 @@ bool llvm::collectDebugInfoMetadata(Module &M,
};
for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange()))
HandleDbgVariable(&DVR);
- if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I))
- HandleDbgVariable(DVI);
}
- // Skip debug instructions other than dbg.value and dbg.declare.
- if (isa<DbgInfoIntrinsic>(&I))
- continue;
-
LLVM_DEBUG(dbgs() << " Collecting info for inst: " << I << '\n');
DebugInfoBeforePass.InstToDelete.insert({&I, &I});
@@ -597,7 +591,7 @@ bool llvm::checkDebugInfoMetadata(Module &M,
// Collect dbg.values and dbg.declares.
if (DebugifyLevel > Level::Locations) {
- auto HandleDbgVariable = [&](auto *DbgVar) {
+ auto HandleDbgVariable = [&](DbgVariableRecord *DbgVar) {
if (!SP)
return;
// Skip inlined variables.
@@ -612,14 +606,8 @@ bool llvm::checkDebugInfoMetadata(Module &M,
};
for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange()))
HandleDbgVariable(&DVR);
- if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I))
- HandleDbgVariable(DVI);
}
- // Skip debug instructions other than dbg.value and dbg.declare.
- if (isa<DbgInfoIntrinsic>(&I))
- continue;
-
LLVM_DEBUG(dbgs() << " Collecting info for inst: " << I << '\n');
DebugInfoAfterPass.DILocations.insert({&I, hasLoc(I)});