projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
27d404c
)
Fix DemoteRegToStack on an invoke. This fixes PR634.
author
Chris Lattner
<sabre@nondot.org>
Tue, 4 Oct 2005 00:44:01 +0000
(
00:44
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 4 Oct 2005 00:44:01 +0000
(
00:44
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23618
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/DemoteRegToStack.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/DemoteRegToStack.cpp
b/lib/Transforms/Utils/DemoteRegToStack.cpp
index bbf998d790c4136266d6d58a61fa63ef3bce8b4a..3eadfa7694af64f46ccc84bfcf1f450a2fbbc3de 100644
(file)
--- a/
lib/Transforms/Utils/DemoteRegToStack.cpp
+++ b/
lib/Transforms/Utils/DemoteRegToStack.cpp
@@
-77,6
+77,7
@@
AllocaInst* llvm::DemoteRegToStack(Instruction &I, bool VolatileLoads) {
BasicBlock::iterator InsertPt;
if (!isa<TerminatorInst>(I)) {
InsertPt = &I;
+ ++InsertPt;
} else {
// We cannot demote invoke instructions to the stack if their normal edge
// is critical.
@@
-86,7
+87,7
@@
AllocaInst* llvm::DemoteRegToStack(Instruction &I, bool VolatileLoads) {
InsertPt = II.getNormalDest()->begin();
}
- for (
++InsertPt
; isa<PHINode>(InsertPt); ++InsertPt)
+ for (; isa<PHINode>(InsertPt); ++InsertPt)
/* empty */; // Don't insert before any PHI nodes.
new StoreInst(&I, Slot, InsertPt);