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

Prefer get_mode_null() over get_tarval_null().

[r27189]
parent a361d426
...@@ -142,8 +142,8 @@ typedef ir_type type; ...@@ -142,8 +142,8 @@ typedef ir_type type;
#define tarval_get_mode_output_option(X) get_tarval_mode_output_option(X) #define tarval_get_mode_output_option(X) get_tarval_mode_output_option(X)
#define tarval_bitpattern(X) get_tarval_bitpattern(X) #define tarval_bitpattern(X) get_tarval_bitpattern(X)
#define tarval_sub_bits(X, Y) get_tarval_sub_bits(X, Y) #define tarval_sub_bits(X, Y) get_tarval_sub_bits(X, Y)
#define get_tarval_P_void() get_tarval_null(mode_P) #define get_tarval_P_void() get_mode_null(mode_P)
#define tarval_P_void get_tarval_null(mode_P) #define tarval_P_void get_mode_null(mode_P)
#define tarval_is_entity(X) 0 #define tarval_is_entity(X) 0
#define get_tarval_entity(X) ((ir_entity *)NULL) #define get_tarval_entity(X) ((ir_entity *)NULL)
......
...@@ -188,7 +188,7 @@ static ir_alias_relation different_index(const ir_node *idx1, const ir_node *idx ...@@ -188,7 +188,7 @@ static ir_alias_relation different_index(const ir_node *idx1, const ir_node *idx
} }
/* m1 is now the signed one */ /* m1 is now the signed one */
if (tarval_cmp(tv1, get_tarval_null(m1)) & (pn_Cmp_Eq|pn_Cmp_Gt)) { if (tarval_cmp(tv1, get_mode_null(m1)) & (pn_Cmp_Eq|pn_Cmp_Gt)) {
/* tv1 is signed, but >= 0, simply cast into unsigned */ /* tv1 is signed, but >= 0, simply cast into unsigned */
tv1 = tarval_convert_to(tv1, m2); tv1 = tarval_convert_to(tv1, m2);
} else { } else {
......
...@@ -1049,7 +1049,7 @@ static int is_fpa_immediate(tarval *tv) ...@@ -1049,7 +1049,7 @@ static int is_fpa_immediate(tarval *tv)
i = 2; i = 2;
} }
if (tarval_cmp(tv, get_tarval_null(mode)) & pn_Cmp_Lt) { if (tarval_cmp(tv, get_mode_null(mode)) & pn_Cmp_Lt) {
tv = tarval_neg(tv); tv = tarval_neg(tv);
res = -1; res = -1;
} }
...@@ -1609,7 +1609,7 @@ static void arm_pretransform_node(void) ...@@ -1609,7 +1609,7 @@ static void arm_pretransform_node(void)
static void arm_init_fpa_immediate(void) static void arm_init_fpa_immediate(void)
{ {
/* 0, 1, 2, 3, 4, 5, 10, or 0.5. */ /* 0, 1, 2, 3, 4, 5, 10, or 0.5. */
fpa_imm[0][fpa_null] = get_tarval_null(mode_F); fpa_imm[0][fpa_null] = get_mode_null(mode_F);
fpa_imm[0][fpa_one] = get_mode_one(mode_F); fpa_imm[0][fpa_one] = get_mode_one(mode_F);
fpa_imm[0][fpa_two] = new_tarval_from_str("2", 1, mode_F); fpa_imm[0][fpa_two] = new_tarval_from_str("2", 1, mode_F);
fpa_imm[0][fpa_three] = new_tarval_from_str("3", 1, mode_F); fpa_imm[0][fpa_three] = new_tarval_from_str("3", 1, mode_F);
...@@ -1618,7 +1618,7 @@ static void arm_init_fpa_immediate(void) ...@@ -1618,7 +1618,7 @@ static void arm_init_fpa_immediate(void)
fpa_imm[0][fpa_ten] = new_tarval_from_str("10", 2, mode_F); fpa_imm[0][fpa_ten] = new_tarval_from_str("10", 2, mode_F);
fpa_imm[0][fpa_half] = new_tarval_from_str("0.5", 3, mode_F); fpa_imm[0][fpa_half] = new_tarval_from_str("0.5", 3, mode_F);
fpa_imm[1][fpa_null] = get_tarval_null(mode_D); fpa_imm[1][fpa_null] = get_mode_null(mode_D);
fpa_imm[1][fpa_one] = get_mode_one(mode_D); fpa_imm[1][fpa_one] = get_mode_one(mode_D);
fpa_imm[1][fpa_two] = new_tarval_from_str("2", 1, mode_D); fpa_imm[1][fpa_two] = new_tarval_from_str("2", 1, mode_D);
fpa_imm[1][fpa_three] = new_tarval_from_str("3", 1, mode_D); fpa_imm[1][fpa_three] = new_tarval_from_str("3", 1, mode_D);
...@@ -1627,7 +1627,7 @@ static void arm_init_fpa_immediate(void) ...@@ -1627,7 +1627,7 @@ static void arm_init_fpa_immediate(void)
fpa_imm[1][fpa_ten] = new_tarval_from_str("10", 2, mode_D); fpa_imm[1][fpa_ten] = new_tarval_from_str("10", 2, mode_D);
fpa_imm[1][fpa_half] = new_tarval_from_str("0.5", 3, mode_D); fpa_imm[1][fpa_half] = new_tarval_from_str("0.5", 3, mode_D);
fpa_imm[2][fpa_null] = get_tarval_null(mode_E); fpa_imm[2][fpa_null] = get_mode_null(mode_E);
fpa_imm[2][fpa_one] = get_mode_one(mode_E); fpa_imm[2][fpa_one] = get_mode_one(mode_E);
fpa_imm[2][fpa_two] = new_tarval_from_str("2", 1, mode_E); fpa_imm[2][fpa_two] = new_tarval_from_str("2", 1, mode_E);
fpa_imm[2][fpa_three] = new_tarval_from_str("3", 1, mode_E); fpa_imm[2][fpa_three] = new_tarval_from_str("3", 1, mode_E);
......
...@@ -526,7 +526,7 @@ ir_entity *ia32_gen_fp_known_const(ia32_known_const_t kct) ...@@ -526,7 +526,7 @@ ir_entity *ia32_gen_fp_known_const(ia32_known_const_t kct)
ir_initializer_t *initializer = create_initializer_compound(2); ir_initializer_t *initializer = create_initializer_compound(2);
set_initializer_compound_value(initializer, 0, set_initializer_compound_value(initializer, 0,
create_initializer_tarval(get_tarval_null(mode))); create_initializer_tarval(get_mode_null(mode)));
set_initializer_compound_value(initializer, 1, set_initializer_compound_value(initializer, 1,
create_initializer_tarval(tv)); create_initializer_tarval(tv));
......
...@@ -423,7 +423,7 @@ ir_graph *ir_profile_instrument(const char *filename, unsigned flags) ...@@ -423,7 +423,7 @@ ir_graph *ir_profile_instrument(const char *filename, unsigned flags)
/* initialize count array */ /* initialize count array */
NEW_ARR_A(tarval *, tarval_array, n_blocks); NEW_ARR_A(tarval *, tarval_array, n_blocks);
tv = get_tarval_null(mode_Iu); tv = get_mode_null(mode_Iu);
for (i = 0; i < n_blocks; ++i) { for (i = 0; i < n_blocks; ++i) {
tarval_array[i] = tv; tarval_array[i] = tv;
} }
......
...@@ -120,7 +120,7 @@ static ir_node *create_set(ir_node *node) ...@@ -120,7 +120,7 @@ static ir_node *create_set(ir_node *node)
tarval *tv_one = get_mode_one(mode); tarval *tv_one = get_mode_one(mode);
ir_node *one = new_d_Const(dbgi, tv_one); ir_node *one = new_d_Const(dbgi, tv_one);
ir_node *block = get_nodes_block(node); ir_node *block = get_nodes_block(node);
tarval *tv_zero = get_tarval_null(mode); tarval *tv_zero = get_mode_null(mode);
ir_node *zero = new_d_Const(dbgi, tv_zero); ir_node *zero = new_d_Const(dbgi, tv_zero);
ir_node *set = new_rd_Mux(dbgi, block, node, zero, one, mode); ir_node *set = new_rd_Mux(dbgi, block, node, zero, one, mode);
...@@ -241,7 +241,7 @@ static ir_node *lower_node(ir_node *node) ...@@ -241,7 +241,7 @@ static ir_node *lower_node(ir_node *node)
case iro_Conv: { case iro_Conv: {
ir_node *pred = get_Conv_op(node); ir_node *pred = get_Conv_op(node);
ir_mode *mode = get_irn_mode(pred); ir_mode *mode = get_irn_mode(pred);
tarval *tv_zeroc = get_tarval_null(mode); tarval *tv_zeroc = get_mode_null(mode);
ir_node *zero_cmp = new_d_Const(dbgi, tv_zeroc); ir_node *zero_cmp = new_d_Const(dbgi, tv_zeroc);
ir_node *cmp = new_rd_Cmp(dbgi, block, pred, zero_cmp); ir_node *cmp = new_rd_Cmp(dbgi, block, pred, zero_cmp);
...@@ -335,7 +335,7 @@ synth_zero_one: ...@@ -335,7 +335,7 @@ synth_zero_one:
tarval *tv_one = get_mode_one(mode); tarval *tv_one = get_mode_one(mode);
res = new_d_Const(dbgi, tv_one); res = new_d_Const(dbgi, tv_one);
} else if (tv == get_tarval_b_false()) { } else if (tv == get_tarval_b_false()) {
tarval *tv_zero = get_tarval_null(mode); tarval *tv_zero = get_mode_null(mode);
res = new_d_Const(dbgi, tv_zero); res = new_d_Const(dbgi, tv_zero);
} else { } else {
panic("invalid boolean const %+F", node); panic("invalid boolean const %+F", node);
......
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