File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -381,6 +381,11 @@ static cl::opt<bool> EnableHipStdPar(
381
381
cl::desc (" Enable HIP Standard Parallelism Offload support" ), cl::init(false ),
382
382
cl::Hidden);
383
383
384
+ static cl::opt<bool >
385
+ EnableAMDGPUAttributor (" amdgpu-attributor-enable" ,
386
+ cl::desc (" Enable AMDGPUAttributorPass" ),
387
+ cl::init(true ), cl::Hidden);
388
+
384
389
extern " C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTarget () {
385
390
// Register the target
386
391
RegisterTargetMachine<R600TargetMachine> X (getTheR600Target ());
@@ -750,6 +755,8 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
750
755
// module is partitioned for codegen.
751
756
if (EnableLowerModuleLDS)
752
757
PM.addPass (AMDGPULowerModuleLDSPass (*this ));
758
+ if (EnableAMDGPUAttributor && Level != OptimizationLevel::O0)
759
+ PM.addPass (AMDGPUAttributorPass (*this ));
753
760
});
754
761
755
762
PB.registerRegClassFilterParsingCallback (
Original file line number Diff line number Diff line change
1
+ ; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O1>" -print-pipeline-passes %s -o - | FileCheck %s
2
+ ; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O2>" -print-pipeline-passes %s -o - | FileCheck %s
3
+ ; RUN: opt -mtriple=amdgcn--amdhsa -S -passes="lto<O3>" -print-pipeline-passes %s -o - | FileCheck %s
4
+
5
+ ; CHECK: amdgpu-attributor
6
+
7
+ define amdgpu_kernel void @kernel () {
8
+ entry:
9
+ ret void
10
+ }
You can’t perform that action at this time.
0 commit comments