[llvm-dev] [RFC] Eliminating non-IR floating-point controls in the selection DAG

Renato Golin via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 3 04:06:12 PDT 2021


On Tue, 2 Nov 2021 at 23:09, Kaylor, Andrew <andrew.kaylor at intel.com> wrote:

> I wasn’t aware of the problem that Phoebe brought up with regards to the
> fast-math flags being dropped. I also haven’t looked to see what is
> happening in GlobalISel. So, I may be underestimating the amount of work to
> make this transition.
>

I'm not sure FastISel is still used, but if it is, we can't break it either
(before fully deprecating it, at least).

Getting the existing LIT tests to pass doesn’t seem to be a problem.
> Avoiding all performance regressions in real-world code could be.
>

LIT tests only cover upstream IR generation. There's an additional item
there: warn downstream front-ends to check their IR with the flag set.


> It may be possible to write a verifier-like utility pass that would try to
> detect when the flags were lost, but I haven’t thought that through.
>

That'd possibly need caching instructions that do have it. Perhaps easier
to add a library (not a pass) to compare before and after for any
transformation pass that is about to replace-all-users-with.

 As for the transition plan for out-of-tree front ends, I was thinking of
> something very similar to what Phoebe suggested in her most recent reply on
> this thread, but I was thinking of having the “fixup” pass run during the
> codegen prepare phase. The way I envision it would be this:
>

SGTM.

cheers,
--renato

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20211103/11b790ff/attachment.html>


More information about the llvm-dev mailing list