summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-08-21 20:56:41 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-08-21 20:56:41 +0000
commitd410805d578b6425475dd852aac9610522f816e8 (patch)
tree2481c5c465d505d2bfcacfa2d75e5e5df2c2fbaa /llvm/lib/Transforms
parentda648ab8de3638ff82d6b9349c603b854a0224d6 (diff)
downloadbcm5719-llvm-d410805d578b6425475dd852aac9610522f816e8.tar.gz
bcm5719-llvm-d410805d578b6425475dd852aac9610522f816e8.zip
[Attributor] Use existing unreachable instead of introducing new ones
So far we split the unreachable off and placed a new one, this is not necessary. llvm-svn: 369575
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/Attributor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 16894d8e842..82a6eba1e89 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -1631,6 +1631,9 @@ struct AAIsDeadImpl : public AAIsDead {
Instruction *I = const_cast<Instruction *>(NRC);
BasicBlock *BB = I->getParent();
Instruction *SplitPos = I->getNextNode();
+ // TODO: mark stuff before unreachable instructions as dead.
+ if (isa_and_nonnull<UnreachableInst>(SplitPos))
+ continue;
if (auto *II = dyn_cast<InvokeInst>(I)) {
// If we keep the invoke the split position is at the beginning of the
OpenPOWER on IntegriCloud