Use a subtarget feature instead of a command line argument to reduce global
state.
We want to enable flat scratch for graphics in some cases and this
doesn't work well with command line options.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Just curious: why is it not enabled by default on subtargets that support it? Then you would only need the attribute if you wanted to turn it off for some reason.
Comment Actions
If we do so, I think it only makes sense for gfx10.3+ (there are a couple hardware bugs before that). It would need benchmarking on the compute side.
For graphics there are almost no differences when using flat scratch, but there is one improvement in a case where we spill a lot.
Comment Actions
Right, support is incomplete without _ST addressing mode, so before gfx1030 it can fail under a high pressure.
LGTM