[llvm-commits] [llvm] r132797 - in /llvm/trunk: include/llvm/Analysis/CallGraph.h lib/Analysis/IPA/CallGraph.cpp lib/Analysis/IPA/CallGraphSCCPass.cpp lib/Transforms/Utils/InlineFunction.cpp

John McCall rjmccall at apple.com
Mon Jun 13 19:57:48 PDT 2011


On Jun 10, 2011, at 5:32 PM, Devang Patel wrote:
> On Jun 9, 2011, at 12:46 PM, John McCall wrote:
>> @@ -547,15 +535,7 @@
>>    ConstantInt::get(Type::getInt32Ty(Context), 1),
>>    ConstantInt::getFalse(Context) // isVolatile
>>  };
>> -  CallInst *TheMemCpy =
>> -    CallInst::Create(MemCpyFn, CallArgs, CallArgs+5, "", TheCall);
>> -  
>> -  // If we have a call graph, update it.
>> -  if (CallGraph *CG = IFI.CG) {
>> -    CallGraphNode *MemCpyCGN = CG->getOrInsertFunction(MemCpyFn);
>> -    CallGraphNode *CallerNode = (*CG)[Caller];
>> -    CallerNode->addCalledFunction(TheMemCpy, MemCpyCGN);
>> -  }
>> +  CallInst::Create(MemCpyFn, CallArgs, CallArgs+5, "", TheCall);
> 
> Please use IRBuilder so that we can have appropriate line number information attached with new instruction.

Done in r132961.

John.




More information about the llvm-commits mailing list