aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2025-06-11 14:43:15 +0100
committerGitHub <noreply@github.com>2025-06-11 14:43:15 +0100
commitc71a2e688828ab3ede4fb54168a674ff68396f61 (patch)
treeb62f008e717b4233949489263ac349723d39dfdc /llvm/lib/IR/DebugInfo.cpp
parent6b0cb762af97579ca8ff5eea9be896169a1752b7 (diff)
downloadllvm-c71a2e688828ab3ede4fb54168a674ff68396f61.zip
llvm-c71a2e688828ab3ede4fb54168a674ff68396f61.tar.gz
llvm-c71a2e688828ab3ede4fb54168a674ff68396f61.tar.bz2
[DebugInfo][RemoveDIs] Remove some debug intrinsic-only codepaths (#143451)
These are opportunistic deletions as more places that make use of the IsNewDbgInfoFormat flag are removed. It should (TM)(R) all be dead code now that `IsNewDbgInfoFormat` should be true everywhere. FastISel: we don't need to do debug-aware instruction counting any more, because there are no debug instructions, Autoupgrade: you can no-longer avoid autoupgrading of intrinsics to records DIBuilder: Delete the code for creating debug intrinsics (!) LoopUtils: No need to handle debug instructions, they don't exist
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 7db9891..2a84e7b 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -2123,22 +2123,11 @@ static void emitDbgAssign(AssignmentInfo Info, Value *Val, Value *Dest,
Expr = *R;
}
DIExpression *AddrExpr = DIExpression::get(StoreLikeInst.getContext(), {});
- if (StoreLikeInst.getParent()->IsNewDbgInfoFormat) {
- auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
- &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
- (void)Assign;
- LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
- return;
- }
- auto Assign = DIB.insertDbgAssign(&StoreLikeInst, Val, VarRec.Var, Expr, Dest,
- AddrExpr, VarRec.DL);
+ auto *Assign = DbgVariableRecord::createLinkedDVRAssign(
+ &StoreLikeInst, Val, VarRec.Var, Expr, Dest, AddrExpr, VarRec.DL);
(void)Assign;
- LLVM_DEBUG(if (!Assign.isNull()) {
- if (const auto *Record = dyn_cast<DbgRecord *>(Assign))
- errs() << " > INSERT: " << *Record << "\n";
- else
- errs() << " > INSERT: " << *cast<Instruction *>(Assign) << "\n";
- });
+ LLVM_DEBUG(if (Assign) errs() << " > INSERT: " << *Assign << "\n");
+ return;
}
#undef DEBUG_TYPE // Silence redefinition warning (from ConstantsContext.h).