[PATCH] D19584: AMDGPU/SI: Assembler: Unify parsing/printing of operands.
Artem Tamazov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 27 06:48:59 PDT 2016
artem.tamazov accepted this revision.
artem.tamazov added a comment.
Make it so.
================
Comment at: lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:1971
@@ +1970,3 @@
+ StringRef Tok;
+ if (getLexer().isNot(AsmToken::EndOfStatement) && getLexer().getKind() == AsmToken::Identifier) {
+ Tok = Parser.getTok().getString();
----------------
getLexer().is(AsmToken::Identifier) would be better.
getLexer().isNot(AsmToken::EndOfStatement) seems useless.
================
Comment at: lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp:1984
@@ +1983,3 @@
+ (Op.Name == Name) ||
+ (Name == "omod" && Op.Type == AMDGPUOperand::ImmTyOModSI);
+ if (parseThis && Tok == Name) {
----------------
I would put an explanation why omod is handled separately.
http://reviews.llvm.org/D19584
More information about the llvm-commits
mailing list