+static inline int is_lowered_type(const ir_type *tp)
+{
+ return tp->flags & tf_lowered_type;
+}
+
+/**
+ * Gets the lowered/unlowered type of a type or NULL if this type
+ * has no lowered/unlowered one.
+ */
+static inline ir_type *get_associated_type(const ir_type *tp)
+{
+ return tp->assoc_type;
+}
+
+static inline void set_lowered_type(ir_type *tp, ir_type *lowered_type)
+{
+ assert (is_type(tp) && is_type(lowered_type));
+ lowered_type->flags |= tf_lowered_type;
+ tp->assoc_type = lowered_type;
+ lowered_type->assoc_type = tp;
+}
+