diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2018-07-09 19:22:22 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2018-07-09 19:22:22 +0000 |
commit | 40cb6cab563372d0a0b1bc8c127503508dc114e6 (patch) | |
tree | 33a3ddf313e3cb7eff250174be7c0bfd7d85db29 /llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | |
parent | dc73f512ae77888fac7f80af9bdc44a7208fbce8 (diff) | |
download | bcm5719-llvm-40cb6cab563372d0a0b1bc8c127503508dc114e6.tar.gz bcm5719-llvm-40cb6cab563372d0a0b1bc8c127503508dc114e6.zip |
AMDGPU: Force inlining if LDS global address is used
These won't work for the forseeable future. These aren't allowed
from OpenCL, but IPO optimizations can make them appear.
Also directly set the attributes on functions, regardless
of the linkage rather than cloning functions like before.
llvm-svn: 336587
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp index 22ea16049bf..b4066102553 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp @@ -117,11 +117,12 @@ static cl::opt<bool, true> LateCFGStructurize( cl::location(AMDGPUTargetMachine::EnableLateStructurizeCFG), cl::Hidden); -static cl::opt<bool> EnableAMDGPUFunctionCalls( +static cl::opt<bool, true> EnableAMDGPUFunctionCalls( "amdgpu-function-calls", - cl::Hidden, cl::desc("Enable AMDGPU function call support"), - cl::init(false)); + cl::location(AMDGPUTargetMachine::EnableFunctionCalls), + cl::init(false), + cl::Hidden); // Enable lib calls simplifications static cl::opt<bool> EnableLibCallSimplify( @@ -311,9 +312,10 @@ AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, const Triple &TT, initAsmInfo(); } -AMDGPUTargetMachine::~AMDGPUTargetMachine() = default; - bool AMDGPUTargetMachine::EnableLateStructurizeCFG = false; +bool AMDGPUTargetMachine::EnableFunctionCalls = false; + +AMDGPUTargetMachine::~AMDGPUTargetMachine() = default; StringRef AMDGPUTargetMachine::getGPUName(const Function &F) const { Attribute GPUAttr = F.getFnAttribute("target-cpu"); |