diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-12 14:12:11 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-12 14:12:11 +0000 |
commit | 15445db11b77d9c20984b438b3237c9566eda309 (patch) | |
tree | fd8f9d3ca85dc43a12c27e27d424142bb96d6400 /llvm/lib/Transforms | |
parent | a5fa885d47f0afb4d691dab9920cfaeac069651f (diff) | |
download | bcm5719-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.cpp | 8 |
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 |