diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2025-07-15 15:34:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-15 15:34:10 +0100 |
commit | 57a5f9c47e063701ac7d13a5efd993e839e148eb (patch) | |
tree | e0b6bac122d092b31be4f204c5998a8add1accc3 /llvm/lib/Transforms/Utils/Local.cpp | |
parent | 8db92a7d99f2b1a64d34c2fe3c295e555caa35f2 (diff) | |
download | llvm-57a5f9c47e063701ac7d13a5efd993e839e148eb.zip llvm-57a5f9c47e063701ac7d13a5efd993e839e148eb.tar.gz llvm-57a5f9c47e063701ac7d13a5efd993e839e148eb.tar.bz2 |
[DebugInfo][RemoveDIs] Suppress getNextNonDebugInfoInstruction (#144383)
There are no longer debug-info instructions, thus we don't need this
skipping. Horray!
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index 81d8537..ccdaca9 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -2660,12 +2660,12 @@ static bool rewriteDebugUsers( SmallPtrSet<DbgVariableIntrinsic *, 1> UndefOrSalvage; SmallPtrSet<DbgVariableRecord *, 1> UndefOrSalvageDVR; if (isa<Instruction>(&To)) { - bool DomPointAfterFrom = From.getNextNonDebugInstruction() == &DomPoint; + bool DomPointAfterFrom = From.getNextNode() == &DomPoint; for (auto *DII : Users) { // It's common to see a debug user between From and DomPoint. Move it // after DomPoint to preserve the variable update without any reordering. - if (DomPointAfterFrom && DII->getNextNonDebugInstruction() == &DomPoint) { + if (DomPointAfterFrom && DII->getNextNode() == &DomPoint) { LLVM_DEBUG(dbgs() << "MOVE: " << *DII << '\n'); DII->moveAfter(&DomPoint); Changed = true; @@ -2683,7 +2683,7 @@ static bool rewriteDebugUsers( Instruction *NextNonDebug = MarkedInstr; // The next instruction might still be a dbg.declare, skip over it. if (isa<DbgVariableIntrinsic>(NextNonDebug)) - NextNonDebug = NextNonDebug->getNextNonDebugInstruction(); + NextNonDebug = NextNonDebug->getNextNode(); if (DomPointAfterFrom && NextNonDebug == &DomPoint) { LLVM_DEBUG(dbgs() << "MOVE: " << *DVR << '\n'); @@ -3070,9 +3070,9 @@ static bool markAliveBlocks(Function &F, // If we found a call to a no-return function, insert an unreachable // instruction after it. Make sure there isn't *already* one there // though. - if (!isa<UnreachableInst>(CI->getNextNonDebugInstruction())) { + if (!isa<UnreachableInst>(CI->getNextNode())) { // Don't insert a call to llvm.trap right before the unreachable. - changeToUnreachable(CI->getNextNonDebugInstruction(), false, DTU); + changeToUnreachable(CI->getNextNode(), false, DTU); Changed = true; } break; |