diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-12 14:14:03 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-12 14:14:03 +0000 |
commit | 65b9212d344d97f7305f61048c1c87bd5ffa0c32 (patch) | |
tree | d75f2039813ad57506989f9c797c855d89ee56c1 /lib/Transforms | |
parent | aaaaa02a93d3815d4cde97071ed354acc64ec6f6 (diff) | |
download | external_llvm-65b9212d344d97f7305f61048c1c87bd5ffa0c32.zip external_llvm-65b9212d344d97f7305f61048c1c87bd5ffa0c32.tar.gz external_llvm-65b9212d344d97f7305f61048c1c87bd5ffa0c32.tar.bz2 |
cache result of operator*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108145 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/IPConstantPropagation.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index df2456f..e4db235 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -85,15 +85,16 @@ bool IPCP::PropagateConstantsIntoArguments(Function &F) { unsigned NumNonconstant = 0; for (Value::use_iterator UI = F.use_begin(), E = F.use_end(); UI != E; ++UI) { + User *U = *UI; // Ignore blockaddress uses. - if (isa<BlockAddress>(*UI)) continue; + if (isa<BlockAddress>(U)) continue; // Used by a non-instruction, or not the callee of a function, do not // transform. - if (!isa<CallInst>(*UI) && !isa<InvokeInst>(*UI)) + if (!isa<CallInst>(U) && !isa<InvokeInst>(U)) return false; - CallSite CS = CallSite::get(cast<Instruction>(*UI)); + CallSite CS = CallSite::get(cast<Instruction>(U)); if (!CS.isCallee(UI)) return false; |