This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Pass special input registers to functions
ClosedPublic

Authored by arsenm on Jul 13 2017, 3:13 PM.

Diff Detail

Event Timeline

arsenm created this revision.Jul 13 2017, 3:13 PM
arsenm updated this revision to Diff 106549.Jul 13 2017, 3:34 PM

Fix crash on call inserted during legalization (though that shouldn't happen)

rampitec added inline comments.Jul 14 2017, 3:26 PM
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
3600

Do not you need to get alignment from DL and VT?

lib/Target/AMDGPU/SIISelLowering.cpp
1070

This assert and below not needed.

1123

Shall we use stack for scalar arguments as well, or shall we try to use VGPR first maybe?
I assume we may have user SGPR arguments as well, not predefined ones only.

arsenm added inline comments.Jul 14 2017, 3:40 PM
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
3600

This is only used for workitem IDs, which are always 4 bytes.

lib/Target/AMDGPU/SIISelLowering.cpp
1123

There can't be user SGPR arguments now. A future extension may be to use the inreg attribute for these like mesa does now for shaders.

arsenm accepted this revision.Aug 3 2017, 5:18 PM
arsenm marked an inline comment as done.

Committed r309998. Any more comments? I thought you accepted this, but it was just D36008

This revision is now accepted and ready to land.Aug 3 2017, 5:18 PM
arsenm closed this revision.Aug 3 2017, 5:18 PM