[PATCH] D42746: MIR PhysReg sigil change from '%' to '$'
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 10:29:02 PST 2018
MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.
Thanks for doing all the testcase fixup work!
LGTM with some nitpicks addressed:
- Probably a good idea to include a link to the mailing list discussion in the commit message
================
Comment at: lib/CodeGen/MIRParser/MILexer.cpp:413-434
+static Cursor maybeLexRegister(Cursor C, MIToken &Token,
+ ErrorCallbackType ErrorCallback) {
+ if (C.peek() != '%' && C.peek() != '$')
return None;
- if (isdigit(C.peek(1)))
- return lexVirtualRegister(C, Token);
+
+ if (C.peek() == '%') {
+ if (isdigit(C.peek(1)))
----------------
You could split this into `maybeLexPhysicalRegister()` and `maybeLexVirtualRegister()`, given that there is no shared logic anymore between the two cases.
Repository:
rL LLVM
https://reviews.llvm.org/D42746
More information about the llvm-commits
mailing list