summaryrefslogtreecommitdiffstats
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
commitdf4226c0e221cbd96d54defd4e61349ff06a0abc (patch)
treee7bd39c9a6528a79ab5c01446a13224945e609a6
parent4fdd042d9ead3d2143cb9169108314dfb52d151c (diff)
downloadbcm5719-llvm-df4226c0e221cbd96d54defd4e61349ff06a0abc.tar.gz
bcm5719-llvm-df4226c0e221cbd96d54defd4e61349ff06a0abc.zip
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. llvm-svn: 66073
-rw-r--r--llvm/include/llvm/Intrinsics.td2
-rw-r--r--llvm/lib/Transforms/Scalar/ADCE.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/Intrinsics.td b/llvm/include/llvm/Intrinsics.td
index 7c62096e5aa..6d008f3e3bf 100644
--- a/llvm/include/llvm/Intrinsics.td
+++ b/llvm/include/llvm/Intrinsics.td
@@ -261,6 +261,7 @@ let Properties = [IntrNoMem] in {
//
// None of these intrinsics accesses memory at all.
+let Properties = [IntrNoMem] in {
def int_dbg_stoppoint : Intrinsic<[llvm_void_ty],
[llvm_i32_ty, llvm_i32_ty,
llvm_descriptor_ty]>;
@@ -269,6 +270,7 @@ let Properties = [IntrNoMem] in {
def int_dbg_func_start : Intrinsic<[llvm_void_ty], [llvm_descriptor_ty]>;
def int_dbg_declare : Intrinsic<[llvm_void_ty],
[llvm_descriptor_ty, llvm_descriptor_ty]>;
+}
//===------------------ Exception Handling Intrinsics----------------------===//
//
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());
OpenPOWER on IntegriCloud