diff options
author | Teresa Johnson <tejohnson@google.com> | 2018-11-06 19:41:35 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2018-11-06 19:41:35 +0000 |
commit | cb397461e1b5d99072931a309cc8903faac6db26 (patch) | |
tree | 6c1666bef906e0da6128ad8169a6fc06709de100 /llvm/lib/IR/ModuleSummaryIndex.cpp | |
parent | d768ecf5a7a88c5ea7dc7201447742e9c8624b3b (diff) | |
download | bcm5719-llvm-cb397461e1b5d99072931a309cc8903faac6db26.tar.gz bcm5719-llvm-cb397461e1b5d99072931a309cc8903faac6db26.zip |
[ThinLTO] Split NotEligibleToImport into legality and inlinability flags
Summary:
The NotEligibleToImport flag on the GlobalValueSummary was set if it
isn't legal to import (e.g. because it references unpromotable locals)
and when it can't be inlined (in which case importing is pointless).
I split out the inlinable piece into a separate flag on the
FunctionSummary (doesn't make sense for aliases or global variables),
because in the future we may want to import for reasons other than
inlining.
Reviewers: davidxl
Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, arphaman, llvm-commits
Differential Revision: https://reviews.llvm.org/D53345
llvm-svn: 346261
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
-rw-r--r-- | llvm/lib/IR/ModuleSummaryIndex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp index e63407c3e75..8d85f7901b0 100644 --- a/llvm/lib/IR/ModuleSummaryIndex.cpp +++ b/llvm/lib/IR/ModuleSummaryIndex.cpp @@ -182,8 +182,9 @@ static std::string linkageToString(GlobalValue::LinkageTypes LT) { static std::string fflagsToString(FunctionSummary::FFlags F) { auto FlagValue = [](unsigned V) { return V ? '1' : '0'; }; - char FlagRep[] = {FlagValue(F.ReadNone), FlagValue(F.ReadOnly), - FlagValue(F.NoRecurse), FlagValue(F.ReturnDoesNotAlias), 0}; + char FlagRep[] = {FlagValue(F.ReadNone), FlagValue(F.ReadOnly), + FlagValue(F.NoRecurse), FlagValue(F.ReturnDoesNotAlias), + FlagValue(F.NoInline), 0}; return FlagRep; } |