+/**
+ * Returns a spill type for a mode. Keep them in a map to reduce
+ * the number of types.
+ */
+static ir_type *get_spill_type(pmap *types, ir_mode *mode) {
+ pmap_entry *e = pmap_find(types, mode);
+ ir_type *res;
+
+ if (! e) {
+ char buf[64];
+ snprintf(buf, sizeof(buf), "spill_slot_type_%s", get_mode_name(mode));
+ res = new_type_primitive(new_id_from_str(buf), mode);
+ pmap_insert(types, mode, res);
+ }
+ else
+ res = e->value;
+ return res;
+}
+