This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Don't use struct type for argument layout
ClosedPublic

Authored by arsenm on Jun 29 2018, 3:21 AM.

Details

Reviewers
rampitec
Summary

This was introducing unnecessary padding after the explicit
arguments, depending on the alignment of the total struct type.
Also has the side effect of avoiding creating an extra GEP for
the offset from the base kernel argument to the explicit kernel
argument offset.

Diff Detail

Event Timeline

arsenm created this revision.Jun 29 2018, 3:21 AM
rampitec added inline comments.Jun 29 2018, 8:32 AM
test/CodeGen/AMDGPU/kernel-args.ll
672 ↗(On Diff #153460)

Ideally we want to have load_dwordx3 here. Do you mind to add checks for load instructions?

rampitec added inline comments.Jun 29 2018, 8:35 AM
test/CodeGen/AMDGPU/kernel-args.ll
672 ↗(On Diff #153460)

Actually, dwordx4 given the padding.

arsenm added inline comments.Jun 29 2018, 10:04 AM
test/CodeGen/AMDGPU/kernel-args.ll
672 ↗(On Diff #153460)

Actually these tests should be dropped from the patch. I added these for a later patch, and forgot to add the check lines since those belong later

arsenm updated this revision to Diff 153515.Jun 29 2018, 10:08 AM

Drop accidentally added tests

This revision is now accepted and ready to land.Jun 29 2018, 10:09 AM
arsenm closed this revision.Jun 29 2018, 10:36 AM

r335999