diff options
author | Wei Mi <wmi@google.com> | 2019-01-16 23:19:02 +0000 |
---|---|---|
committer | Wei Mi <wmi@google.com> | 2019-01-16 23:19:02 +0000 |
commit | c876e3d42be916a405fcbbc2fa75ecef9de95e11 (patch) | |
tree | 703998216d0bb3b779230ce2acc839993b51c9f9 /llvm/lib | |
parent | 931779761e7e8852d6cbdf7a5cd55b1ccf287be1 (diff) | |
download | bcm5719-llvm-c876e3d42be916a405fcbbc2fa75ecef9de95e11.tar.gz bcm5719-llvm-c876e3d42be916a405fcbbc2fa75ecef9de95e11.zip |
[PGO] Make pgo related options in opt more consistent.
Currently we have pgo options defined in PassManagerBuilder.cpp only for
instrument pgo, but not for sample pgo. We also have pgo options defined
in NewPMDriver.cpp in opt only for new pass manager and for all kinds of
pgo. They have some inconsistency.
To make the options more consistent and make tests writing easier, the
patch let old pass manager to share the same pgo options with new pass
manager in opt, and removes the options in PassManagerBuilder.cpp.
Differential Revision: https://reviews.llvm.org/D56749
llvm-svn: 351392
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/IPO/PassManagerBuilder.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index 9764944dc33..cbf46ff5c5d 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -107,20 +107,6 @@ static cl::opt<bool> cl::opt<bool> EnableHotColdSplit("hot-cold-split", cl::init(false), cl::Hidden, cl::desc("Enable hot-cold splitting pass")); - -static cl::opt<bool> RunPGOInstrGen( - "profile-generate", cl::init(false), cl::Hidden, - cl::desc("Enable PGO instrumentation.")); - -static cl::opt<std::string> - PGOOutputFile("profile-generate-file", cl::init(""), cl::Hidden, - cl::desc("Specify the path of profile data file.")); - -static cl::opt<std::string> RunPGOInstrUse( - "profile-use", cl::init(""), cl::Hidden, cl::value_desc("filename"), - cl::desc("Enable use phase of PGO instrumentation and specify the path " - "of profile data file")); - static cl::opt<bool> UseLoopVersioningLICM( "enable-loop-versioning-licm", cl::init(false), cl::Hidden, cl::desc("Enable the experimental Loop Versioning LICM pass")); @@ -175,9 +161,10 @@ PassManagerBuilder::PassManagerBuilder() { VerifyOutput = false; MergeFunctions = false; PrepareForLTO = false; - EnablePGOInstrGen = RunPGOInstrGen; - PGOInstrGen = PGOOutputFile; - PGOInstrUse = RunPGOInstrUse; + EnablePGOInstrGen = false; + PGOInstrGen = false; + PGOInstrUse = ""; + PGOSampleUse = ""; PrepareForThinLTO = EnablePrepareForThinLTO; PerformThinLTO = false; DivergentTarget = false; |