[llvm] r258386 - AMDGPU/SI: Pass whether to use the SI scheduler via Target Attribute

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 11:16:00 PST 2016


Did this get merged?

On Wed, Jan 20, 2016 at 9:13 PM, Hans Wennborg via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Sounds good to me. Go ahead and merge.
>
> Thanks,
> Hans
>
>
> On 01/20/2016 08:34 PM, Tom Stellard wrote:
>>
>> Can we pull this into the 3.8 branch.  This allows users to use an
>> experimental scheduler which was merged before the branch.  I am the
>> code owner and I approve this commit.
>>
>> Thanks,
>> Tom
>>
>> On Thu, Jan 21, 2016 at 04:28:35AM -0000, Tom Stellard via llvm-commits
>> wrote:
>>>
>>> Author: tstellar
>>> Date: Wed Jan 20 22:28:34 2016
>>> New Revision: 258386
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=258386&view=rev
>>> Log:
>>> 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
>>>
>>> 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
>>>
>>> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPU.td
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPU.td?rev=258386&r1=258385&r2=258386&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Target/AMDGPU/AMDGPU.td (original)
>>> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPU.td Wed Jan 20 22:28:34 2016
>>> @@ -144,6 +144,11 @@ def FeatureEnableHugeScratchBuffer : Sub
>>>           "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",
>>>
>>> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp?rev=258386&r1=258385&r2=258386&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp (original)
>>> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp Wed Jan 20 22:28:34
>>> 2016
>>> @@ -81,7 +81,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(const T
>>>         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);
>>>
>>> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h?rev=258386&r1=258385&r2=258386&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h (original)
>>> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h Wed Jan 20 22:28:34
>>> 2016
>>> @@ -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;
>>>     }
>>>
>>> Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp?rev=258386&r1=258385&r2=258386&view=diff
>>>
>>> ==============================================================================
>>> --- llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (original)
>>> +++ llvm/trunk/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Wed Jan 20
>>> 22:28:34 2016
>>> @@ -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;
>>>     }
>>>
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list