diff options
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 3cae27f82b0..a22418c6eae 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -301,6 +301,9 @@ GetInstByName(const char *Name, /// their enum value. void CodeGenTarget::ComputeInstrsByEnum() const { // The ordering here must match the ordering in TargetOpcodes.h. + // FIXME: It would be nice to have the opcode directly extracted + // to avoid potential errors. At the very, least a compile time + // error would be appreciated if the order does not match. static const char *const FixedInstrs[] = { "PHI", "INLINEASM", "CFI_INSTRUCTION", "EH_LABEL", "GC_LABEL", "KILL", "EXTRACT_SUBREG", "INSERT_SUBREG", @@ -308,6 +311,8 @@ void CodeGenTarget::ComputeInstrsByEnum() const { "REG_SEQUENCE", "COPY", "BUNDLE", "LIFETIME_START", "LIFETIME_END", "STACKMAP", "PATCHPOINT", "LOAD_STACK_GUARD", "STATEPOINT", "LOCAL_ESCAPE", "FAULTING_LOAD_OP", + // Generic opcodes for GlobalISel start here. + "G_ADD", nullptr}; const auto &Insts = getInstructions(); for (const char *const *p = FixedInstrs; *p; ++p) { |