[PATCH] D104060: Machine IR Profile
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 15:00:44 PDT 2021
ellis added a comment.
In D104060#2836209 <https://reviews.llvm.org/D104060#2836209>, @davidxl wrote:
> In D104060#2836015 <https://reviews.llvm.org/D104060#2836015>, @kyulee wrote:
>
>> Thanks for the patch D104556 <https://reviews.llvm.org/D104556> that uses PC relative relocations for reference! This avoids dynamic relocation, which is the prerequisite to make a section (region) be extractable.
>> Unfortunately this is not sufficient because we need to find the references once they are extracted out because the address ranges (either in the original binary and the extracted binary) are not valid or can be altered.
>> So, we need some notion of section (or region) relative addressing which is not all available in COFF/ELF/MachO. One trick in MIP is to introduce an anchor reference to express such addressing with two PC relative relocations.
>> In fact, this anchor reference can be hoisted out into the header which we can share, which is not in this change yet.
>
> This is interesting. Can you describe a little more with the fuzzy matching, perhaps with a small example to demonstrate how it works?
If you're asking about our trick for the raw profile addresses, I have a comment above that describes it in detail (the comment title is "Section Layout"). If your asking about something else, could you please elaborate?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104060/new/
https://reviews.llvm.org/D104060
More information about the llvm-commits
mailing list