[PATCH] D25530: [MIRParser] Parse lane masks in block liveins
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 12:47:16 PDT 2016
kparzysz created this revision.
kparzysz added a reviewer: MatzeB.
kparzysz added a subscriber: llvm-commits.
kparzysz set the repository for this revision to rL LLVM.
Add a token HexLiteral that contains uninterpreted hexadecimal string that could be either an integer, or a floating-point representation. When parsing block liveins, if a register name is followed by :, expect a lane mask value (either decimal or hexadecimal with 0x).
As it is now (even before this patch), there is no way to tell whether a hex value corresponds to an integer, or a floating-point. If floating-point literals were required to have a special prefix (which would be really, really nice), one could disambiguate between integers and floating-point values by just looking at the literal (which would be even nicer). This would remove the need for HexLiteral, which now needs to be interpreted further based on what is expected (which is not quite as nice as it could be).
May I suggest that floating-point hexadecimal values are required to have such a prefix? Because that would be really nice. :)
Repository:
rL LLVM
https://reviews.llvm.org/D25530
Files:
lib/CodeGen/MIRParser/MILexer.cpp
lib/CodeGen/MIRParser/MILexer.h
lib/CodeGen/MIRParser/MIParser.cpp
lib/CodeGen/MIRPrinter.cpp
test/CodeGen/MIR/Hexagon/parse-lane-masks.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25530.74421.patch
Type: text/x-patch
Size: 6061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161012/dc8e395b/attachment.bin>
More information about the llvm-commits
mailing list