Commit 683378aa authored by Matthias Braun's avatar Matthias Braun Committed by Matthias Braun
Browse files

remove InstOf node

This node was used by OO code in the past, but newer versions of liboo
have their own node and don't need it anymore.
parent 7f971167
......@@ -356,7 +356,7 @@ static int vrp_update_node(ir_vrp_info *info, ir_node *node)
is_Carry(node) is_Cmp(node) is_Cond(node)
is_CopyB(node) is_Div(node) is_Dummy(node)
is_End(node) is_Free(node)
is_IJmp(node) is_InstOf(node) is_Jmp(node) is_Load(node) is_Minus(node)
is_IJmp(node) is_Jmp(node) is_Load(node) is_Minus(node)
is_Mod(node) is_Mul(node) is_Mulh(node) is_Mux(node) is_NoMem(node)
is_Pin(node) is_Proj(node)
is_Raise(node) is_Return(node) is_Sel(node) is_Start(node) is_Store(node)
......
......@@ -1120,7 +1120,6 @@ void ir_register_getter_ops(void)
register_get_type_func(op_Builtin, get_Builtin_type);
register_get_type_func(op_Call, get_Call_type);
register_get_type_func(op_CopyB, get_CopyB_type);
register_get_type_func(op_InstOf, get_InstOf_type);
register_get_type_func(op_SymConst, get_SymConst_attr_type);
register_get_entity_func(op_SymConst, get_SymConst_attr_entity);
......
......@@ -430,13 +430,6 @@ static int node_cmp_attr_Dummy(const ir_node *a, const ir_node *b)
return 1;
}
static int node_cmp_attr_InstOf(const ir_node *a, const ir_node *b)
{
if (get_InstOf_type(a) != get_InstOf_type(b))
return 1;
return node_cmp_exception(a, b);
}
static void default_copy_attr(ir_graph *irg, const ir_node *old_node,
ir_node *new_node)
{
......@@ -600,7 +593,6 @@ void firm_init_op(void)
set_op_cmp_attr(op_CopyB, node_cmp_attr_CopyB);
set_op_cmp_attr(op_Div, node_cmp_attr_Div);
set_op_cmp_attr(op_Dummy, node_cmp_attr_Dummy);
set_op_cmp_attr(op_InstOf, node_cmp_attr_InstOf);
set_op_cmp_attr(op_Load, node_cmp_attr_Load);
set_op_cmp_attr(op_Mod, node_cmp_attr_Mod);
set_op_cmp_attr(op_Phi, node_cmp_attr_Phi);
......
......@@ -275,12 +275,6 @@ typedef struct alloc_attr {
unsigned alignment;
} alloc_attr;
/** InstOf attributes. */
typedef struct io_attr {
except_attr exc; /**< the exception attribute. MUST be the first one. */
ir_type *type; /**< the type of which the object pointer must be */
} io_attr;
/** Load attributes. */
typedef struct load_attr {
except_attr exc; /**< The exception attribute. MUST be the first one. */
......@@ -371,7 +365,6 @@ typedef union ir_attr {
call_attr call; /**< For Call. */
builtin_attr builtin; /**< For Builtin. */
alloc_attr alloc; /**< For Alloc. */
io_attr instof; /**< For InstOf */
load_attr load; /**< For Load. */
store_attr store; /**< For Store. */
phi_attr phi; /**< For Phi. */
......
......@@ -286,27 +286,6 @@ static int verify_node_Proj_Raise(const ir_node *p)
return 1;
}
/**
* verify a Proj(InstOf) node
*/
static int verify_node_Proj_InstOf(const ir_node *p)
{
ir_mode *mode = get_irn_mode(p);
long proj = get_Proj_proj(p);
ASSERT_AND_RET_DBG(
(
(proj == pn_InstOf_M && mode == mode_M) ||
(proj == pn_InstOf_X_regular && mode == mode_X) ||
(proj == pn_InstOf_X_except && mode == mode_X) ||
(proj == pn_InstOf_res && mode_is_reference(mode))
),
"wrong Proj from InstOf", 0,
show_proj_failure(p);
);
return 1;
}
/**
* verify a Proj(Call) node
*/
......@@ -884,19 +863,6 @@ static int verify_node_Sel(const ir_node *n)
return 1;
}
/**
* verify an InstOf node
*/
static int verify_node_InstOf(const ir_node *n)
{
ir_mode *mymode = get_irn_mode(n);
ir_mode *op1mode = get_irn_mode(get_InstOf_obj(n));
ASSERT_AND_RET(mode_T == mymode, "mode of Instof is not a tuple", 0);
ASSERT_AND_RET(mode_is_data(op1mode), "Instof not on data", 0);
return 1;
}
/**
* Check if the pinned state is right.
*/
......@@ -1994,7 +1960,6 @@ void ir_register_verify_node_ops(void)
register_verify_node_func(op_Eor, verify_node_Eor);
register_verify_node_func(op_Free, verify_node_Free);
register_verify_node_func(op_IJmp, verify_node_IJmp);
register_verify_node_func(op_InstOf, verify_node_InstOf);
register_verify_node_func(op_Jmp, verify_node_Jmp);
register_verify_node_func(op_Load, verify_node_Load);
register_verify_node_func(op_Minus, verify_node_Minus);
......@@ -2023,7 +1988,6 @@ void ir_register_verify_node_ops(void)
register_verify_node_func_proj(op_Call, verify_node_Proj_Call);
register_verify_node_func_proj(op_Cond, verify_node_Proj_Cond);
register_verify_node_func_proj(op_Div, verify_node_Proj_Div);
register_verify_node_func_proj(op_InstOf, verify_node_Proj_InstOf);
register_verify_node_func_proj(op_Load, verify_node_Proj_Load);
register_verify_node_func_proj(op_Mod, verify_node_Proj_Mod);
register_verify_node_func_proj(op_Proj, verify_node_Proj_Proj);
......
......@@ -525,31 +525,6 @@ class IJmp:
]
flags = [ "cfopcode", "forking", "keep", "unknown_jump" ]
@op
class InstOf:
"""Tests whether an object is an instance of a class-type"""
ins = [
("store", "memory dependency"),
("obj", "pointer to object being queried")
]
outs = [
("M", "memory result"),
("res", "checked object pointer"),
("X_regular", "control flow when no exception occurs"),
("X_except", "control flow when exception occured"),
]
flags = [ "highlevel" ]
attrs = [
dict(
name = "type",
type = "ir_type*",
comment = "type to check ptr for",
)
]
attr_struct = "io_attr"
pinned = "exception"
pinned_init = "op_pin_state_floats"
@op
class Jmp:
"""Jumps to the block connected through the out-value"""
......
Markdown is supported
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