summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-07-12 14:12:11 +0000
committerGabor Greif <ggreif@gmail.com>2010-07-12 14:12:11 +0000
commit15445db11b77d9c20984b438b3237c9566eda309 (patch)
treefd8f9d3ca85dc43a12c27e27d424142bb96d6400 /llvm/lib/Transforms
parenta5fa885d47f0afb4d691dab9920cfaeac069651f (diff)
downloadbcm5719-llvm-15445db11b77d9c20984b438b3237c9566eda309.tar.gz
bcm5719-llvm-15445db11b77d9c20984b438b3237c9566eda309.zip
cache results of operator*
llvm-svn: 108143
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/LowerSetJmp.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
index 53128366af6..76cfef8335c 100644
--- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -406,12 +406,14 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst)
// Loop over all of the uses of instruction. If any of them are after the
// call, "spill" the value to the stack.
for (Value::use_iterator UI = II->use_begin(), E = II->use_end();
- UI != E; ++UI)
- if (cast<Instruction>(*UI)->getParent() != ABlock ||
- InstrsAfterCall.count(cast<Instruction>(*UI))) {
+ UI != E; ++UI) {
+ User *U = *UI;
+ if (cast<Instruction>(U)->getParent() != ABlock ||
+ InstrsAfterCall.count(cast<Instruction>(U))) {
DemoteRegToStack(*II);
break;
}
+ }
InstrsAfterCall.clear();
// Change the setjmp call into a branch statement. We'll remove the
OpenPOWER on IntegriCloud