This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Add amdgpu_kernel calling convention.
ClosedPublic

Authored by nhaustov on May 4 2016, 6:51 AM.

Details

Summary

This will be used for AMDGPU_HSA_KERNEL symbol type in output ELF.

Also, in the future unused non-kernels may be optimized.

Diff Detail

Event Timeline

nhaustov updated this revision to Diff 56140.May 4 2016, 6:51 AM
nhaustov retitled this revision from to AMDGPU/SI: Add amdgpu_kernel calling convention..
nhaustov updated this object.
nhaustov added reviewers: tstellarAMD, arsenm.
nhaustov added a subscriber: llvm-commits.
tstellarAMD added inline comments.May 4 2016, 7:37 AM
lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
16–23

This is going to break all frontends which don't emit this calling convention. I think we will need to keep this hard-coded to true until we can update the frontends.

arsenm edited edge metadata.May 4 2016, 12:29 PM

Should add some bitcode compatability tests

nhaustov updated this revision to Diff 56267.May 5 2016, 4:54 AM
nhaustov edited edge metadata.

Also recognize SPIR_KERNEL as kernel for now to make sure other frontent (HCC) works.
Add bitcode compatibility tests for amdgpu and other missing calling conventions.

I'll also probably split this change into two parts and submit AMDGPUMachineFunction.* changes after corresponding Clang change. This will ensure frontends work.

This revision was automatically updated to reflect the committed changes.
nhaustov marked an inline comment as done.