[PATCH] D94931: [RISCV] Add attribute support for all supported extensions
Simon Cook via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 01:30:54 PST 2021
simoncook added a comment.
In D94931#2506141 <https://reviews.llvm.org/D94931#2506141>, @kito-cheng wrote:
> I think maybe we could extract the arch parser from driver[1] to `llvm/lib/Support`, so that we could just maintain one parser for driver and assembler, and there is also other potential user for that, like the C front-end for the target attribute, e.g. `__attribute__ ((target ("arch=rv64gcv")))`, and the linker can re-use that to read/merge/write the attribute too.
>
> [1] https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Arch/RISCV.cpp#L171
I was thinking about this too and was going to discuss it on Thursday's call. At the very least, even if we don't move the parser, the number of places that extension version numbers are add and used throughout the tools seems to call for it being centralised somewhere.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94931/new/
https://reviews.llvm.org/D94931
More information about the llvm-commits
mailing list