[llvm-dev] TableGen processing of target-specific intrinsics
Reid Kleckner via llvm-dev
llvm-dev at lists.llvm.org
Wed Sep 30 13:31:41 PDT 2020
On Wed, Sep 30, 2020 at 6:20 AM Nicolai Hähnle via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi Paul,
>
> the intrinsics of all backends together with the target-agnostic
> intrinsics are all part of a single large enum, and there are some
> subtle assumptions made e.g. about how the values in this enum are
> sorted (in order to emit tables that are suitable for binary search).
> So this is an area in which to tread carefully.
>
Strictly speaking, they are no longer part of the same enum:
http://github.com/llvm/llvm-project/commit/5d986953c8b917bacfaa1f800fc1e242559f76be
But yes, they use the same enumerator space, and tablgen processes them all
at once.
Processing intrinsics separately by target requires dividing the 32-bit
intrinsic opcode space up front. For example, we could use 8 bits for
target, 24 for intrinsics. This would make intrinsic ids no longer dense,
and no longer suitable as array indices, but perhaps having distinct arrays
per target is better anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200930/fb85d322/attachment.html>
More information about the llvm-dev
mailing list