diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2025-06-11 14:43:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-11 14:43:15 +0100 |
commit | c71a2e688828ab3ede4fb54168a674ff68396f61 (patch) | |
tree | b62f008e717b4233949489263ac349723d39dfdc /llvm/lib/IR/DebugInfo.cpp | |
parent | 6b0cb762af97579ca8ff5eea9be896169a1752b7 (diff) | |
download | llvm-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.cpp | 19 |
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). |