[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

Luke Geeson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 13 06:22:12 PDT 2020


LukeGeeson added a comment.

In D76077#1919861 <https://reviews.llvm.org/D76077#1919861>, @rjmccall wrote:

> I don't understand why you wouldn't add a new IR type for this; doing so should be totally mechanical.


We had a few reasons for doing it this way.

By adding a new IR type we would need to consider calling conventions, and IR optimizations for what is essentially an opaque storage-only type.

Bfloat has no soft ABI, and all the supported operations can be handled through intrinsics (in a later patch, removed here due to bloat). If we were to add a new IR type, then we would need to handle many operations which would extend beyond what the type is supported for. For instance in GCC we had to add a new mode in RTL to handle inline memcopy.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76077/new/

https://reviews.llvm.org/D76077





More information about the cfe-commits mailing list