diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/ADCE.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ADCE.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp index bdf8029b18e..bfea2b27841 100644 --- a/llvm/lib/Transforms/Scalar/ADCE.cpp +++ b/llvm/lib/Transforms/Scalar/ADCE.cpp @@ -18,6 +18,7 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/BasicBlock.h" #include "llvm/Instructions.h" +#include "llvm/IntrinsicInst.h" #include "llvm/Pass.h" #include "llvm/Support/CFG.h" #include "llvm/Support/Compiler.h" @@ -55,6 +56,7 @@ bool ADCE::runOnFunction(Function& F) { // Collect the set of "root" instructions that are known live. for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) if (isa<TerminatorInst>(I.getInstructionIterator()) || + isa<DbgInfoIntrinsic>(I.getInstructionIterator()) || I->mayWriteToMemory()) { alive.insert(I.getInstructionIterator()); worklist.push_back(I.getInstructionIterator()); |

