Home | History | Annotate | Download | only in IPO

Lines Matching refs:CS

78 static bool InlineCallIfPossible(Pass &P, CallSite CS, InlineFunctionInfo &IFI,
81 Function *Callee = CS.getCalledFunction();
82 Function *Caller = CS.getCaller();
94 if (!InlineFunction(CS, IFI, &AAR, InsertLifetime))
122 // When processing our SCC, check to see if CS was inlined from some other
225 static void emitAnalysis(CallSite CS, const Twine &Msg) {
226 Function *Caller = CS.getCaller();
228 DebugLoc DLoc = CS.getInstruction()->getDebugLoc();
232 bool Inliner::shouldBeDeferred(Function *Caller, CallSite CS, InlineCost IC,
303 bool Inliner::shouldInline(CallSite CS) {
304 InlineCost IC = getInlineCost(CS);
308 << ", Call: " << *CS.getInstruction() << "\n");
309 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName()) +
316 << ", Call: " << *CS.getInstruction() << "\n");
317 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName() +
322 Function *Caller = CS.getCaller();
326 << ", Call: " << *CS.getInstruction() << "\n");
327 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName() +
335 if (shouldBeDeferred(Caller, CS, IC, TotalSecondaryCost)) {
336 DEBUG(dbgs() << " NOT Inlining: " << *CS.getInstruction()
339 emitAnalysis(CS, Twine("Not inlining. Cost of inlining " +
340 CS.getCalledFunction()->getName() +
342 CS.getCaller()->getName() + " in other contexts"));
348 << ", Call: " << *CS.getInstruction() << '\n');
350 CS, CS.getCalledFunction()->getName() + Twine(" can be inlined into ") +
351 CS.getCaller()->getName() + " with cost=" + Twine(IC.getCost()) +
407 CallSite CS(cast<Value>(&I));
410 if (!CS || isa<IntrinsicInst>(I))
416 if (Function *Callee = CS.getCalledFunction())
420 CallSites.push_back(std::make_pair(CS, -1));
452 CallSite CS = CallSites[CSi].first;
454 Function *Caller = CS.getCaller();
455 Function *Callee = CS.getCalledFunction();
461 if (isInstructionTriviallyDead(CS.getInstruction(), &TLI)) {
463 << *CS.getInstruction() << "\n");
465 CG[Caller]->removeCallEdgeFor(CS);
466 CS.getInstruction()->eraseFromParent();
484 // Get DebugLoc to report. CS will be invalid after Inliner.
485 DebugLoc DLoc = CS.getInstruction()->getDebugLoc();
489 if (!shouldInline(CS)) {
498 if (!InlineCallIfPossible(*this, CS, InlineInfo, InlinedArrayAllocas,