[llvm] Switch the intrinsic names to a string table (PR #118929)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 7 16:49:57 PST 2024
jurahul wrote:
They cannot be negative.
On Sat, Dec 7, 2024 at 1:28 PM Nikita Popov ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In llvm/utils/TableGen/IntrinsicEmitter.cpp
> <https://github.com/llvm/llvm-project/pull/118929#discussion_r1874566596>:
>
> > OS << R"(// Intrinsic ID to name table.
> #ifdef GET_INTRINSIC_NAME_TABLE
> // Note that entry #0 is the invalid intrinsic!
> +
> +)";
> +
> + Table.EmitStringLiteralDef(OS, "static constexpr char IntrinsicNameTable[]",
> + /*Indent=*/"");
> +
> + OS << R"(
> +static constexpr int IntrinsicNameOffsetTable[] = {
>
> ⬇️ Suggested change
>
> -static constexpr int IntrinsicNameOffsetTable[] = {
> +static constexpr unsigned IntrinsicNameOffsetTable[] = {
>
> Or uint32_t -- or can these offset be negative?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/llvm/llvm-project/pull/118929#pullrequestreview-2486687159>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/APRMUB4XCPWGTSX57EGGTBL2ENSATAVCNFSM6AAAAABTD72F3CVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIOBWGY4DOMJVHE>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
https://github.com/llvm/llvm-project/pull/118929
More information about the llvm-commits
mailing list