diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-17 23:45:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-17 23:45:06 +0000 |
commit | c7ff6c8029ac3595e87ea80ad7a08eafbcca52b1 (patch) | |
tree | 45e520197a657957e1d9cb0e124d21ffd1b843db /lib/Transforms/Scalar/ADCE.cpp | |
parent | 559069d46d2d1f7a8fc53c72bd8c54d28cd7aa0d (diff) | |
download | external_llvm-c7ff6c8029ac3595e87ea80ad7a08eafbcca52b1.zip external_llvm-c7ff6c8029ac3595e87ea80ad7a08eafbcca52b1.tar.gz external_llvm-c7ff6c8029ac3595e87ea80ad7a08eafbcca52b1.tar.bz2 |
Getting ADCE to interact well with unreachable instructions seems like a nontrivial
exercise that I'm not interested in tackling right now. Just punt and treat them
like unwind's.
This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17106 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/ADCE.cpp')
-rw-r--r-- | lib/Transforms/Scalar/ADCE.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp index e1f228d..22b4c34 100644 --- a/lib/Transforms/Scalar/ADCE.cpp +++ b/lib/Transforms/Scalar/ADCE.cpp @@ -233,8 +233,9 @@ bool ADCE::doADCE() { markInstructionLive(I); } } else if (I->mayWriteToMemory() || isa<ReturnInst>(I) || - isa<UnwindInst>(I)) { - // Unreachable instructions are not marked intrinsically live here. + isa<UnwindInst>(I) || isa<UnreachableInst>(I)) { + // FIXME: Unreachable instructions should not be marked intrinsically + // live here. markInstructionLive(I); } else if (isInstructionTriviallyDead(I)) { // Remove the instruction from it's basic block... |