summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2017-10-10 20:22:07 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2017-10-10 20:22:07 +0000
commitcc85223f8743e7df6fc6a943926881a372e1c045 (patch)
treef3f3f99a076274ba45349abf97d23ea64728734d /llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
parente9d85fc8dd0858f160b8e0ecfa26180cf62efaf7 (diff)
downloadbcm5719-llvm-cc85223f8743e7df6fc6a943926881a372e1c045.tar.gz
bcm5719-llvm-cc85223f8743e7df6fc6a943926881a372e1c045.zip
AMDGPU: Fix incorrect selection of pseudo-branches
These should only be used if the machine structurizer is enabled. llvm-svn: 315357
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 2fdb012243a..f20dba844d3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -117,10 +117,10 @@ static cl::opt<bool> EnableSIInsertWaitcntsPass(
cl::init(true));
// Option to run late CFG structurizer
-static cl::opt<bool> LateCFGStructurize(
+static cl::opt<bool, true> LateCFGStructurize(
"amdgpu-late-structurize",
cl::desc("Enable late CFG structurization"),
- cl::init(false),
+ cl::location(AMDGPUTargetMachine::EnableLateStructurizeCFG),
cl::Hidden);
static cl::opt<bool> EnableAMDGPUFunctionCalls(
@@ -300,6 +300,8 @@ AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, const Triple &TT,
AMDGPUTargetMachine::~AMDGPUTargetMachine() = default;
+bool AMDGPUTargetMachine::EnableLateStructurizeCFG = false;
+
StringRef AMDGPUTargetMachine::getGPUName(const Function &F) const {
Attribute GPUAttr = F.getFnAttribute("target-cpu");
return GPUAttr.hasAttribute(Attribute::None) ?
OpenPOWER on IntegriCloud