[PATCH] D70116: [RISCV] add subtargets initialized with target feature

Kuan Hsu Chen (Zakk) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 07:41:12 PST 2019


khchen added a comment.

In D70116#1741987 <https://reviews.llvm.org/D70116#1741987>, @lenary wrote:

> Nice, if this is the correct way to do it, then it's looking good.
>
> I see x86 and arm both inspect the "soft-float" attribute, which seems to come from the `-msoft-float` clang option. Should RISC-V be using that to switch off the `d` and `f` target features?


I think in RISC-V using `-mabi` is a convention way for specific calling convention in gcc and clang,  and more clear than `-msoft-float`.
but unfortunately compiling source code with `-mabi=ilp32` will not generate correct value like `"use-soft-float"="true"` in bitcode,
so we can fix clang (?) and let backend inspect the "soft-float" attribute, or fix clang driver to pass `-mabi` to LTO code generator in RISC-V target.

> I'm going to add @efriedma to the reviewers, as he flagged up this was implemented in the wrong way before.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70116





More information about the llvm-commits mailing list