Skip to content

Commit e9f2eae

Browse files
committed
[AMDGPU] Parse wwm filter flag for regalloc fast
1 parent e0ea9fd commit e9f2eae

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,8 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
870870
return onlyAllocateSGPRs;
871871
if (FilterName == "vgpr")
872872
return onlyAllocateVGPRs;
873+
if (FilterName == "wwm")
874+
return onlyAllocateWWMRegs;
873875
return nullptr;
874876
});
875877
}

llvm/test/tools/llc/new-pm/regalloc-amdgpu.mir

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# REQUIRES: amdgpu-registered-target
2-
# RUN: llc -mtriple=amdgcn --passes='regallocfast<filter=sgpr>' --print-pipeline-passes --filetype=null %s | FileCheck %s --check-prefix=PASS
2+
# RUN: llc -mtriple=amdgcn --passes='regallocfast<filter=sgpr>,regallocfast<filter=wwm>,regallocfast<filter=vgpr>' --print-pipeline-passes --filetype=null %s | FileCheck %s --check-prefix=PASS
33
# RUN: not llc -mtriple=amdgcn --passes='regallocfast<filter=bad-filter>' --print-pipeline-passes --filetype=null %s 2>&1 | FileCheck %s --check-prefix=BAD-FILTER
44

55
# PASS: regallocfast<filter=sgpr>
6+
# PASS: regallocfast<filter=wwm>
7+
# PASS: regallocfast<filter=vgpr>
68
# BAD-FILTER: invalid regallocfast register filter 'bad-filter'
79

810
---

0 commit comments

Comments
 (0)