summaryrefslogtreecommitdiff
path: root/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
commitd341fb056416c1d109d45fd0b71755b5d6ba0ebf (patch)
tree7529d9f8d38ce7ba4277a65e4373355512772357 /lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
parent08b65a5b143165ba216a355189249b5907111de8 (diff)
AMDGPU: Fix incorrect selection of pseudo-branches
These should only be used if the machine structurizer is enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315357 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AMDGPU/AMDGPUTargetMachine.cpp')
-rw-r--r--lib/Target/AMDGPU/AMDGPUTargetMachine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 2fdb012243a..f20dba844d3 100644
--- a/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/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) ?