[PATCH] D31161: [AMDGPU] New Waitcnt Insertion Pass
Konstantin Zhuravlyov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 10:13:29 PDT 2017
kzhuravl requested changes to this revision.
kzhuravl added a comment.
This revision now requires changes to proceed.
- Your pass does not take into account encoding changes for gfx9.
- New pass name is confusing.
- Make a note somewhere that the new pass is on by default, and you can switch it off by such and such option.
================
Comment at: lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1069-1071
+ if (!OldWaitcnt || ((Imm & 0xF) != (CntVal[VM_CNT] & 0xF)) ||
+ (((Imm >> 4) & 0x7) != (CntVal[EXP_CNT] & 0x7)) ||
+ (((Imm >> 8) & 0xF) != (CntVal[LGKM_CNT] & 0xF))) {
----------------
Use helper functions from AMDGPUBaseInfo.h (they also have logic for gfx9 in it)
================
Comment at: lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1098-1099
+
+ int64_t Val = (CntVal[VM_CNT] & 0xF) | ((CntVal[EXP_CNT] & 0x7) << 4) |
+ ((CntVal[LGKM_CNT] & 0xF) << 8);
+ const MachineOperand &Op = MachineOperand::CreateImm(Val);
----------------
Use helper functions from AMDGPUBaseInfo.h (they also have logic for gfx9 in it)
https://reviews.llvm.org/D31161
More information about the llvm-commits
mailing list