Commit 115b9e0e authored by Matthias Braun's avatar Matthias Braun
Browse files

remove unused/unsupported Carry and Borrow nodes

[r27831]
parent eb82a990
......@@ -284,8 +284,6 @@
* ir_node *new_Cmp (ir_node *op1, ir_node *op2);
* ir_node *new_Conv (ir_node *op, ir_mode *mode);
* ir_node *new_Cast (ir_node *op, ir_type *to_tp);
* ir_node *new_Carry (ir_node *op1, ir_node *op2, ir_mode *mode);
* ir_node *new_Borrow (ir_node *op1, ir_node *op2, ir_mode *mode);
* ir_node *new_Load (ir_node *store, ir_node *addr, ir_mode *mode, ir_cons_flags flags);
* ir_node *new_Store (ir_node *store, ir_node *addr, ir_node *val, ir_cons_flags flags);
* ir_node *new_Alloc (ir_node *store, ir_node *count, ir_type *alloc_type,
......@@ -769,18 +767,6 @@
*
* Rotates the operand to the left by k bits.
*
* ir_node *new_Carry (ir_node *op1, ir_node *op2, ir_mode *mode)
* ------------------------------------------------------------
*
* Calculates the Carry value for integer addition. Used only
* in lowering code.
*
* ir_node *new_Borrow (ir_node *op1, ir_node *op2, ir_mode *mode)
* ------------------------------------------------------------
*
* Calculates the Borrow value for integer substraction. Used only
* in lowering code.
*
* ir_node *new_Conv (ir_node *op, ir_mode *mode)
* ---------------------------------------------
*
......@@ -1696,28 +1682,6 @@ FIRM_API ir_node *new_rd_strictConv(dbg_info *db, ir_node *block,
FIRM_API ir_node *new_rd_Cast(dbg_info *db, ir_node *block,
ir_node *op, ir_type *to_tp);
/** Constructor for a Carry node.
*
* @param *db A pointer for debug information.
* @param *block The IR block the node belongs to.
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
FIRM_API ir_node *new_rd_Carry(dbg_info *db, ir_node *block,
ir_node *op1, ir_node *op2, ir_mode *mode);
/** Constructor for a Borrow node.
*
* @param *db A pointer for debug information.
* @param *block The IR block the node belongs to.
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
FIRM_API ir_node *new_rd_Borrow(dbg_info *db, ir_node *block,
ir_node *op1, ir_node *op2, ir_mode *mode);
/** Constructor for a Phi node.
*
* @param *db A pointer for debug information.
......@@ -2430,27 +2394,6 @@ FIRM_API ir_node *new_r_strictConv(ir_node *block, ir_node *op, ir_mode *mode);
*/
FIRM_API ir_node *new_r_Cast(ir_node *block, ir_node *op, ir_type *to_tp);
/** Constructor for a Carry node.
*
* @param *block The IR block the node belongs to.
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
FIRM_API ir_node *new_r_Carry(ir_node *block, ir_node *op1, ir_node *op2,
ir_mode *mode);
/**
* Constructor for a Borrow node.
*
* @param *block The IR block the node belongs to.
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the results.
*/
FIRM_API ir_node *new_r_Borrow(ir_node *block, ir_node *op1, ir_node *op2,
ir_mode *mode);
/** Constructor for a Phi node.
*
* @param *block The IR block the node belongs to.
......@@ -3219,30 +3162,6 @@ FIRM_API ir_node *new_d_strictConv(dbg_info *db, ir_node *op, ir_mode *mode);
*/
FIRM_API ir_node *new_d_Cast(dbg_info *db, ir_node *op, ir_type *to_tp);
/** Constructor for a Carry node.
*
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
FIRM_API ir_node *new_d_Carry(dbg_info *db, ir_node *op1, ir_node *op2,
ir_mode *mode);
/** Constructor for a Borrow node.
*
* Adds the node to the block in current_ir_block.
*
* @param *db A pointer for debug information.
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
FIRM_API ir_node *new_d_Borrow(dbg_info *db, ir_node *op1, ir_node *op2,
ir_mode *mode);
/** Constructor for a Phi node.
*
* Adds the node to the block in current_ir_block.
......@@ -3952,26 +3871,6 @@ FIRM_API ir_node *new_strictConv(ir_node *op, ir_mode *mode);
*/
FIRM_API ir_node *new_Cast(ir_node *op, ir_type *to_tp);
/** Constructor for a Carry node.
*
* Adds the node to the block in current_ir_block.
*
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
FIRM_API ir_node *new_Carry(ir_node *op1, ir_node *op2, ir_mode *mode);
/** Constructor for a Borrow node.
*
* Adds the node to the block in current_ir_block.
*
* @param *op1 The first operand.
* @param *op2 The second operand.
* @param *mode The mode of the operands and the result.
*/
FIRM_API ir_node *new_Borrow(ir_node *op1, ir_node *op2, ir_mode *mode);
/** Constructor for a Phi node.
*
* Adds the node to the block in current_ir_block.
......
......@@ -584,16 +584,6 @@ FIRM_API void set_Add_left(ir_node *node, ir_node *left);
FIRM_API ir_node *get_Add_right(const ir_node *node);
FIRM_API void set_Add_right(ir_node *node, ir_node *right);
FIRM_API ir_node *get_Carry_left(const ir_node *node);
FIRM_API void set_Carry_left(ir_node *node, ir_node *left);
FIRM_API ir_node *get_Carry_right(const ir_node *node);
FIRM_API void set_Carry_right(ir_node *node, ir_node *right);
FIRM_API ir_node *get_Borrow_left(const ir_node *node);
FIRM_API void set_Borrow_left(ir_node *node, ir_node *left);
FIRM_API ir_node *get_Borrow_right(const ir_node *node);
FIRM_API void set_Borrow_right(ir_node *node, ir_node *right);
FIRM_API ir_node *get_Sub_left(const ir_node *node);
FIRM_API void set_Sub_left(ir_node *node, ir_node *left);
FIRM_API ir_node *get_Sub_right(const ir_node *node);
......@@ -991,8 +981,6 @@ FIRM_API int is_DivMod(const ir_node *node);
FIRM_API int is_Quot(const ir_node *node);
/** Returns true if node is an Add node. */
FIRM_API int is_Add(const ir_node *node);
/** Returns true if node is a Carry node. */
FIRM_API int is_Carry(const ir_node *node);
/** Returns true if node is an And node. */
FIRM_API int is_And(const ir_node *node);
/** Returns true if node is an Or node. */
......@@ -1073,8 +1061,6 @@ FIRM_API int is_ASM(const ir_node *node);
FIRM_API int is_Dummy(const ir_node *node);
/** Returns true if a node is an Anchor node */
FIRM_API int is_Anchor(const ir_node *node);
/** Returns true if a node is a Borrow node */
FIRM_API int is_Borrow(const ir_node *node);
/** Returns true if a node is a Break node */
FIRM_API int is_Break(const ir_node *node);
/** Returns true if a node is an instff node */
......
......@@ -13,11 +13,9 @@ typedef enum ir_opcode {
iro_And,
iro_Bad,
iro_Block,
iro_Borrow,
iro_Bound,
iro_Builtin,
iro_Call,
iro_Carry,
iro_Cast,
iro_Cmp,
iro_Cond,
......@@ -96,11 +94,9 @@ FIRM_API ir_op *op_Anchor;
FIRM_API ir_op *op_And;
FIRM_API ir_op *op_Bad;
FIRM_API ir_op *op_Block;
FIRM_API ir_op *op_Borrow;
FIRM_API ir_op *op_Bound;
FIRM_API ir_op *op_Builtin;
FIRM_API ir_op *op_Call;
FIRM_API ir_op *op_Carry;
FIRM_API ir_op *op_Cast;
FIRM_API ir_op *op_Cmp;
FIRM_API ir_op *op_Cond;
......@@ -155,11 +151,9 @@ FIRM_API ir_op *get_op_Anchor(void);
FIRM_API ir_op *get_op_And(void);
FIRM_API ir_op *get_op_Bad(void);
FIRM_API ir_op *get_op_Block(void);
FIRM_API ir_op *get_op_Borrow(void);
FIRM_API ir_op *get_op_Bound(void);
FIRM_API ir_op *get_op_Builtin(void);
FIRM_API ir_op *get_op_Call(void);
FIRM_API ir_op *get_op_Carry(void);
FIRM_API ir_op *get_op_Cast(void);
FIRM_API ir_op *get_op_Cmp(void);
FIRM_API ir_op *get_op_Cond(void);
......
......@@ -363,9 +363,9 @@ static int vrp_update_node(ir_node *node)
/* TODO: Check, if there can be information derived from any of these:
is_Abs(node) is_Alloc(node) is_Anchor(node) is_Borrow(node) is_Bound(node)
is_Abs(node) is_Alloc(node) is_Anchor(node) is_Bound(node)
is_Break(node) is_Builtin(node) is_Call(node)
is_Carry(node) is_Cast(node) is_Cmp(node) is_Cond(node)
is_Cast(node) is_Cmp(node) is_Cond(node)
is_CopyB(node) is_Div(node) is_DivMod(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)
......
......@@ -159,50 +159,6 @@ static tarval *computed_value_Sub(const ir_node *n)
return tarval_bad;
} /* computed_value_Sub */
/**
* Return the value of a Carry.
* Special : a op 0, 0 op b
*/
static tarval *computed_value_Carry(const ir_node *n)
{
ir_node *a = get_binop_left(n);
ir_node *b = get_binop_right(n);
ir_mode *m = get_irn_mode(n);
tarval *ta = value_of(a);
tarval *tb = value_of(b);
if ((ta != tarval_bad) && (tb != tarval_bad)) {
tarval_add(ta, tb);
return tarval_carry() ? get_mode_one(m) : get_mode_null(m);
} else {
if (tarval_is_null(ta) || tarval_is_null(tb))
return get_mode_null(m);
}
return tarval_bad;
} /* computed_value_Carry */
/**
* Return the value of a Borrow.
* Special : a op 0
*/
static tarval *computed_value_Borrow(const ir_node *n)
{
ir_node *a = get_binop_left(n);
ir_node *b = get_binop_right(n);
ir_mode *m = get_irn_mode(n);
tarval *ta = value_of(a);
tarval *tb = value_of(b);
if ((ta != tarval_bad) && (tb != tarval_bad)) {
return tarval_cmp(ta, tb) == pn_Cmp_Lt ? get_mode_one(m) : get_mode_null(m);
} else if (tarval_is_null(ta)) {
return get_mode_null(m);
}
return tarval_bad;
} /* computed_value_Borrow */
/**
* Return the value of an unary Minus.
*/
......@@ -730,8 +686,6 @@ static ir_op_ops *firm_set_default_computed_value(ir_opcode code, ir_op_ops *ops
CASE(SymConst);
CASE(Add);
CASE(Sub);
CASE(Carry);
CASE(Borrow);
CASE(Minus);
CASE(Mul);
CASE(Abs);
......
......@@ -173,9 +173,6 @@ class Block(Op):
}
'''
class Borrow(Binop):
flags = []
class Bound(Op):
ins = [ "mem", "index", "lower", "upper" ]
outs = [
......@@ -251,9 +248,6 @@ class Call(Op):
firm_alloc_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr);
'''
class Carry(Binop):
flags = [ "commutative" ]
class Cast(Unop):
mode = "get_irn_mode(irn_op)"
flags = [ "highlevel" ]
......
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