[llvm-commits] Patch: Fast-math flags for intrinsics

Chandler Carruth chandlerc at google.com
Tue Dec 18 14:27:02 PST 2012


On Tue, Dec 18, 2012 at 2:07 PM, Michael Ilseman <milseman at apple.com> wrote:

> Attached are patches for fast-math support for IntrinsicInst.


I have one specific concern:

This includes bitcode changes to separate out IntrinsicInsts from CallInsts.
>

<snip>

Previously, IntrinsicInsts were handled as CallInsts. However, intrinsics
> can now have fast-math flags, and thus merit a separate bitcode encoding.
> This change adds FUNC_CODE_INST_INTRINSIC for intrinsic calls, separates
> them out from general calls, and adds encoding and decoding of fast-math
> flags. Backwards compatibility is retained. Adds parsing fast-math flags
> for IntrinsicInsts, and more tests.
>

This seems like a terrible consequence of using flags instead of metadata.
Why is this a good thing to do?

I think we either need to either not have fast math markers on intrinsics
or provide metadata alternatives to the flags so we can use that
pre-existing general mechanism for extending the set of information we have
about a particular group of instructions.

Making calls to intrinsic functions less like any other call adds
complexity to the entire IR just to support a few intrinsics and a few
special-purpose optimizations.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121218/23661b19/attachment.html>


More information about the llvm-commits mailing list