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

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 14:01:21 PDT 2016


On 10/12/2016 3:35 PM, Matthias Braun wrote:
>
>> On Oct 12, 2016, at 12:47 PM, Krzysztof Parzyszek via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> 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.

Yes, but the MIR parser/printer could always require/emit a prefix. 
There is already a check for H, K, L or M, but those are never used in 
any .mir testcase. There is at least one for NVPTX that has floating 
point values given in hex, and it would need to have these prefixes added.
MIR does not have implicit conversions from integer to floating-point, 
so there is no risk of having someone use a pure 0x... string with the 
intention of it being a bit-pattern for a floating point value, when it 
would be parsed as an integer, then implicitly converted to a float.

I hope that the .ll parser understands the floating point prefixes. If 
not, we could still create a FloatingPointValue token, except it would 
have a string value with the prefix removed.

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-commits mailing list