[AMDGPU][MC] Refactored parsing of dpp ctrl
authorDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>
Mon, 18 Jan 2021 12:16:46 +0000 (15:16 +0300)
committerDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>
Mon, 18 Jan 2021 15:14:19 +0000 (18:14 +0300)
commit55c557a5d25fd0f4db55fc4a406a1ea74594cfad
tree307cf1df0955e963607de780cae57d0e81a477e7
parent3dbbadb8ef53d1e91785c17ccd70848de7e842e9
[AMDGPU][MC] Refactored parsing of dpp ctrl

Summary of changes:
- simplified code to improve maintainability;
- replaced lex() with higher level parser functions;
- improved errors handling.

Reviewers: rampitec

Differential Revision: https://reviews.llvm.org/D94777
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
llvm/test/MC/AMDGPU/gfx10_err_pos.s
llvm/test/MC/AMDGPU/regression/bug28538.s