aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-03-04 21:24:04 +0000
committerDale Johannesen <dalej@apple.com>2009-03-04 21:24:04 +0000
commit6129e24e49f74f694575f9779055233fb1ab506e (patch)
tree1b347e1aab5ca3b4127f734c63dcece4d0bca869 /lib/Transforms
parent35033a5876aa27ea5729bc29b41bb4460a303cad (diff)
Re-commit 65975 and a fix for the problem that
was causing llvm-gcc to fail to build. I've verified it bootstraps now; good enough for me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index bdf8029b18..bfea2b2784 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/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());