[PATCH] D117216: [BOLT][DWARF] updateDWARFObjectAddressRanges: nullify low pc

Vladislav Khmelevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 18 12:35:30 PST 2022


yota9 added a comment.

Thanks again @Amir

> If golang compiler lowers to LLVM IR

No, it is stand-alone compiler. The LLVM has it's own implementation but it is incompatible with the default gc and I didn't

> If not, but the compiler can emit an assembly (with all DWARF sections), it might be possible to reduce it using creduce.

Do you mean to compile to object files, using creduce find the needed lines and emit it with linker? I'm not sure if it is possible. The golang compile may produce the archive files, although  I didn't try it and not sure what kind of output it has.  AFAIU it is very problematic since it is not intended to do such things, it is mostly intended to produce the ready executable files (even the SOs are used very very rarely in golang world) and it is very limited compared to the standard C compiler. But I don't exclude that using some hacks and tricks it is possible.

> Otherwise, we'd need to work on extending BOLT's asm-dump to also dump DWARF sections, and reduce the resulting assembly.

Probably it is the best solution here, although I hope we won't need it :))


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117216



More information about the llvm-commits mailing list