[llvm-dev] Supporting freeze in GlobalISel / freeze semantics in MIR

Dominik Montada via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 9 02:46:37 PDT 2020


Hi all,

After a recent upstream merge into our downstream sources we are 
suddenly encountering the freeze instruction in LLVM IR for div/rem 
pairs. This seems to be related to [1].

Our downstream target is GlobalISel only and unfortunately GlobalISel 
doesn't support this instruction yet, so most of our internal test-suite 
is now breaking due to GlobalISel not being able to translate this 
instruction to MIR. We would like to add support for that, but it seems 
that it is not yet clear how this freeze instruction is supposed to look 
like in MIR.

In [2], which introduced the FREEZE node to SelectionDAG, there was a 
lengthier discussion which concluded that for now proper handling was 
only added to SelDAG and the MIR related patches would be left for a 
follow up. We would like to accelerate this follow up, because we 
obviously want to get our downstream backend working again.

One part of this discussion concerned how freeze should behave on MIR 
level. Especially if there needs to be a MIR FREEZE instruction and 
whether the semantics of IMPLICIT_DEF need to be changed.

In SelectionDAG, FREEZE is currently handled as a simple COPY. This 
seems to me like SelectionDAG ignores the semantics of FREEZE, since 
COPY has other semantics? Also, would this be acceptable for the 
GlobalISel IRTranslator (even if only as a first step)?

Best regards,

Dominik

[1] https://reviews.llvm.org/D76483
[2] https://reviews.llvm.org/D29014

P.S.: is there really no way to disable a single pass from command line? 
We would like to disable the DivRemPairs pass as a first workaround.

-- 
----------------------------------------------------------------------
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: 5409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200409/62e6c332/attachment.bin>


More information about the llvm-dev mailing list