Commit f4f2fc2d authored by Christoph Mallon's avatar Christoph Mallon
Browse files

tr: Remove the concept of 'higher type'.

A higher type was set in a few places, but not used otherwise.
parent ae42d217
......@@ -199,8 +199,6 @@ static ir_type *lower_mtp(lowering_env_t const *const env, ir_type *mtp)
for (size_t i = 0; i < nn_ress; ++i)
set_method_res_type(lowered, i, results[i]);
/* associate the lowered type with the original one for easier access */
set_higher_type(lowered, mtp);
pmap_insert(lowered_mtps, mtp, lowered);
return lowered;
......
......@@ -1625,7 +1625,6 @@ static ir_type *lower_mtp(ir_type *mtp)
set_method_res_type(res, n_res++, tp);
}
set_higher_type(res, mtp);
set_type_link(res, mtp);
mark_type_visited(res);
......
......@@ -356,8 +356,6 @@ static ir_type *lower_method_type(ir_type *mtp)
set_method_res_type(res, i, rtp);
}
set_higher_type(res, mtp);
pmap_insert(lowered_type, mtp, res);
return res;
}
......
......@@ -547,7 +547,6 @@ ir_type *clone_type_method(ir_type *const tp, bool const is_variadic, mtp_additi
set_type_dbg_info(res, db);
res->flags = tp->flags;
res->higher_type = tp->higher_type;
res->size = tp->size;
res->attr.method.n_params = n_params;
res->attr.method.params = XMALLOCN(ir_type*, n_params);
......
......@@ -86,12 +86,11 @@ typedef struct {
typedef enum type_flags {
tf_none = 0, /**< No flags. */
tf_compound = 1U << 0, /**< Set if type is a compound type. */
tf_lowered_type = 1U << 1, /**< Set if this is a lowered type. */
tf_layout_fixed = 1U << 2, /**< Set if the layout of a type is fixed */
tf_layout_fixed = 1U << 1, /**< Set if the layout of a type is fixed */
tf_frame_type = 1U << 3, /**< Set if this is a frame type. */
tf_info = 1U << 4, /**< infos (for example constructor, destructor pointers), all members are anonymous */
tf_lowered_dw = 1U << 5, /**< hack to identify lowered doubleword params */
tf_frame_type = 1U << 2, /**< Set if this is a frame type. */
tf_info = 1U << 3, /**< infos (for example constructor, destructor pointers), all members are anonymous */
tf_lowered_dw = 1U << 4, /**< hack to identify lowered doubleword params */
} type_flags;
ENUM_BITSET(type_flags)
......@@ -126,8 +125,6 @@ struct ir_type {
ir_visited_t visit; /**< visited counter for walks of the type information */
void *link; /**< holds temporary data - like in irnode_t.h */
type_dbg_info *dbi; /**< A pointer to information for debug support. */
ir_type *higher_type; /**< link to highlevel type in case of lowered
types */
long nr; /**< An unique number for each type. */
union {
compound_attr compound;
......@@ -170,22 +167,6 @@ static inline ir_visited_t get_master_type_visited_(void)
return firm_type_visited;
}
static inline int is_lowered_type(const ir_type *tp)
{
return tp->flags & tf_lowered_type;
}
static inline ir_type *get_higher_type(const ir_type *tp)
{
return tp->higher_type;
}
static inline void set_higher_type(ir_type *tp, ir_type *higher_type)
{
tp->flags |= tf_lowered_type;
tp->higher_type = higher_type;
}
static inline void *get_type_link_(const ir_type *tp)
{
assert(tp->kind == k_type);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment