[PATCH] D89723: [CSSPGO][llvm-profgen]Context-sensitive profile data generation

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 10:50:10 PST 2020


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:26
+  // setup yet. Fill in the missing frame in that case.
+  uint64_t Source = State.getCurrentLBRSource();
+  auto Iter = State.CallStack.begin();
----------------
Nit: please add a TODO here to check if `Source` is in prolog/epilog using precise prolog/epilog table.


================
Comment at: llvm/tools/llvm-profgen/ProfileGenerator.cpp:47
+void ProfileGenerator::write() {
+  auto WriterOrErr = SampleProfileWriter::create(OutputFilename, OutputFormat);
+  if (std::error_code EC = WriterOrErr.getError())
----------------
I'm wondering if a separate profile file should be output for each binary. Since the samples are already separated for binaries via `BinarySampleCounters`,  `ProfileMap` can be made like that too.


================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:140
+  // TODO: compress for recursive context
+  if (CompressRecursion) {
+  }
----------------
Nit: remove the check and add it back with the compression work. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89723



More information about the llvm-commits mailing list