This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix emitting invalid workitem intrinsics for HSA
ClosedPublic

Authored by arsenm on Jan 29 2016, 7:03 PM.

Details

Reviewers
tstellarAMD
Summary

The AMDGPUPromoteAlloca pass was emitting the read.local.size
calls, which with HSA was incorrectly selected to reading from
the offset mesa uses off of the kernarg pointer.

Error on intrinsics which aren't supported by HSA, and start
emitting the correct IR to read the workgroup size
out of the dispatch pointer.

Also initialize the pass so it can be tested with opt, and
start moving towards not depending on the subtarget as an
argument.

Start emitting errors for the intrinsics not handled with HSA.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 46462.Jan 29 2016, 7:03 PM
arsenm retitled this revision from to AMDGPU: Fix emitting invalid workitem intrinsics for HSA.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
tstellarAMD accepted this revision.Jan 29 2016, 7:27 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jan 29 2016, 7:27 PM
arsenm closed this revision.Jan 29 2016, 9:24 PM

r259297 with the range increased to 2048 and also added to the r600 intrinsics