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:
1717760
)
Fix previous patch
author
Chris Lattner
<sabre@nondot.org>
Sat, 10 Apr 2004 07:27:48 +0000
(07:27 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 10 Apr 2004 07:27:48 +0000
(07:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12811
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/ADCE.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/ADCE.cpp
b/lib/Transforms/Scalar/ADCE.cpp
index 18c11c3adee12d82a41f3ebdb693b7767cbb9442..8adf630f91cd7d4ae1cbf1d0a8c629b17a835099 100644
(file)
--- a/
lib/Transforms/Scalar/ADCE.cpp
+++ b/
lib/Transforms/Scalar/ADCE.cpp
@@
-145,15
+145,13
@@
bool ADCE::dropReferencesOfDeadInstructionsInLiveBlock(BasicBlock *BB) {
//
PN->replaceAllUsesWith(Constant::getNullValue(PN->getType()));
- } else {
- if (isa<CallInst>(I))
- ++NumCallRemoved;
- else
- ++NumInstRemoved;
-
// Delete the instruction...
- BB->getInstList().erase(I++);
+ ++I;
+ BB->getInstList().erase(PN);
Changed = true;
+ ++NumInstRemoved;
+ } else {
+ ++I;
}
} else {
++I;