This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Packed thread ids in function call ABI
ClosedPublic

Authored by rampitec on Jun 26 2019, 4:28 PM.

Diff Detail

Event Timeline

rampitec created this revision.Jun 26 2019, 4:28 PM
arsenm added inline comments.Jun 26 2019, 4:44 PM
lib/Target/AMDGPU/SIISelLowering.cpp
1643 ↗(On Diff #206762)

This should be derived from the subtarget maximum workgroup size

rampitec marked an inline comment as done.Jun 26 2019, 5:44 PM
rampitec added inline comments.
lib/Target/AMDGPU/SIISelLowering.cpp
1643 ↗(On Diff #206762)

It is derived from the theoretical maximum you can pack into 32 bit register (and agrees with maximum whg size as well of course, which makes it possible).

arsenm accepted this revision.Jun 27 2019, 2:50 PM

LGTM

This revision is now accepted and ready to land.Jun 27 2019, 2:50 PM
rampitec marked an inline comment as done.Jun 27 2019, 6:33 PM
rampitec added inline comments.
lib/Target/AMDGPU/SIISelLowering.cpp
1643 ↗(On Diff #206762)

For the record: there is conformation that any given WG dimension can never be more that 1024. This enables this code and allows to add few more AssertZExt I suppose. Probably there is something in clang as well.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2019, 6:57 PM
Herald added a subscriber: hiraditya. · View Herald Transcript