[PATCH] D125036: [RISCV] Alignment relaxation

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 12 23:27:36 PDT 2022


MaskRay added a comment.

I feel uneasy with this patch series mainly for two things (a) intrusive changes to generic code (this could be fixed) (b) deleting bytes and undo seem hacky.
There is a minor issue that st_size computation is incorrect for the Linux kernel which can be fixed.
Another issue is with

  while (relaxOnce(sectionSymbolAddrs))
     ;

being separate from the `finalizeAddressDependentContent` loop. Some linker scripts can cause the relax to be re-done. I think the only waterproof approach is to place relaxation into `finalizeAddressDependentContent`.

I created D127611 <https://reviews.llvm.org/D127611>/D127581 <https://reviews.llvm.org/D127581> as an alternative implementation for alignment and call relaxation. It only performs "deleting bytes" after convergence.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125036



More information about the llvm-commits mailing list