[AMDGPU][MC][NFC] Refactored custom operands handling
authorDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>
Wed, 16 Mar 2022 12:52:37 +0000 (15:52 +0300)
committerDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>
Wed, 16 Mar 2022 13:04:55 +0000 (16:04 +0300)
commit5977dfba64099e224cba12f580b6867e7a3d149a
tree52d665f8c3dc7f8901bdfcb5578139ef85012c35
parent0bc451e7e137c4ccadcd3377250874f641ca514a
[AMDGPU][MC][NFC] Refactored custom operands handling

The original design of custom operands support assumed that most GPUs
have the same or very similar operand names end encodings. This is
no longer the case. As a result the support code becomes over-complicated
and difficult to maintain.

This change implements a different design with the following benefits:

- support of aliases;
- support of operands with overlapped encodings;
- identification of defined but unsupported operands.

Differential Revision: https://reviews.llvm.org/D121696
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
llvm/lib/Target/AMDGPU/SIDefines.h
llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.h
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h