[PATCH] D113727: [llvm-profgen] Add switch to allow use of first loadable segment for calculating offset

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 09:10:29 PST 2021


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/PerfReader.cpp:32
+static cl::opt<bool>
+    UseLoadableSegmentAsBase("use-loadable-segment-as-base",
+              cl::init(false), cl::ZeroOrMore,
----------------
Name it `use-first-loadable-segment-as-base`?



================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.h:307
+  // Return the preferred load address for the first loadable segment.
+  uint64_t getFirstLoadableAddress() { return FirstLoadableAddress; }
   // Return the file offset for the first executable segment.
----------------
nit: add a `const` qualifier 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113727



More information about the llvm-commits mailing list