From: Gabor Greif Date: Mon, 12 Jul 2010 14:14:03 +0000 (+0000) Subject: cache result of operator* X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=65b9212d344d97f7305f61048c1c87bd5ffa0c32;p=oota-llvm.git cache result of operator* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108145 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index df2456f9f2b..e4db235b1d1 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(*UI)) continue; + if (isa(U)) continue; // Used by a non-instruction, or not the callee of a function, do not // transform. - if (!isa(*UI) && !isa(*UI)) + if (!isa(U) && !isa(U)) return false; - CallSite CS = CallSite::get(cast(*UI)); + CallSite CS = CallSite::get(cast(U)); if (!CS.isCallee(UI)) return false;