diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionImport.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionImport.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index 7446a7d0f47..c9d008ebd38 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -130,6 +130,10 @@ static bool eligibleForImport(const ModuleSummaryIndex &Index, // FIXME: we may be able to import it by copying it without promotion. return false; + // Don't import functions that are not viable to inline. + if (Summary.isNotViableToInline()) + return false; + // Check references (and potential calls) in the same module. If the current // value references a global that can't be externally referenced it is not // eligible for import. |