*/
FIRM_API int is_value_param_type(const ir_type *tp);
-/**
- * Checks, whether a type is a lowered type.
- */
-FIRM_API int is_lowered_type(const ir_type *tp);
-
/**
* Makes a new value type. Value types are struct types,
* so all struct access functions work.
*/
FIRM_API ir_type *clone_frame_type(ir_type *type);
-/**
- * Sets a lowered type for a type. This sets both associations
- * and marks lowered_type as a "lowered" one.
- */
-FIRM_API void set_lowered_type(ir_type *tp, ir_type *lowered_type);
-
-/**
- * Gets the lowered/unlowered type of a type or NULL if this type
- * has no lowered/unlowered one.
- */
-FIRM_API ir_type *get_associated_type(const ir_type *tp);
-
/**
* Allocate an area of size bytes aligned at alignment
* at the start or the end of a frame type.
return tp->flags & tf_value_param_type;
}
-int is_lowered_type(const ir_type *tp)
-{
- return tp->flags & tf_lowered_type;
-}
-
ir_type *new_type_value(void)
{
ir_type *res = new_type_struct(new_id_from_str("<value_type>"));
return res;
}
-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;
- /* there might be a chain of lowerings, get to the start */
- while (is_lowered_type(tp)) {
- tp = tp->assoc_type;
- }
- tp->assoc_type = lowered_type;
- lowered_type->assoc_type = tp;
-}
-
-ir_type *get_associated_type(const ir_type *tp)
-{
- return tp->assoc_type;
-}
-
void set_default_size(ir_type *tp, unsigned size)
{
tp->size = size;
static inline ir_visited_t _get_master_type_visited(void) { return firm_type_visited; }
static inline void _inc_master_type_visited(void) { ++firm_type_visited; }
+static inline int is_lowered_type(const ir_type *tp)
+{
+ return tp->flags & tf_lowered_type;
+}
+
static inline ir_type *get_type_unlowered(const ir_type *tp)
{
assert (is_lowered_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;
+ /* there might be a chain of lowerings, get to the start */
+ while (is_lowered_type(tp)) {
+ tp = tp->assoc_type;
+ }
+ tp->assoc_type = lowered_type;
+ lowered_type->assoc_type = tp;
+}
static inline void *_get_type_link(const ir_type *tp)
{