[PATCH] D89712: [CSSPGO][llvm-profgen] Disassemble text sections

Lei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 14:18:43 PST 2020


wlei marked an inline comment as done.
wlei added inline comments.


================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:232
+
+    uint64_t ImageLoadAddr = PreferredBaseAddress;
+    uint64_t SectionOffset = Section.getAddress() - ImageLoadAddr;
----------------
wmi wrote:
> Can we set PreferredBaseAddress here and don't have to iterate all the sections in setPreferredBaseAddress function?
> PreferredBaseAddress = getELFImageLMAForSec(Section);
Thanks for your suggestion. Considering the section number should not be very large, we intend to decouple them to make disassemble function focus on disassembling things and PreferredBaseAddress would also be used in other functions so we used an explicit set-up for better readability. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89712



More information about the llvm-commits mailing list