projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ded40a
)
Marking debug info intrinsics as not touching memory
author
Dale Johannesen
<dalej@apple.com>
Tue, 3 Mar 2009 23:30:00 +0000
(23:30 +0000)
committer
Dale Johannesen
<dalej@apple.com>
Tue, 3 Mar 2009 23:30:00 +0000
(23:30 +0000)
caused them to be considered trivially dead. Fix this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65979
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/Local.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/Local.cpp
b/lib/Transforms/Utils/Local.cpp
index 38809e5e1d7e3110eabc92e4d9e51ee5a49026cb..d2cbec0226e13a5c08ecc47cabbfa0de462f60cf 100644
(file)
--- a/
lib/Transforms/Utils/Local.cpp
+++ b/
lib/Transforms/Utils/Local.cpp
@@
-159,6
+159,9
@@
bool llvm::ConstantFoldTerminator(BasicBlock *BB) {
bool llvm::isInstructionTriviallyDead(Instruction *I) {
if (!I->use_empty() || isa<TerminatorInst>(I)) return false;
+ // We don't want debug info removed by anything this general.
+ if (isa<DbgInfoIntrinsic>(I)) return false;
+
if (!I->mayWriteToMemory())
return true;