summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-lto2/llvm-lto2.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2018-04-20 10:18:36 +0000
committerFlorian Hahn <florian.hahn@arm.com>2018-04-20 10:18:36 +0000
commitd4332eb3b792f614d77d4e2a07e71a8cb42267a2 (patch)
tree1d1adb8ccc06bafe4e020006c2bfa609dbd356c5 /llvm/tools/llvm-lto2/llvm-lto2.cpp
parent4d79c580ce0dba69b240fb24110ff0dd88911cb4 (diff)
downloadbcm5719-llvm-d4332eb3b792f614d77d4e2a07e71a8cb42267a2.tar.gz
bcm5719-llvm-d4332eb3b792f614d77d4e2a07e71a8cb42267a2.zip
[LTO] Add stats-file option to LTO/Config.h.
This patch adds a StatsFile option to LTO/Config.h and updates both LLVMGold and llvm-lto2 to set it. Reviewers: MatzeB, tejohnson, espindola Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D45531 llvm-svn: 330411
Diffstat (limited to 'llvm/tools/llvm-lto2/llvm-lto2.cpp')
-rw-r--r--llvm/tools/llvm-lto2/llvm-lto2.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp
index 1305aa57f0b..aab0f6f303a 100644
--- a/llvm/tools/llvm-lto2/llvm-lto2.cpp
+++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp
@@ -113,6 +113,9 @@ static cl::opt<bool>
DebugPassManager("debug-pass-manager", cl::init(false), cl::Hidden,
cl::desc("Print pass management debugging information"));
+static cl::opt<std::string>
+ StatsFile("stats-file", cl::desc("Filename to write statistics to"));
+
static void check(Error E, std::string Msg) {
if (!E)
return;
@@ -240,6 +243,7 @@ static int run(int argc, char **argv) {
Conf.OverrideTriple = OverrideTriple;
Conf.DefaultTriple = DefaultTriple;
+ Conf.StatsFile = StatsFile;
ThinBackend Backend;
if (ThinLTODistributedIndexes)
OpenPOWER on IntegriCloud