summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO
diff options
context:
space:
mode:
authorBob Haarman <llvm@inglorion.net>2018-03-08 01:13:10 +0000
committerBob Haarman <llvm@inglorion.net>2018-03-08 01:13:10 +0000
commitfb2d34229941a32666bec8ca96ba3beb703ed188 (patch)
treeaa6b1f982e68ede55cfcfab5e41699a5962ce033 /llvm/lib/LTO
parent8d485b845b1dc8cdd78c7c4028be94f2abadbf50 (diff)
downloadbcm5719-llvm-fb2d34229941a32666bec8ca96ba3beb703ed188.tar.gz
bcm5719-llvm-fb2d34229941a32666bec8ca96ba3beb703ed188.zip
Revert "[LTO] Support filtering by hotness threshold"
This reverts commit 1f3bd185c53beb6aa68446974b7e80837abd6ef0 (r326107) because it fails ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll. llvm-svn: 326975
Diffstat (limited to 'llvm/lib/LTO')
-rw-r--r--llvm/lib/LTO/LTO.cpp10
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp3
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp9
-rw-r--r--llvm/lib/LTO/ThinLTOCodeGenerator.cpp4
4 files changed, 7 insertions, 19 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index 58b1cd01b2a..e9ac314e7c8 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -1202,10 +1202,10 @@ Error LTO::runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache) {
return BackendProc->wait();
}
-Expected<std::unique_ptr<ToolOutputFile>> lto::setupOptimizationRemarks(
- LLVMContext &Context, StringRef LTORemarksFilename,
- bool LTOPassRemarksWithHotness, unsigned LTOPassRemarksHotnessThreshold,
- int Count) {
+Expected<std::unique_ptr<ToolOutputFile>>
+lto::setupOptimizationRemarks(LLVMContext &Context,
+ StringRef LTORemarksFilename,
+ bool LTOPassRemarksWithHotness, int Count) {
if (LTORemarksFilename.empty())
return nullptr;
@@ -1222,8 +1222,6 @@ Expected<std::unique_ptr<ToolOutputFile>> lto::setupOptimizationRemarks(
llvm::make_unique<yaml::Output>(DiagnosticFile->os()));
if (LTOPassRemarksWithHotness)
Context.setDiagnosticsHotnessRequested(true);
- if (LTOPassRemarksHotnessThreshold)
- Context.setDiagnosticsHotnessThreshold(LTOPassRemarksHotnessThreshold);
DiagnosticFile->keep();
return std::move(DiagnosticFile);
}
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 4607444e7f1..074a3986015 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -376,8 +376,7 @@ Error lto::backend(Config &C, AddStreamFn AddStream,
// Setup optimization remarks.
auto DiagFileOrErr = lto::setupOptimizationRemarks(
- Mod->getContext(), C.RemarksFilename, C.RemarksWithHotness,
- C.RemarksHotnessThreshold);
+ Mod->getContext(), C.RemarksFilename, C.RemarksWithHotness);
if (!DiagFileOrErr)
return DiagFileOrErr.takeError();
auto DiagnosticOutputFile = std::move(*DiagFileOrErr);
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 939d12a20be..ffe9af74cdc 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -89,12 +89,6 @@ cl::opt<bool> LTOPassRemarksWithHotness(
"lto-pass-remarks-with-hotness",
cl::desc("With PGO, include profile count in optimization remarks"),
cl::Hidden);
-
-cl::opt<unsigned> LTOPassRemarksHotnessThreshold(
- "lto-pass-remarks-hotness-threshold",
- cl::desc("Minimum profile count required for an optimization remark to be "
- "output"),
- cl::Hidden);
}
LTOCodeGenerator::LTOCodeGenerator(LLVMContext &Context)
@@ -511,8 +505,7 @@ bool LTOCodeGenerator::optimize(bool DisableVerify, bool DisableInline,
return false;
auto DiagFileOrErr = lto::setupOptimizationRemarks(
- Context, LTORemarksFilename, LTOPassRemarksWithHotness,
- LTOPassRemarksHotnessThreshold);
+ Context, LTORemarksFilename, LTOPassRemarksWithHotness);
if (!DiagFileOrErr) {
errs() << "Error: " << toString(DiagFileOrErr.takeError()) << "\n";
report_fatal_error("Can't get an output file for the remarks");
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index b3e30b6a4cd..92cc2450773 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -63,7 +63,6 @@ namespace llvm {
extern cl::opt<bool> LTODiscardValueNames;
extern cl::opt<std::string> LTORemarksFilename;
extern cl::opt<bool> LTOPassRemarksWithHotness;
-extern cl::opt<unsigned> LTOPassRemarksHotnessThreshold;
}
namespace {
@@ -999,8 +998,7 @@ void ThinLTOCodeGenerator::run() {
Context.setDiscardValueNames(LTODiscardValueNames);
Context.enableDebugTypeODRUniquing();
auto DiagFileOrErr = lto::setupOptimizationRemarks(
- Context, LTORemarksFilename, LTOPassRemarksWithHotness,
- LTOPassRemarksHotnessThreshold, count);
+ Context, LTORemarksFilename, LTOPassRemarksWithHotness, count);
if (!DiagFileOrErr) {
errs() << "Error: " << toString(DiagFileOrErr.takeError()) << "\n";
report_fatal_error("ThinLTO: Can't get an output file for the "
OpenPOWER on IntegriCloud