FunctionImport: add a progressive heuristic to limit importing too deep in the callgraph
authorMehdi Amini <mehdi.amini@apple.com>
Wed, 10 Feb 2016 23:31:45 +0000 (23:31 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Wed, 10 Feb 2016 23:31:45 +0000 (23:31 +0000)
commit40641748920391c7543b1edf3af8c71367582ab7
treefacb4e0ed9ed0295e7bb66803f3d00103ba2e24a
parentef762f2639825306f0fe0814e22d7139dfa88859
FunctionImport: add a progressive heuristic to limit importing too deep in the callgraph

The current function importer will walk the callgraph, importing
transitively any callee that is below the threshold. This can
lead to import very deep which is costly in compile time and not
necessarily beneficial as most of the inline would happen in
imported function and not necessarilly in user code.

The actual factor has been carefully chosen by flipping a coin ;)
Some tuning need to be done (just at the existing limiting threshold).

Reviewers: tejohnson

Differential Revision: http://reviews.llvm.org/D17082

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 260466
llvm/lib/Transforms/IPO/FunctionImport.cpp
llvm/test/Transforms/FunctionImport/Inputs/adjustable_threshold.ll [new file with mode: 0644]
llvm/test/Transforms/FunctionImport/adjustable_threshold.ll [new file with mode: 0644]