aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.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/CodeGen/CodeGenPrepare.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/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 3792b45..43574a5 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -896,12 +896,7 @@ BasicBlock *CodeGenPrepare::findDestBlockOfMergeableEmptyBlock(BasicBlock *BB) {
BasicBlock::iterator BBI = BI->getIterator();
if (BBI != BB->begin()) {
--BBI;
- while (isa<DbgInfoIntrinsic>(BBI)) {
- if (BBI == BB->begin())
- break;
- --BBI;
- }
- if (!isa<DbgInfoIntrinsic>(BBI) && !isa<PHINode>(BBI))
+ if (!isa<PHINode>(BBI))
return nullptr;
}
@@ -2981,10 +2976,9 @@ bool CodeGenPrepare::dupRetToEnableTailCallOpts(BasicBlock *BB,
// Make sure there are no instructions between the first instruction
// and return.
BasicBlock::const_iterator BI = BB->getFirstNonPHIIt();
- // Skip over debug and the bitcast.
- while (isa<DbgInfoIntrinsic>(BI) || &*BI == BCI || &*BI == EVI ||
- isa<PseudoProbeInst>(BI) || isLifetimeEndOrBitCastFor(&*BI) ||
- isFakeUse(&*BI))
+ // Skip over pseudo-probes and the bitcast.
+ while (&*BI == BCI || &*BI == EVI || isa<PseudoProbeInst>(BI) ||
+ isLifetimeEndOrBitCastFor(&*BI) || isFakeUse(&*BI))
BI = std::next(BI);
if (&*BI != RetI)
return false;