summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-20 21:19:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-20 21:19:10 +0000
commitd99dafe2e4a385dd2a6c76da6d8258deb100657b (patch)
treeba60bf957558bd114f25dbff3d4996b5d7a61c82 /utils
parent71d5a2540a98c81f5bcaeb48805e0e2881f530ef (diff)
Notes
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp39
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp22
2 files changed, 54 insertions, 7 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index d93511b0d873..03c58ac09c2d 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -126,6 +126,45 @@ StringRef llvm::getEnumName(MVT::SimpleValueType T) {
case MVT::v2f64: return "MVT::v2f64";
case MVT::v4f64: return "MVT::v4f64";
case MVT::v8f64: return "MVT::v8f64";
+ case MVT::nxv2i1: return "MVT::nxv2i1";
+ case MVT::nxv4i1: return "MVT::nxv4i1";
+ case MVT::nxv8i1: return "MVT::nxv8i1";
+ case MVT::nxv16i1: return "MVT::nxv16i1";
+ case MVT::nxv32i1: return "MVT::nxv32i1";
+ case MVT::nxv1i8: return "MVT::nxv1i8";
+ case MVT::nxv2i8: return "MVT::nxv2i8";
+ case MVT::nxv4i8: return "MVT::nxv4i8";
+ case MVT::nxv8i8: return "MVT::nxv8i8";
+ case MVT::nxv16i8: return "MVT::nxv16i8";
+ case MVT::nxv32i8: return "MVT::nxv32i8";
+ case MVT::nxv1i16: return "MVT::nxv1i16";
+ case MVT::nxv2i16: return "MVT::nxv2i16";
+ case MVT::nxv4i16: return "MVT::nxv4i16";
+ case MVT::nxv8i16: return "MVT::nxv8i16";
+ case MVT::nxv16i16: return "MVT::nxv16i16";
+ case MVT::nxv32i16: return "MVT::nxv32i16";
+ case MVT::nxv1i32: return "MVT::nxv1i32";
+ case MVT::nxv2i32: return "MVT::nxv2i32";
+ case MVT::nxv4i32: return "MVT::nxv4i32";
+ case MVT::nxv8i32: return "MVT::nxv8i32";
+ case MVT::nxv16i32: return "MVT::nxv16i32";
+ case MVT::nxv1i64: return "MVT::nxv1i64";
+ case MVT::nxv2i64: return "MVT::nxv2i64";
+ case MVT::nxv4i64: return "MVT::nxv4i64";
+ case MVT::nxv8i64: return "MVT::nxv8i64";
+ case MVT::nxv16i64: return "MVT::nxv16i64";
+ case MVT::nxv2f16: return "MVT::nxv2f16";
+ case MVT::nxv4f16: return "MVT::nxv4f16";
+ case MVT::nxv8f16: return "MVT::nxv8f16";
+ case MVT::nxv1f32: return "MVT::nxv1f32";
+ case MVT::nxv2f32: return "MVT::nxv2f32";
+ case MVT::nxv4f32: return "MVT::nxv4f32";
+ case MVT::nxv8f32: return "MVT::nxv8f32";
+ case MVT::nxv16f32: return "MVT::nxv16f32";
+ case MVT::nxv1f64: return "MVT::nxv1f64";
+ case MVT::nxv2f64: return "MVT::nxv2f64";
+ case MVT::nxv4f64: return "MVT::nxv4f64";
+ case MVT::nxv8f64: return "MVT::nxv8f64";
case MVT::token: return "MVT::token";
case MVT::Metadata: return "MVT::Metadata";
case MVT::iPTR: return "MVT::iPTR";
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index e9dd2fa0aca0..e979b94e46d6 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -84,14 +84,11 @@ void IntrinsicEmitter::run(raw_ostream &OS) {
// Emit the intrinsic parameter attributes.
EmitAttributes(Ints, OS);
- // Individual targets don't need GCC builtin name mappings.
- if (!TargetOnly) {
- // Emit code to translate GCC builtins into LLVM intrinsics.
- EmitIntrinsicToBuiltinMap(Ints, true, OS);
+ // Emit code to translate GCC builtins into LLVM intrinsics.
+ EmitIntrinsicToBuiltinMap(Ints, true, OS);
- // Emit code to translate MS builtins into LLVM intrinsics.
- EmitIntrinsicToBuiltinMap(Ints, false, OS);
- }
+ // Emit code to translate MS builtins into LLVM intrinsics.
+ EmitIntrinsicToBuiltinMap(Ints, false, OS);
EmitSuffix(OS);
}
@@ -756,6 +753,17 @@ void IntrinsicEmitter::EmitIntrinsicToBuiltinMap(
<< "Builtin(const char "
<< "*TargetPrefixStr, StringRef BuiltinNameStr) {\n";
}
+
+ if (Table.Empty()) {
+ OS << " return ";
+ if (!TargetPrefix.empty())
+ OS << "(" << TargetPrefix << "Intrinsic::ID)";
+ OS << "Intrinsic::not_intrinsic;\n";
+ OS << "}\n";
+ OS << "#endif\n\n";
+ return;
+ }
+
OS << " static const char BuiltinNames[] = {\n";
Table.EmitCharArray(OS);
OS << " };\n\n";