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

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 14:20:56 PST 2020


wmi accepted this revision.
wmi added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/tools/llvm-profgen/ProfiledBinary.cpp:232
+
+    uint64_t ImageLoadAddr = PreferredBaseAddress;
+    uint64_t SectionOffset = Section.getAddress() - ImageLoadAddr;
----------------
wlei wrote:
> 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. 
Ok, thanks. 


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