Lines Matching defs:CS

99 static bool InlineCallIfPossible(Pass &P, CallSite CS, InlineFunctionInfo &IFI,
102 Function *Callee = CS.getCalledFunction();
103 Function *Caller = CS.getCaller();
115 if (!InlineFunction(CS, IFI, &AAR, InsertLifetime))
143 // When processing our SCC, check to see if CS was inlined from some other
246 unsigned Inliner::getInlineThreshold(CallSite CS) const {
252 Function *Caller = CS.getCaller();
260 Function *Callee = CS.getCalledFunction();
307 static void emitAnalysis(CallSite CS, const Twine &Msg) {
308 Function *Caller = CS.getCaller();
310 DebugLoc DLoc = CS.getInstruction()->getDebugLoc();
315 bool Inliner::shouldInline(CallSite CS) {
316 InlineCost IC = getInlineCost(CS);
320 << ", Call: " << *CS.getInstruction() << "\n");
321 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName()) +
328 << ", Call: " << *CS.getInstruction() << "\n");
329 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName() +
334 Function *Caller = CS.getCaller();
338 << ", Call: " << *CS.getInstruction() << "\n");
339 emitAnalysis(CS, Twine(CS.getCalledFunction()->getName() +
406 DEBUG(dbgs() << " NOT Inlining: " << *CS.getInstruction() <<
410 CS, Twine("Not inlining. Cost of inlining " +
411 CS.getCalledFunction()->getName() +
413 CS.getCaller()->getName() + " in other contexts"));
420 << ", Call: " << *CS.getInstruction() << '\n');
422 CS, CS.getCalledFunction()->getName() + Twine(" can be inlined into ") +
423 CS.getCaller()->getName() + " with cost=" + Twine(IC.getCost()) +
472 CallSite CS(cast<Value>(&I));
475 if (!CS || isa<IntrinsicInst>(I))
481 if (Function *Callee = CS.getCalledFunction())
485 CallSites.push_back(std::make_pair(CS, -1));
517 CallSite CS = CallSites[CSi].first;
519 Function *Caller = CS.getCaller();
520 Function *Callee = CS.getCalledFunction();
526 if (isInstructionTriviallyDead(CS.getInstruction(), &TLI)) {
528 << *CS.getInstruction() << "\n");
530 CG[Caller]->removeCallEdgeFor(CS);
531 CS.getInstruction()->eraseFromParent();
549 // Get DebugLoc to report. CS will be invalid after Inliner.
550 DebugLoc DLoc = CS.getInstruction()->getDebugLoc();
554 if (!shouldInline(CS)) {
563 if (!InlineCallIfPossible(*this, CS, InlineInfo, InlinedArrayAllocas,