diff options
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
| -rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 2c1583f7979d..af2e8576af2e 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -14,16 +14,13 @@ //===----------------------------------------------------------------------===// #include "CodeGenTarget.h" -#include "CodeGenDAGPatterns.h" +#include "CodeGenInstruction.h" #include "CodeGenIntrinsics.h" #include "CodeGenSchedule.h" #include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/StringExtras.h" #include "llvm/Support/CommandLine.h" -#include "llvm/Support/Timer.h" #include "llvm/TableGen/Error.h" #include "llvm/TableGen/Record.h" -#include "llvm/TableGen/TableGenBackend.h" #include <algorithm> using namespace llvm; @@ -56,9 +53,12 @@ StringRef llvm::getName(MVT::SimpleValueType T) { } StringRef llvm::getEnumName(MVT::SimpleValueType T) { + // clang-format off switch (T) { case MVT::Other: return "MVT::Other"; case MVT::i1: return "MVT::i1"; + case MVT::i2: return "MVT::i2"; + case MVT::i4: return "MVT::i4"; case MVT::i8: return "MVT::i8"; case MVT::i16: return "MVT::i16"; case MVT::i32: return "MVT::i32"; @@ -91,6 +91,8 @@ StringRef llvm::getEnumName(MVT::SimpleValueType T) { case MVT::v256i1: return "MVT::v256i1"; case MVT::v512i1: return "MVT::v512i1"; case MVT::v1024i1: return "MVT::v1024i1"; + case MVT::v128i2: return "MVT::v128i2"; + case MVT::v64i4: return "MVT::v64i4"; case MVT::v1i8: return "MVT::v1i8"; case MVT::v2i8: return "MVT::v2i8"; case MVT::v4i8: return "MVT::v4i8"; @@ -227,6 +229,8 @@ StringRef llvm::getEnumName(MVT::SimpleValueType T) { case MVT::nxv2bf16: return "MVT::nxv2bf16"; case MVT::nxv4bf16: return "MVT::nxv4bf16"; case MVT::nxv8bf16: return "MVT::nxv8bf16"; + case MVT::nxv16bf16: return "MVT::nxv16bf16"; + case MVT::nxv32bf16: return "MVT::nxv32bf16"; case MVT::nxv1f32: return "MVT::nxv1f32"; case MVT::nxv2f32: return "MVT::nxv2f32"; case MVT::nxv4f32: return "MVT::nxv4f32"; @@ -245,6 +249,7 @@ StringRef llvm::getEnumName(MVT::SimpleValueType T) { case MVT::externref: return "MVT::externref"; default: llvm_unreachable("ILLEGAL VALUE TYPE!"); } + // clang-format on } /// getQualifiedName - Return the name of the specified record, with a @@ -471,7 +476,7 @@ GetInstByName(const char *Name, return I->second.get(); } -static const char *const FixedInstrs[] = { +static const char *FixedInstrs[] = { #define HANDLE_TARGET_OPCODE(OPC) #OPC, #include "llvm/Support/TargetOpcodes.def" nullptr}; @@ -555,7 +560,7 @@ void CodeGenTarget::reverseBitsForLittleEndianEncoding() { NewBits[middle] = BI->getBit(middle); } - BitsInit *NewBI = BitsInit::get(NewBits); + BitsInit *NewBI = BitsInit::get(Records, NewBits); // Update the bits in reversed order so that emitInstrOpBits will get the // correct endianness. @@ -666,6 +671,7 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, isCommutative = false; canThrow = false; isNoReturn = false; + isNoCallback = false; isNoSync = false; isNoFree = false; isWillReturn = false; @@ -682,8 +688,8 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, EnumName = DefName.substr(4); - if (R->getValue("GCCBuiltinName")) // Ignore a missing GCCBuiltinName field. - GCCBuiltinName = std::string(R->getValueAsString("GCCBuiltinName")); + if (R->getValue("ClangBuiltinName")) // Ignore a missing ClangBuiltinName field. + ClangBuiltinName = std::string(R->getValueAsString("ClangBuiltinName")); if (R->getValue("MSBuiltinName")) // Ignore a missing MSBuiltinName field. MSBuiltinName = std::string(R->getValueAsString("MSBuiltinName")); @@ -864,6 +870,8 @@ void CodeGenIntrinsic::setProperty(Record *R) { isConvergent = true; else if (R->getName() == "IntrNoReturn") isNoReturn = true; + else if (R->getName() == "IntrNoCallback") + isNoCallback = true; else if (R->getName() == "IntrNoSync") isNoSync = true; else if (R->getName() == "IntrNoFree") |
