[llvm-dev] RFC: [GlobalISel] Representing fp types in LLT

Dominik Montada via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 16 23:51:33 PST 2020


Am 17.12.20 um 03:13 schrieb Matt Arsenault via llvm-dev:
>
>> On Dec 8, 2020, at 14:02, Justin Bogner <mail at justinbogner.com> wrote:
>>
>> For a while now there have been discussions here and there about
>> representing floating point types explicitly in LLT. Having this type
>> information explicitly makes RegBankSelect easier to implement, avoids
>> inefficiencies in disambiguating which operation is needed to lower
>> various operations, and is necessary for correctness in light of variant
>> floating point types like bfloat.
>>
>> I believe there is general consensus that we need this, so this RFC is
>> about how we should go about modeling these types.
>>
>> At the dev meeting, we discussed two approaches IIRC:
>>
>> 1. Explicitly encode the number of bits in the exponent and mantissa for
>>    flexibility
>> 2. Encode only the types we need (ie, model the same fp types as
>>    llvm::Type does)
>>
> Yes, I think encoding the FP mode would be overkill. I do think we shouldn’t go too far into treating these as FP types mirroring the IR though. I would still like to be able to directly operate on these with integer operations without intermediate bitcasts. Only lowerings which really care about the FP semantics would need to treat these differently.

Same here. Our target doesn't have any FPRs, so all floats are handled 
exactly the same as integers. So if possible I'd like to keep using the 
existing handling in places where I really don't care about floats.

Cheers,

Dominik

> I do think threading these through all the existing legalizer code could be painful, since quite a few places create out of context scalar types whereas now they would need to take care to pass through the FP-bits.
>
> -Matt
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-- 
----------------------------------------------------------------------
Dominik Montada                   Email: dominik.montada at hightec-rt.com
HighTec EDV-Systeme GmbH          Phone: +49 681 92613 19
Europaallee 19                    Fax:   +49-681-92613-26
D-66113 Saarbrücken               WWW: http://www.hightec-rt.com

Managing Director: Vera Strothmann
Register Court: Saarbrücken, HRB 10445, VAT ID: DE 138344222

This e-mail may contain confidential and/or privileged information. If
you are not the intended recipient please notify the sender immediately
and destroy this e-mail. Any unauthorised copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
---

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6822 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201217/fbc787b1/attachment-0001.bin>


More information about the llvm-dev mailing list