[llvm] r273653 - AMDGPU: Remove disable-irstructurizer subtarget feature
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 23:30:22 PDT 2016
Author: arsenm
Date: Fri Jun 24 01:30:22 2016
New Revision: 273653
URL: http://llvm.org/viewvc/llvm-project?rev=273653&view=rev
Log:
AMDGPU: Remove disable-irstructurizer subtarget feature
The only real reason to use it is for testing, so replace
it with a command line option instead of a potentially function
dependent feature.
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPU.td
llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h
llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/trunk/test/CodeGen/AMDGPU/predicates.ll
llvm/trunk/test/CodeGen/AMDGPU/structurize.ll
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPU.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPU.td?rev=273653&r1=273652&r2=273653&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPU.td (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPU.td Fri Jun 24 01:30:22 2016
@@ -216,12 +216,6 @@ def FeatureDumpCodeLower : SubtargetFeat
"Dump MachineInstrs in the CodeEmitter"
>;
-def FeatureIRStructurizer : SubtargetFeature <"disable-irstructurizer",
- "EnableIRStructurizer",
- "false",
- "Disable IR Structurizer"
->;
-
def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",
"EnablePromoteAlloca",
"true",
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp?rev=273653&r1=273652&r2=273653&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp Fri Jun 24 01:30:22 2016
@@ -103,7 +103,6 @@ AMDGPUSubtarget::AMDGPUSubtarget(const T
DebuggerReserveRegs(false),
EnableVGPRSpilling(false),
- EnableIRStructurizer(true),
EnablePromoteAlloca(false),
EnableIfCvt(true),
EnableLoadStoreOpt(false),
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h?rev=273653&r1=273652&r2=273653&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h Fri Jun 24 01:30:22 2016
@@ -80,7 +80,6 @@ protected:
// Used as options.
bool EnableVGPRSpilling;
- bool EnableIRStructurizer;
bool EnablePromoteAlloca;
bool EnableIfCvt;
bool EnableLoadStoreOpt;
@@ -218,10 +217,6 @@ public:
return CaymanISA;
}
- bool IsIRStructurizerEnabled() const {
- return EnableIRStructurizer;
- }
-
bool isPromoteAllocaEnabled() const {
return EnablePromoteAlloca;
}
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp?rev=273653&r1=273652&r2=273653&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Fri Jun 24 01:30:22 2016
@@ -40,6 +40,11 @@
using namespace llvm;
+static cl::opt<bool> EnableR600StructurizeCFG(
+ "r600-ir-structurize",
+ cl::desc("Use StructurizeCFG IR pass"),
+ cl::init(true));
+
extern "C" void LLVMInitializeAMDGPUTarget() {
// Register the target
RegisterTargetMachine<R600TargetMachine> X(TheAMDGPUTarget);
@@ -326,8 +331,8 @@ bool AMDGPUPassConfig::addGCPasses() {
bool R600PassConfig::addPreISel() {
AMDGPUPassConfig::addPreISel();
- const AMDGPUSubtarget &ST = *getAMDGPUTargetMachine().getSubtargetImpl();
- if (ST.IsIRStructurizerEnabled())
+
+ if (EnableR600StructurizeCFG)
addPass(createStructurizeCFGPass());
addPass(createR600TextureIntrinsicsReplacer());
return false;
Modified: llvm/trunk/test/CodeGen/AMDGPU/predicates.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/predicates.ll?rev=273653&r1=273652&r2=273653&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/predicates.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/predicates.ll Fri Jun 24 01:30:22 2016
@@ -1,4 +1,4 @@
-; RUN: llc -spec-exec-max-speculation-cost=0 -march=r600 -mattr=disable-irstructurizer -mcpu=redwood < %s | FileCheck %s
+; RUN: llc -spec-exec-max-speculation-cost=0 -march=r600 -r600-ir-structurize=0 -mcpu=redwood < %s | FileCheck %s
; These tests make sure the compiler is optimizing branches using predicates
; when it is legal to do so.
Modified: llvm/trunk/test/CodeGen/AMDGPU/structurize.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/structurize.ll?rev=273653&r1=273652&r2=273653&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/structurize.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/structurize.ll Fri Jun 24 01:30:22 2016
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=r600 -mcpu=redwood -mattr=disable-irstructurizer | FileCheck %s
+; RUN: llc < %s -march=r600 -mcpu=redwood -r600-ir-structurize=0 | FileCheck %s
; Test case for a crash in the AMDILCFGStructurizer from a CFG like this:
;
; entry
More information about the llvm-commits
mailing list