-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AMDGPU] Add options for waitcnt pass debugging; add instr count in d…
…ebug output. -amdgpu-waitcnt-forcezero={1|0} Force all waitcnt instrs to be emitted as s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0) -amdgpu-waitcnt-forceexp=<n> Force emit a s_waitcnt expcnt(0) before the first <n> instrs -amdgpu-waitcnt-forcelgkm=<n> Force emit a s_waitcnt lgkmcnt(0) before the first <n> instrs -amdgpu-waitcnt-forcevm=<n> Force emit a s_waitcnt vmcnt(0) before the first <n> instrs Differential Revision: https://reviews.llvm.org/D40091 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320084 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
103 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -amdgpu-waitcnt-forcelgkm=1 -o - %s | FileCheck -check-prefixes=GCN,LGKM %s | ||
# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -amdgpu-waitcnt-forceexp=2 -o - %s | FileCheck -check-prefixes=GCN,EXP %s | ||
# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -amdgpu-waitcnt-forcevm=3 -o - %s | FileCheck -check-prefixes=GCN,VM %s | ||
# RUN: llc -mtriple=amdgcn -verify-machineinstrs -run-pass si-insert-waitcnts -amdgpu-waitcnt-forcezero=1 -amdgpu-waitcnt-forcevm=2 -o - %s | FileCheck -check-prefixes=GCN,ZERO %s | ||
|
||
# check that the waitcnt pass options that force insertion of waitcnt instructions are working as expected | ||
|
||
... | ||
# GCN-LABEL: name: waitcnt-debug | ||
# LGKM: S_WAITCNT 127 | ||
# LGKM-NEXT: S_NOP 0 | ||
# LGKM-NEXT: S_NOP 0 | ||
|
||
# EXP: S_WAITCNT 3855 | ||
# EXP-NEXT: S_NOP 0 | ||
# EXP-NEXT: S_WAITCNT 3855 | ||
# EXP-NEXT: S_NOP 0 | ||
|
||
# VM: S_WAITCNT 3952 | ||
# VM-NEXT: S_NOP 0 | ||
# VM-NEXT: S_WAITCNT 3952 | ||
# VM-NEXT: S_NOP 0 | ||
# VM-NEXT: S_WAITCNT 3952 | ||
# VM-NEXT: S_NOP 0 | ||
|
||
# ZERO: S_WAITCNT 0 | ||
# ZERO-NEXT: S_WAITCNT 0 | ||
# ZERO-NEXT: S_NOP 0 | ||
# ZERO-NEXT: S_WAITCNT 0 | ||
# ZERO-NEXT: S_NOP 0 | ||
|
||
name: waitcnt-debug | ||
liveins: | ||
body: | | ||
bb.0: | ||
S_NOP 0 | ||
S_NOP 0 | ||
S_NOP 0 | ||
S_NOP 0 | ||
... | ||
|