liberty/lib/LAMP/LAMPLoopSample.cpp
/* Given a single instruction, replace the call with the proper
   * call to the __nolamp_ version
   */
Given a single instruction, replace the call with the proper
call to the __nolamp_ version
Given a single instruction replace the call with the proper call to the __nolamp_ version
void LAMPLoopSample::replaceCall(Module &M, Instruction *inst)
  {
    CallSite call = CallSite(inst);
    Function *f = call.getCalledFunction();
    if(!f->isDeclaration() && !f->isIntrinsic() && !f->hasAvailableExternallyLinkage() )
    {
      Function *clone = funcMap[f];
      call.setCalledFunction(clone);
    }
  }
void LAMPLoopSample :: replaceCall ( Module & M , Instruction * inst ) { CallSite call = CallSite ( inst ) ; Function * f = call . getCalledFunction ( ) ; if ( ! f -> isDeclaration ( ) && ! f -> isIntrinsic ( ) && ! f -> hasAvailableExternallyLinkage ( ) ) { Function * clone = funcMap [ f ] ; call . setCalledFunction ( clone ) ; } }
Given a single instruction, replace the call with the proper
 call to the __nolamp_ version
Given a single instruction replace the call with the proper call to the __nolamp_ version
// If this is a function we have source for, change call to __nolamp_ version