diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-07-28 22:50:26 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-07-28 22:50:26 +0000 |
commit | 62f0aac99d5e3c6d2e23e002dd57d9a8f4e6cf2d (patch) | |
tree | d89b0c670cd72edbcc266cc3aaf82c1f2e2bfd57 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | cfc2a57fcdac7ba32ebbd8f4c4b571427ceaabed (diff) | |
download | bcm5719-llvm-62f0aac99d5e3c6d2e23e002dd57d9a8f4e6cf2d.tar.gz bcm5719-llvm-62f0aac99d5e3c6d2e23e002dd57d9a8f4e6cf2d.zip |
simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
llvm-svn: 109687
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 712deb467fb..4cd4e17f3d2 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -208,8 +208,8 @@ static bool AllCalleesPassInValidPointerForArgument(Argument *Arg) { // have direct callees. for (Value::use_iterator UI = Callee->use_begin(), E = Callee->use_end(); UI != E; ++UI) { - CallSite CS = CallSite::get(*UI); - assert(CS.getInstruction() && "Should only have direct calls!"); + CallSite CS(*UI); + assert(CS && "Should only have direct calls!"); if (!IsAlwaysValidPointer(CS.getArgument(ArgNo))) return false; @@ -619,14 +619,13 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Get a new callgraph node for NF. CallGraphNode *NF_CGN = CG.getOrInsertFunction(NF); - // Loop over all of the callers of the function, transforming the call sites // to pass in the loaded pointers. // SmallVector<Value*, 16> Args; while (!F->use_empty()) { - CallSite CS = CallSite::get(F->use_back()); + CallSite CS(F->use_back()); assert(CS.getCalledFunction() == F); Instruction *Call = CS.getInstruction(); const AttrListPtr &CallPAL = CS.getAttributes(); |