projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f92877f
)
Cleanup
author
Chris Lattner
<sabre@nondot.org>
Wed, 15 Oct 2003 16:42:21 +0000
(16:42 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 15 Oct 2003 16:42:21 +0000
(16:42 +0000)
llvm-svn: 9133
llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
b/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
index
044cd16
..
18266fb
100644
(file)
--- a/
llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
+++ b/
llvm/lib/Transforms/Utils/DemoteRegToStack.cpp
@@
-122,11
+122,8
@@
static void AddLoadsAndStores(AllocaInst* XSlot, Instruction& X,
}
static void DeletePhis(PhiSet& phisToGo) {
- for (PhiSetIterator PI=phisToGo.begin(), PE=phisToGo.end(); PI != PE; ++PI) {
- assert((*PI)->use_size() == 0 && "This PHI should be DEAD!");
- (*PI)->getParent()->getInstList().remove(*PI);
- delete *PI;
- }
+ for (PhiSetIterator PI = phisToGo.begin(), PE =phisToGo.end(); PI != PE; ++PI)
+ (*PI)->getParent()->getInstList().erase(*PI);
phisToGo.clear();
}