llvm.org GIT mirror llvm / 3127680
Avoid including AlwaysInliner pass in opt-bisect search. Differential Revision: http://reviews.llvm.org/D19640 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270495 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Kaylor 3 years ago
3 changed file(s) with 13 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
6161 /// deal with that subset of the functions.
6262 bool removeDeadFunctions(CallGraph &CG, bool AlwaysInlineOnly = false);
6363
64 /// This function performs the main work of the pass. The default
65 /// of Inlinter::runOnSCC() calls skipSCC() before calling this method, but
66 /// derived classes which cannot be skipped can override that method and
67 /// call this function unconditionally.
68 bool inlineCalls(CallGraphSCC &SCC);
69
6470 private:
6571 // InsertLifetime - Insert @llvm.lifetime intrinsics.
6672 bool InsertLifetime;
4343 AlwaysInliner(bool InsertLifetime) : Inliner(ID, InsertLifetime) {
4444 initializeAlwaysInlinerPass(*PassRegistry::getPassRegistry());
4545 }
46
47 /// Main run interface method. We override here to avoid calling skipSCC().
48 bool runOnSCC(CallGraphSCC &SCC) override { return inlineCalls(SCC); }
4649
4750 static char ID; // Pass identification, replacement for typeid
4851
367367 bool Inliner::runOnSCC(CallGraphSCC &SCC) {
368368 if (skipSCC(SCC))
369369 return false;
370
370 return inlineCalls(SCC);
371 }
372
373 bool Inliner::inlineCalls(CallGraphSCC &SCC) {
371374 CallGraph &CG = getAnalysis().getCallGraph();
372375 ACT = &getAnalysis();
373376 auto &TLI = getAnalysis().getTLI();