Lines Matching refs:CS
122 static bool InlineCallIfPossible(CallSite CS, InlineFunctionInfo &IFI, in InlineCallIfPossible() argument
125 Function *Callee = CS.getCalledFunction(); in InlineCallIfPossible()
126 Function *Caller = CS.getCaller(); in InlineCallIfPossible()
130 if (!InlineFunction(CS, IFI, InsertLifetime)) in InlineCallIfPossible()
254 unsigned Inliner::getInlineThreshold(CallSite CS) const { in getInlineThreshold()
260 Function *Caller = CS.getCaller(); in getInlineThreshold()
269 Function *Callee = CS.getCalledFunction(); in getInlineThreshold()
290 static void emitAnalysis(CallSite CS, const Twine &Msg) { in emitAnalysis() argument
291 Function *Caller = CS.getCaller(); in emitAnalysis()
293 DebugLoc DLoc = CS.getInstruction()->getDebugLoc(); in emitAnalysis()
298 bool Inliner::shouldInline(CallSite CS) { in shouldInline() argument
299 InlineCost IC = getInlineCost(CS); in shouldInline()
303 << ", Call: " << *CS.getInstruction() << "\n"); in shouldInline()
304 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName()) + in shouldInline()
311 << ", Call: " << *CS.getInstruction() << "\n"); in shouldInline()
312 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName() + in shouldInline()
317 Function *Caller = CS.getCaller(); in shouldInline()
321 << ", Call: " << *CS.getInstruction() << "\n"); in shouldInline()
322 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName() + in shouldInline()
389 DEBUG(dbgs() << " NOT Inlining: " << *CS.getInstruction() << in shouldInline()
393 CS, Twine("Not inlining. Cost of inlining " + in shouldInline()
394 CS.getCalledFunction()->getName() + in shouldInline()
396 CS.getCaller()->getName() + " in other contexts")); in shouldInline()
403 << ", Call: " << *CS.getInstruction() << '\n'); in shouldInline()
405 CS, CS.getCalledFunction()->getName() + Twine(" can be inlined into ") + in shouldInline()
406 CS.getCaller()->getName() + " with cost=" + Twine(IC.getCost()) + in shouldInline()
457 CallSite CS(cast<Value>(I)); in runOnSCC() local
460 if (!CS || isa<IntrinsicInst>(I)) in runOnSCC()
466 if (CS.getCalledFunction() && CS.getCalledFunction()->isDeclaration()) in runOnSCC()
469 CallSites.push_back(std::make_pair(CS, -1)); in runOnSCC()
500 CallSite CS = CallSites[CSi].first; in runOnSCC() local
502 Function *Caller = CS.getCaller(); in runOnSCC()
503 Function *Callee = CS.getCalledFunction(); in runOnSCC()
509 if (isInstructionTriviallyDead(CS.getInstruction(), TLI)) { in runOnSCC()
511 << *CS.getInstruction() << "\n"); in runOnSCC()
513 CG[Caller]->removeCallEdgeFor(CS); in runOnSCC()
514 CS.getInstruction()->eraseFromParent(); in runOnSCC()
533 DebugLoc DLoc = CS.getInstruction()->getDebugLoc(); in runOnSCC()
537 if (!shouldInline(CS)) { in runOnSCC()
546 if (!InlineCallIfPossible(CS, InlineInfo, InlinedArrayAllocas, in runOnSCC()