mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 14:17:59 +00:00
AMDGPU/SI: Pass whether to use the SI scheduler via Target Attribute
Summary: Currently the SI scheduler can be selected via command line option, but it turned out it would be better if it was selectable via a Target Attribute. This patch adds "si-scheduler" attribute to the backend. Reviewers: tstellarAMD, echristo Subscribers: echristo, arsenm Differential Revision: http://reviews.llvm.org/D16192 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37c2652ad9
commit
72304925ab
@ -144,6 +144,11 @@ def FeatureEnableHugeScratchBuffer : SubtargetFeature<"huge-scratch-buffer",
|
||||
"true",
|
||||
"Enable scratch buffer sizes greater than 128 GB">;
|
||||
|
||||
def FeatureEnableSIScheduler : SubtargetFeature<"si-scheduler",
|
||||
"EnableSIScheduler",
|
||||
"true",
|
||||
"Enable SI Machine Scheduler">;
|
||||
|
||||
class SubtargetFeatureFetchLimit <string Value> :
|
||||
SubtargetFeature <"fetch"#Value,
|
||||
"TexVTXClauseSize",
|
||||
|
@ -81,7 +81,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(const Triple &TT, StringRef GPU, StringRef FS,
|
||||
EnableVGPRSpilling(false), SGPRInitBug(false), IsGCN(false),
|
||||
GCN1Encoding(false), GCN3Encoding(false), CIInsts(false), LDSBankCount(0),
|
||||
IsaVersion(ISAVersion0_0_0), EnableHugeScratchBuffer(false),
|
||||
FrameLowering(nullptr),
|
||||
EnableSIScheduler(false), FrameLowering(nullptr),
|
||||
InstrItins(getInstrItineraryForCPU(GPU)), TargetTriple(TT) {
|
||||
|
||||
initializeSubtargetDependencies(TT, GPU, FS);
|
||||
|
@ -92,6 +92,7 @@ private:
|
||||
int LDSBankCount;
|
||||
unsigned IsaVersion;
|
||||
bool EnableHugeScratchBuffer;
|
||||
bool EnableSIScheduler;
|
||||
|
||||
std::unique_ptr<AMDGPUFrameLowering> FrameLowering;
|
||||
std::unique_ptr<AMDGPUTargetLowering> TLInfo;
|
||||
@ -286,6 +287,10 @@ public:
|
||||
return EnableHugeScratchBuffer;
|
||||
}
|
||||
|
||||
bool enableSIScheduler() const {
|
||||
return EnableSIScheduler;
|
||||
}
|
||||
|
||||
bool dumpCode() const {
|
||||
return DumpCode;
|
||||
}
|
||||
|
@ -148,6 +148,8 @@ public:
|
||||
const AMDGPUSubtarget &ST = *getAMDGPUTargetMachine().getSubtargetImpl();
|
||||
if (ST.getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS)
|
||||
return createR600MachineScheduler(C);
|
||||
else if (ST.enableSIScheduler())
|
||||
return createSIMachineScheduler(C);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user