forked from OSchip/llvm-project
R600: Enable the IR structurizer by default
llvm-svn: 195031
This commit is contained in:
parent
827ec9b630
commit
66df8a2c0a
|
@ -21,10 +21,10 @@ def FeatureDumpCode : SubtargetFeature <"DumpCode",
|
||||||
"true",
|
"true",
|
||||||
"Dump MachineInstrs in the CodeEmitter">;
|
"Dump MachineInstrs in the CodeEmitter">;
|
||||||
|
|
||||||
def FeatureIRStructurizer : SubtargetFeature <"enable-irstructurizer",
|
def FeatureIRStructurizer : SubtargetFeature <"disable-irstructurizer",
|
||||||
"EnableIRStructurizer",
|
"EnableIRStructurizer",
|
||||||
"true",
|
"false",
|
||||||
"Enable IR Structurizer">;
|
"Disable IR Structurizer">;
|
||||||
|
|
||||||
// Target features
|
// Target features
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(StringRef TT, StringRef CPU, StringRef FS) :
|
||||||
Gen = AMDGPUSubtarget::R600;
|
Gen = AMDGPUSubtarget::R600;
|
||||||
FP64 = false;
|
FP64 = false;
|
||||||
CaymanISA = false;
|
CaymanISA = false;
|
||||||
EnableIRStructurizer = false;
|
EnableIRStructurizer = true;
|
||||||
EnableIfCvt = true;
|
EnableIfCvt = true;
|
||||||
ParseSubtargetFeatures(GPU, FS);
|
ParseSubtargetFeatures(GPU, FS);
|
||||||
DevName = GPU;
|
DevName = GPU;
|
||||||
|
|
|
@ -125,8 +125,7 @@ bool
|
||||||
AMDGPUPassConfig::addPreISel() {
|
AMDGPUPassConfig::addPreISel() {
|
||||||
const AMDGPUSubtarget &ST = TM->getSubtarget<AMDGPUSubtarget>();
|
const AMDGPUSubtarget &ST = TM->getSubtarget<AMDGPUSubtarget>();
|
||||||
addPass(createFlattenCFGPass());
|
addPass(createFlattenCFGPass());
|
||||||
if (ST.IsIRStructurizerEnabled() ||
|
if (ST.IsIRStructurizerEnabled())
|
||||||
ST.getGeneration() > AMDGPUSubtarget::NORTHERN_ISLANDS)
|
|
||||||
addPass(createStructurizeCFGPass());
|
addPass(createStructurizeCFGPass());
|
||||||
if (ST.getGeneration() > AMDGPUSubtarget::NORTHERN_ISLANDS) {
|
if (ST.getGeneration() > AMDGPUSubtarget::NORTHERN_ISLANDS) {
|
||||||
addPass(createSinkingPass());
|
addPass(createSinkingPass());
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
|
;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
|
||||||
|
|
||||||
; CHECK: JUMP @5
|
; CHECK: JUMP @3
|
||||||
; CHECK: EXPORT
|
; CHECK: EXPORT
|
||||||
; CHECK-NOT: EXPORT
|
; CHECK-NOT: EXPORT
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
|
; RUN: llc < %s -march=r600 -mattr=disable-irstructurizer -mcpu=redwood | FileCheck %s
|
||||||
|
|
||||||
; These tests make sure the compiler is optimizing branches using predicates
|
; These tests make sure the compiler is optimizing branches using predicates
|
||||||
; when it is legal to do so.
|
; when it is legal to do so.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
|
; RUN: llc < %s -march=r600 -mcpu=redwood -mattr=disable-irstructurizer | FileCheck %s
|
||||||
; Test case for a crash in the AMDILCFGStructurizer from a CFG like this:
|
; Test case for a crash in the AMDILCFGStructurizer from a CFG like this:
|
||||||
;
|
;
|
||||||
; entry
|
; entry
|
||||||
|
|
Loading…
Reference in New Issue