[PATCH] D140693: [Driver][RISCV] Adjust the priority between -mcpu, -mtune and -march
Kito Cheng via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 29 23:04:17 PST 2022
kito-cheng added a comment.
> So if I read this correctly, the effect of this is that we never pass -target-cpu to the backend after this patch and will only pass -target-feature and -tune-cpu?
Yes, that's prevent us taking any extensions from `-target-cpu`, so always pass `-target-feature` and `-tune-cpu` only.
> The code in riscv::getRISCVArch prioritizes -march over -mcpu for architecture extensions for setting -target-features.
>
> But the backend still applies extensions from -target-cpu via the tablegen features from RISCV.td.
>
> So its not even a "priority", we end up with a union.
Damm, you are right, that...even worth than I thought before, let me update the summary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140693/new/
https://reviews.llvm.org/D140693
More information about the cfe-commits
mailing list