[ThinLTO] Add an option to force summary call edges cold for debugging
Summary: Useful to selectively disable importing into specific modules for debugging/triaging/workarounds. Reviewers: eraman Subscribers: inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D45062 llvm-svn: 328909
This commit is contained in:
@@ -89,6 +89,9 @@ static cl::opt<unsigned>
|
||||
cl::opt<bool> WriteRelBFToSummary(
|
||||
"write-relbf-to-summary", cl::Hidden, cl::init(false),
|
||||
cl::desc("Write relative block frequency to function summary "));
|
||||
|
||||
extern FunctionSummary::ForceSummaryHotnessType ForceSummaryEdgesCold;
|
||||
|
||||
namespace {
|
||||
|
||||
/// These are manifest constants used by the bitcode writer. They do not need to
|
||||
@@ -3436,7 +3439,8 @@ void ModuleBitcodeWriterBase::writePerModuleFunctionSummaryRecord(
|
||||
for (auto &RI : FS->refs())
|
||||
NameVals.push_back(VE.getValueID(RI.getValue()));
|
||||
|
||||
bool HasProfileData = F.hasProfileData();
|
||||
bool HasProfileData =
|
||||
F.hasProfileData() || ForceSummaryEdgesCold != FunctionSummary::FSHT_None;
|
||||
for (auto &ECI : FS->calls()) {
|
||||
NameVals.push_back(getValueId(ECI.first));
|
||||
if (HasProfileData)
|
||||
|
||||
Reference in New Issue
Block a user