[clang] [llvm] [RISCV] Add generic CPUs for profiles (PR #84877)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 11:15:16 PDT 2024
wangpc-pp wrote:
> We discussed this on the sync-up call and @preames very rightly pointed out that we should take a step back here...from a user perspective, what does specifying a profile via `-mcpu` provide that specifying it via `-march` doesn't? We weren't able to answer that in the call, but perhaps we're missing something?
Thanks! I was off the meeting because of some real-life issues. :-)
The story is:
1. I was implementing the profile name in `-march`, and I exposed profiles as subtarget features at the first time. So that we can use `-mattr=+<profile name>` and simplify the definitions of processors. You may see the context in https://github.com/llvm/llvm-project/pull/76357#discussion_r1517343360.
2. @topperc suggested that we may not need these features and we can factor out some feature lists and may add `-mcpu=generic-<profile>`. I like this idea and so I created this PR.
As for the difference, we can specify `-mcpu` for `llc` and other tools, which is not the case for `-march`? I hope we can simplify the commands when we try to do some tests. (Though this is an use for compiler developers, not for real users).
https://github.com/llvm/llvm-project/pull/84877
More information about the llvm-commits
mailing list