// Emit the intrinsic ID -> name table.
EmitIntrinsicToNameTable(Ints, OS);
-
+
+ // Emit the intrinsic ID -> overload table.
+ EmitIntrinsicToOverloadTable(Ints, OS);
+
// Emit the function name recognizer.
EmitFnNameRecognizer(Ints, OS);
OS << "#endif\n\n";
}
+void IntrinsicEmitter::
+EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints,
+ std::ostream &OS) {
+ OS << "// Intrinsic ID to overload table\n";
+ OS << "#ifdef GET_INTRINSIC_OVERLOAD_TABLE\n";
+ OS << " // Note that entry #0 is the invalid intrinsic!\n";
+ for (unsigned i = 0, e = Ints.size(); i != e; ++i) {
+ OS << " ";
+ if (Ints[i].isOverloaded)
+ OS << "true";
+ else
+ OS << "false";
+ OS << ",\n";
+ }
+ OS << "#endif\n\n";
+}
+
static void EmitTypeForValueType(std::ostream &OS, MVT::SimpleValueType VT) {
if (MVT(VT).isInteger()) {
unsigned BitWidth = MVT(VT).getSizeInBits();
}
}
-/// RecordListComparator - Provide a determinstic comparator for lists of
+/// RecordListComparator - Provide a deterministic comparator for lists of
/// records.
namespace {
typedef std::pair<std::vector<Record*>, std::vector<Record*> > RecPair;