[PATCH] D81359: [ELF] Add --[no-]relax for RISC-V

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 02:08:55 PDT 2020


grimar added inline comments.


================
Comment at: lld/ELF/Config.h:188
   bool printIcfSections;
+  bool relax;
   bool relocatable;
----------------
MaskRay wrote:
> grimar wrote:
> > You do not need this.
> The variable definitions and `--help` will sooner or later be needed. I don't think it is too troublesome to keep them.
In the past we usually never added a code for "sooner or later" when there is a chance that it never be needed. For example, I believe we do not implement all possible relaxations for i386 and nobody seems to care about them. I wouldn't be surprised to see the same situation for RISC-V, though I know almost nothing about it.

Or may be something else might change, as as far I understand this is only used in linux kernel for RISC-V. It sounds strange to me that this is the only target that needs it (it seems). Why do other targets don't need to stop relaxing? Is it a chance this will be solved differently? I.e. a with a compiler flag may be.

In case this will be needed one day (after implementing problematic RISC-V relaxations I guess), the help text might want to explicitly say that only RISC-V is affected.

I'll leave it to others to decide. Perhaps @ruiu might have something to say.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81359





More information about the llvm-commits mailing list