[PATCH] D96387: [CSSPGO][llvm-profgen] Renovate perfscript check and command line input validation

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 11:12:11 PST 2021


wenlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:81
 void ProfileGenerator::write() {
+  StringRef OutputFilename = PerfReader::getOutputFilename();
   auto WriterOrErr = SampleProfileWriter::create(OutputFilename, OutputFormat);
----------------
Why do we need to go through PerfReader::getOutputFilename in order to access the output file from command line? 

Same for ProfiledBinary::isShowDisassemblyOnlyEnabled etc., can we access the global directly (add extern declaration if needed)? These wrappers seem a bit overkill given they're not really per-binary for per-reader config.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96387/new/

https://reviews.llvm.org/D96387



More information about the llvm-commits mailing list