diff options
author | Jeremy Morse <jeremy.morse@sony.com> | 2025-06-17 15:55:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-17 15:55:14 +0100 |
commit | 9eb0020555fc643582b2802abb8c1bc92059c248 (patch) | |
tree | 3b96308747d3865fdb209f227e2315d7c7d63709 /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | |
parent | 7ec103a984ff114d24f26d935fe2292379269b53 (diff) | |
download | llvm-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/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index 70afd41..24fe08d 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -182,8 +182,7 @@ SCEVExpander::GetOptimalInsertionPointForCastOf(Value *V) const { BasicBlock::iterator IP = A->getParent()->getEntryBlock().begin(); while ((isa<BitCastInst>(IP) && isa<Argument>(cast<BitCastInst>(IP)->getOperand(0)) && - cast<BitCastInst>(IP)->getOperand(0) != A) || - isa<DbgInfoIntrinsic>(IP)) + cast<BitCastInst>(IP)->getOperand(0) != A)) ++IP; return IP; } @@ -278,11 +277,6 @@ Value *SCEVExpander::InsertBinop(Instruction::BinaryOps Opcode, if (IP != BlockBegin) { --IP; for (; ScanLimit; --IP, --ScanLimit) { - // Don't count dbg.value against the ScanLimit, to avoid perturbing the - // generated code. - if (isa<DbgInfoIntrinsic>(IP)) - ScanLimit++; - auto canGenerateIncompatiblePoison = [&Flags](Instruction *I) { // Ensure that no-wrap flags match. if (isa<OverflowingBinaryOperator>(I)) { @@ -382,10 +376,6 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *Offset, Value *V, if (IP != BlockBegin) { --IP; for (; ScanLimit; --IP, --ScanLimit) { - // Don't count dbg.value against the ScanLimit, to avoid perturbing the - // generated code. - if (isa<DbgInfoIntrinsic>(IP)) - ScanLimit++; if (auto *GEP = dyn_cast<GetElementPtrInst>(IP)) { if (GEP->getPointerOperand() == V && GEP->getSourceElementType() == Builder.getInt8Ty() && @@ -1545,8 +1535,7 @@ Value *SCEVExpander::expand(const SCEV *S) { InsertPt = L->getHeader()->getFirstInsertionPt(); while (InsertPt != Builder.GetInsertPoint() && - (isInsertedInstruction(&*InsertPt) || - isa<DbgInfoIntrinsic>(&*InsertPt))) { + (isInsertedInstruction(&*InsertPt))) { InsertPt = std::next(InsertPt); } break; |