[PATCH] D46674: [RISCV] Define FeatureRelax and shouldForceRelocation for RISCV linker relaxation
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 14 13:51:29 PDT 2018
asb accepted this revision.
asb added a comment.
This revision is now accepted and ready to land.
Thanks Shiva. I've suggested an alternate phrasing of the comment on shouldForceRelocation but this is looking good to me.
================
Comment at: lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:46-47
+ // Preserve relocation types if the linker relaxation enabled. So then
+ // linker could has information to fixup offsets while relaxation.
+ bool shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup,
----------------
I think this would be clearer rephrased with something like:
"If linker relaxation is enabled, always emit relocations even if the fixup can be resolved. This is necessary for correctness as offsets may change during relaxation."
Repository:
rL LLVM
https://reviews.llvm.org/D46674
More information about the llvm-commits
mailing list