AMDGPU: Add pass to detect used kernel features
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 6 Nov 2015 18:01:57 +0000 (18:01 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 6 Nov 2015 18:01:57 +0000 (18:01 +0000)
commit454a57ccb6a7b85c960074109d2e8c18b0a7f0ab
treea84638f528770438e5c9408ea6021d4e27cac550
parentaf4bb57907a86d46e9a02dd7c6fea7a4dbc0eacf
AMDGPU: Add pass to detect used kernel features

Mark kernels that use certain features that require user
SGPRs to support with kernel attributes. We need to know
before instruction selection begins because it impacts
the kernel calling convention lowering.

For now this only detects the workitem intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252323 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPU.h
lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp [new file with mode: 0644]
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/AMDGPU/CMakeLists.txt
test/CodeGen/AMDGPU/annotate-kernel-features.ll [new file with mode: 0644]