[PATCH] D25530: [MIRParser] Parse lane masks in block liveins

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 13:35:20 PDT 2016


> On Oct 12, 2016, at 12:47 PM, Krzysztof Parzyszek via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> 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. :)
I looked into that shortly and it seems we basically reuse the parsing infrastructure for .ll files for float literals. I am not sure we can/should change the .ll file syntax at this point.

- Matthias


More information about the llvm-commits mailing list