[RISCV] Status of LTO for RISC-V

Hi all,

I wanted to use LTO with the rv32 target and stumbled upon some open
patches and wanted to ask what the status is on LTO for RISC-V?

Related patches:

[RISCV] enable LTO support, pass some options to linker.
  https://reviews.llvm.org/D67409
[WIP] TargetMachine Hook for Module Metadata
  https://reviews.llvm.org/D72624
pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO
  https://reviews.llvm.org/D71387
[PoC][RISCV] enable LTO/ThinLTO on RISCV
  https://reviews.llvm.org/D78035

If this is still WIP I would be happy to contribute.

Noah

Hi Noah - to my knowledge nobody has been pushing this work forwards
of late, so contributions would definitely be welcome.

Best,

Alex

Hi Noah
This year I have a new patch D102582 for enabling LTO in RISC-V.
D102582 changes the target-abi mismatched checking mechanism because allowing the module flag in IR
to overwrite the empty target-abi options does not doable.

Then D71387 is used to enable LTO for RISC-V.

  • Zakk

Alex Bradbury via llvm-dev <llvm-dev@lists.llvm.org> 於 2021年6月27日 週日 下午5:57寫道: