diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-06-17 16:06:00 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2019-06-17 16:06:00 +0000 |
commit | 34667519dc199d58b4556cfdc4e3ecb04365e53e (patch) | |
tree | bdfc15117967634c7f53fce1020b3910baadfc40 /llvm/tools/opt/opt.cpp | |
parent | 77bc3b65424afc42031a0859c91154acdc54feaa (diff) | |
download | bcm5719-llvm-34667519dc199d58b4556cfdc4e3ecb04365e53e.tar.gz bcm5719-llvm-34667519dc199d58b4556cfdc4e3ecb04365e53e.zip |
[Remarks] Extend -fsave-optimization-record to specify the format
Use -fsave-optimization-record=<format> to specify a different format
than the default, which is YAML.
For now, only YAML is supported.
llvm-svn: 363573
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r-- | llvm/tools/opt/opt.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index dde1d776fef..ccf8b073b82 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -273,6 +273,11 @@ static cl::opt<std::string> "names match the given regular expression"), cl::value_desc("regex")); +static cl::opt<std::string> RemarksFormat( + "pass-remarks-format", + cl::desc("The format used for serializing remarks (default: YAML)"), + cl::value_desc("format"), cl::init("yaml")); + cl::opt<PGOKind> PGOKindFlag("pgo-kind", cl::init(NoPGO), cl::Hidden, cl::desc("The kind of profile guided optimization"), @@ -552,7 +557,8 @@ int main(int argc, char **argv) { Expected<std::unique_ptr<ToolOutputFile>> RemarksFileOrErr = setupOptimizationRemarks(Context, RemarksFilename, RemarksPasses, - RemarksWithHotness, RemarksHotnessThreshold); + RemarksFormat, RemarksWithHotness, + RemarksHotnessThreshold); if (Error E = RemarksFileOrErr.takeError()) { errs() << toString(std::move(E)) << '\n'; return 1; |