[llvm] [RISCV] Add areInlineCompatible for riscv target (PR #86639)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 07:51:36 PDT 2024


https://github.com/lukel97 commented:

Does this mean we'll inline a function even if it we disabled an extension via an overriding target attribute arch string? e.g.

```c
__attribute__((target("arch=rv64i")))
float foo(float x) {
  return x + 42;
}

float bar(float x) {
  return foo(x);
}
```

foo will now be inlined if we compile with `-march=rv64if`. But I presume that's fine given that this seems to be inline with what other targets do

https://github.com/llvm/llvm-project/pull/86639


More information about the llvm-commits mailing list