clang (like gcc) has the -mtune= command line option. This option
adds the "tune-cpu" attribute to a function. The intended functionality
is that the scheduling model of that cpu is used. E.g. -mtune=pwr9 -march=pwr8
generates only instructions supported on pwr8 but uses the scheduling model
of pwr9 for it.
This PR adds the infrastructure to support this feature in LLVM.
clang support was added in D130526.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Do we require an IR test for this new attribute?
llvm/lib/Target/PowerPC/PPCSubtarget.h | ||
---|---|---|
157–162 | Minor nit. |
Comment Actions
It's not easy to give a direct test case to demonstrate effect of tune-cpu. And even so, the case would be volatile. We can adjust features specific to tune-cpu in PPC.td in future patches.
This patch looks good to me. Wait to see if @nemanjai has other comments.
Minor nit.