fixed-abi uses pre-defined and predictable
SGPR/VGPRs for passing arguments. This patch makes
this scheme default when HSA OS is specified in triple.
Details
- Reviewers
arsenm - Commits
- rG3c297a256442: Make fixed-abi default for AMD HSA OS
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | ||
---|---|---|
386–388 | This isn't just changing the default, this is breaking the flag. You should check if the option wasn't specified |
llvm/test/CodeGen/AMDGPU/GlobalISel/irtranslator-fixed-function-abi-vgpr-args.ll | ||
---|---|---|
2 ↗ | (On Diff #322623) | You should keep the two checks with the flag on and off |
llvm/test/CodeGen/AMDGPU/callee-special-input-sgprs.ll | ||
---|---|---|
16 | This test should force use the variable ABI. We already have a dedicated test for the fixed ABI for these inputs (callee-special-input-sgprs-fixed-abi.ll) |
Setting this 'true' on everything is expected to be a regression. Specifically any code that uses functions, but doesn't use indirect functions, is expected to be slower than it was before. Suggest reverting this patch.
Alternative would look something like:
- if there is any indirect call, set this true
- otherwise, leave it unchanged
That will fix things using indirect calls without regressing everything else.
note: llvm::Function::hasAddressTaken() looks useful for that
This isn't just changing the default, this is breaking the flag. You should check if the option wasn't specified