[PATCH] D142218: [MC] Store implicit ops immediately after the TargetInsts table. NFC.
Martien de Jong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 01:25:00 PDT 2023
martien-de-jong added inline comments.
================
Comment at: llvm/utils/TableGen/InstrInfoEmitter.cpp:922
+ OS << "#undef GET_INSTRINFO_MC_DESC\n";
+ OS << "namespace llvm {\n\n";
----------------
In some private table gen backend that also used these offset tables, we went away from the one raw out stream. Instead, there's an array abstraction that builds the body of the array in a stringstream and methods to generate the reference string (pointer to some element, or its index or offset) for e.g. the last added entry, or a given offset from a local base. It allows you to build all tables in one intuitive sweep, and then emit the accumulated bodies in some order to the output stream. If there's interest, I could probably share that table abstraction to add as common facility to tablegen.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142218/new/
https://reviews.llvm.org/D142218
More information about the llvm-commits
mailing list