[PATCH] D125036: [RISCV] Alignment relaxation

Greg McGary via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 11:14:44 PDT 2022


gkm added inline comments.


================
Comment at: lld/ELF/InputSection.cpp:1100
     const Relocation &rel = relocations[i];
-    if (rel.expr == R_NONE)
+    if (rel.expr == R_NONE || rel.expr == R_RELAX_HINT)
       continue;
----------------
MaskRay wrote:
> Prefer moving R_RELAX_HINT to the switch below to not penalize other architectures. They don't want to take a comparison overhead here.
I am unconvinced:
# The extra comparison overhead will be lost in the noise, though I will measure to be certain
# Delaying `R_RELAX_HINT` means we run the block of code between here and the `switch`, which requires handling `R_RELAX_HINT` in `InputSectionBase::getRelocTargetVA()` to return a fake value `0`.




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