OSDN Git Service

[AMDGPU] Refactor waitcnt encoding
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Tue, 11 Oct 2016 18:58:22 +0000 (18:58 +0000)
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>
Tue, 11 Oct 2016 18:58:22 +0000 (18:58 +0000)
commitc7a23a58d8769a41cee6577e90adb99ef35f952b
tree67dead1c189e26ea37940f5e6a5a6cef1b808542
parent1d2f9bc41154222a64421f4d05db64f429f02a74
[AMDGPU] Refactor waitcnt encoding

- Refactor bit packing/unpacking
- Calculate bit mask given bit shift and bit width
- Introduce function for decoding bits of waitcnt
- Introduce function for encoding bits of waitcnt
- Introduce function for getting waitcnt mask (instead of using bare numbers)
- Introduce function fot getting max waitcnt(s) (instead of using bare numbers)

Differential Revision: https://reviews.llvm.org/D25298

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283919 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp
lib/Target/AMDGPU/SIInsertWaits.cpp
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h