[PATCH] D19640: Update opt-bisect code to avoid skipping AlwaysInliner

Andy Kaylor via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 09:37:09 PDT 2016


andrew.w.kaylor added a comment.

In http://reviews.llvm.org/D19640#436283, @MatzeB wrote:

> I think we can achieve this without a virtual function by refactoring all the code inside Inliner::runOnScc() that comes below the skipSCC() check into an own function. The AlwaysInliner pass can then just override runOnSCC() which calls this common function but contrary to Inliner::runOnSCC() without checking skipSCC().


So you're thinking something like this?

  bool Inliner::runOnSCC(CallGraphSCC &SCC) {
    if (skipSCC(SCC))
      return false;
  
    return inlineCalls(SCC);
  }
  
  bool AlwaysInliner::runOnSCC(CallGraphSCC &SCC) {
    return inlineCalls(SCC);
  }

Alternatively, I could just add a "canSkipPass()" virtual method to Inliner, but I suppose the above is consistent with the way that passes are being migrated to the new pass manager.


Repository:
  rL LLVM

http://reviews.llvm.org/D19640





More information about the llvm-commits mailing list