Commit 31d36dd3 authored by Matthias Braun's avatar Matthias Braun
Browse files

make code C++ warning clean (again)

parent e147f751
......@@ -85,9 +85,9 @@ struct lv_chk_t {
static bl_info_t *get_block_info(lv_chk_t *lv, const ir_node *block)
{
bl_info_t *info = ir_nodemap_get(&lv->block_infos, block);
bl_info_t *info = (bl_info_t*)ir_nodemap_get(&lv->block_infos, block);
if (info == NULL) {
info = obstack_alloc(&lv->obst, sizeof(*info));
info = OALLOC(&lv->obst, bl_info_t);
info->id = get_Block_dom_tree_pre_num(block);
info->block = block;
info->red_reachable = bitset_obstack_alloc(&lv->obst, lv->n_blocks);
......
......@@ -122,7 +122,7 @@ ir_type *get_irn_typeinfo_type(const ir_node *n)
ir_type *res;
assert(get_irg_typeinfo_state(get_irn_irg(n)) != ir_typeinfo_none);
res = pmap_get(type_node_map, n);
res = (ir_type*)pmap_get(type_node_map, n);
if (res == NULL) {
res = initial_type;
}
......
......@@ -51,13 +51,12 @@ typedef struct vrp_env_t {
static vrp_attr *vrp_get_or_set_info(ir_vrp_info *info, const ir_node *node)
{
vrp_attr *attr = ir_nodemap_get(&info->infos, node);
vrp_attr *attr = (vrp_attr*)ir_nodemap_get(&info->infos, node);
if (attr == NULL) {
ir_mode *mode = get_irn_mode(node);
assert(mode_is_int(mode));
attr = obstack_alloc(&info->obst, sizeof(*attr));
memset(attr, 0, sizeof(*attr));
attr = OALLOCZ(&info->obst, vrp_attr);
attr->range_type = VRP_UNDEFINED;
attr->bits_set = get_mode_null(mode);
attr->bits_not_set = get_mode_all_one(mode);
......@@ -570,7 +569,7 @@ void set_vrp_data(ir_graph *irg)
register_hook(hook_node_info, &dump_hook);
}
env = obstack_alloc(&irg->vrp.obst, sizeof(*env));
env = OALLOCZ(&irg->vrp.obst, vrp_env_t);
env->workqueue = new_waitq();
env->info = info;
......
......@@ -127,6 +127,11 @@ struct blocksched_env_t {
int blockcount;
};
static blocksched_entry_t* get_blocksched_entry(const ir_node *block)
{
return (blocksched_entry_t*)get_irn_link(block);
}
/**
* Collect cfg frequencies of all edges between blocks.
* Also determines edge with highest frequency.
......@@ -598,11 +603,10 @@ static int add_ilp_edge(ir_node *block, int pos, double execfreq, blocksched_ilp
static void collect_egde_frequency_ilp(ir_node *block, void *data)
{
blocksched_ilp_env_t *env = data;
blocksched_ilp_env_t *env = (blocksched_ilp_env_t*)data;
ir_graph *irg = env->env.irg;
ir_node *startblock = get_irg_start_block(irg);
int arity;
lpp_cst_t cst;
char name[64];
int out_count;
blocksched_ilp_entry_t *entry;
......@@ -627,9 +631,10 @@ static void collect_egde_frequency_ilp(ir_node *block, void *data)
}
else {
int i;
int cst_idx;
snprintf(name, sizeof(name), "block_in_constr_%ld", get_irn_node_nr(block));
cst = lpp_add_cst_uniq(env->lpp, name, lpp_greater_equal, arity - 1);
cst_idx = lpp_add_cst_uniq(env->lpp, name, lpp_greater_equal, arity - 1);
for (i = 0; i < arity; ++i) {
double execfreq;
......@@ -640,11 +645,15 @@ static void collect_egde_frequency_ilp(ir_node *block, void *data)
execfreq = get_block_execfreq(env->env.execfreqs, pred_block);
edgenum = add_ilp_edge(block, i, execfreq, env);
edge = &env->ilpedges[edgenum];
lpp_set_factor_fast(env->lpp, cst, edge->ilpvar, 1.0);
lpp_set_factor_fast(env->lpp, cst_idx, edge->ilpvar, 1.0);
}
}
}
static blocksched_ilp_entry_t *get_blocksched_ilp_entry(const ir_node *block)
{
return (blocksched_ilp_entry_t*)get_irn_link(block);
}
static void coalesce_blocks_ilp(blocksched_ilp_env_t *env)
{
......@@ -663,7 +672,7 @@ static void coalesce_blocks_ilp(blocksched_ilp_env_t *env)
continue;
pred = get_Block_cfgpred_block(block, edge->pos);
entry = get_irn_link(pred);
entry = get_blocksched_ilp_entry(pred);
DB((dbg, LEVEL_1, "Adding out cst to %+F from %+F,%d\n",
pred, block, edge->pos));
......@@ -691,8 +700,8 @@ static void coalesce_blocks_ilp(blocksched_ilp_env_t *env)
continue;
pred = get_Block_cfgpred_block(block, edge->pos);
entry = get_irn_link(block);
pred_entry = get_irn_link(pred);
entry = get_blocksched_entry(block);
pred_entry = get_blocksched_entry(pred);
assert(entry->prev == NULL && pred_entry->next == NULL);
entry->prev = pred_entry;
......
......@@ -178,7 +178,7 @@ typedef struct {
static co2_irn_t *get_co2_irn(co2_t *env, const ir_node *node)
{
co2_irn_t *ci = ir_nodemap_get(&env->map, node);
co2_irn_t *ci = (co2_irn_t*)ir_nodemap_get(&env->map, node);
if (ci == NULL) {
ci = OALLOCZ(&env->obst, co2_irn_t);
......@@ -196,7 +196,7 @@ static co2_irn_t *get_co2_irn(co2_t *env, const ir_node *node)
static co2_cloud_irn_t *get_co2_cloud_irn(co2_t *env, const ir_node *node)
{
co2_cloud_irn_t *ci = ir_nodemap_get(&env->map, node);
co2_cloud_irn_t *ci = (co2_cloud_irn_t*)ir_nodemap_get(&env->map, node);
if (ci == NULL) {
ci = OALLOCZ(&env->obst, co2_cloud_irn_t);
......
......@@ -727,7 +727,7 @@ static void build_affinity_chunks(co_mst_env_t *env)
}
for (pn = 0; pn < ARR_LEN(env->map.data); ++pn) {
co_mst_irn_t *mirn = env->map.data[pn];
co_mst_irn_t *mirn = (co_mst_irn_t*)env->map.data[pn];
if (mirn == NULL)
continue;
if (mirn->chunk != NULL)
......@@ -1501,7 +1501,7 @@ static int co_solve_heuristic_mst(copy_opt_t *co)
/* apply coloring */
for (pn = 0; pn < ARR_LEN(mst_env.map.data); ++pn) {
co_mst_irn_t *mirn = mst_env.map.data[pn];
co_mst_irn_t *mirn = (co_mst_irn_t*)mst_env.map.data[pn];
const arch_register_t *reg;
if (mirn == NULL)
continue;
......
......@@ -84,7 +84,7 @@ static void make_color_var_name(char *buf, size_t buf_size,
static void build_coloring_cstr(ilp_env_t *ienv)
{
local_env_t *lenv = ienv->env;
local_env_t *lenv = (local_env_t*)ienv->env;
be_ifg_t *ifg = ienv->co->cenv->ifg;
unsigned n_regs = arch_register_class_n_regs(ienv->co->cls);
const unsigned *allocatable_colors = lenv->allocatable_colors;
......@@ -162,7 +162,7 @@ static void build_coloring_cstr(ilp_env_t *ienv)
static void build_interference_cstr(ilp_env_t *ienv)
{
lpp_t *lpp = ienv->lp;
local_env_t *lenv = ienv->env;
local_env_t *lenv = (local_env_t*)ienv->env;
be_ifg_t *ifg = ienv->co->cenv->ifg;
unsigned n_colors = arch_register_class_n_regs(ienv->co->cls);
ir_node **clique = ALLOCAN(ir_node*, n_colors);
......@@ -291,8 +291,8 @@ typedef struct edge_t {
static int compare_edge_t(const void *k1, const void *k2, size_t size)
{
const edge_t *e1 = k1;
const edge_t *e2 = k2;
const edge_t *e1 = (const edge_t*)k1;
const edge_t *e2 = (const edge_t*)k2;
(void) size;
return ! (e1->n1 == e2->n1 && e1->n2 == e2->n2);
......@@ -312,7 +312,7 @@ static inline edge_t *add_edge(set *edges, ir_node *n1, ir_node *n2, size_t *cou
new_edge.n2 = n1;
}
(*counter)++;
return set_insert(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
return (edge_t*)set_insert(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
}
static inline edge_t *find_edge(set *edges, ir_node *n1, ir_node *n2)
......@@ -326,7 +326,7 @@ static inline edge_t *find_edge(set *edges, ir_node *n1, ir_node *n2)
new_edge.n1 = n2;
new_edge.n2 = n1;
}
return set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
return (edge_t*)set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
}
static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *counter)
......@@ -340,7 +340,7 @@ static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *cou
new_edge.n1 = n2;
new_edge.n2 = n1;
}
e = set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
e = (edge_t*)set_find(edges, &new_edge, sizeof(new_edge), HASH_EDGE(&new_edge));
if (e) {
e->n1 = NULL;
e->n2 = NULL;
......@@ -348,7 +348,7 @@ static inline void remove_edge(set *edges, ir_node *n1, ir_node *n2, size_t *cou
}
}
#define pset_foreach(pset, irn) for (irn=pset_first(pset); irn; irn=pset_next(pset))
#define pset_foreach(pset, irn) for (irn=(ir_node*)pset_first(pset); irn; irn=(ir_node*)pset_next(pset))
/**
* Search for an interference clique and an external node
......@@ -383,7 +383,7 @@ static void build_clique_star_cstr(ilp_env_t *ienv)
++n_nodes;
}
}
nodes = obstack_finish(&ob);
nodes = (ir_node**)obstack_finish(&ob);
/* get all interference edges between these */
n_edges = 0;
......@@ -401,7 +401,7 @@ static void build_clique_star_cstr(ilp_env_t *ienv)
bool growed;
/* get 2 starting nodes to form a clique */
for (e=set_first(edges); !e->n1; e=set_next(edges)) {
for (e=(edge_t*)set_first(edges); !e->n1; e=(edge_t*)set_next(edges)) {
}
/* we could be stepped out of the loop before the set iterated to the end */
......@@ -570,7 +570,7 @@ static void ilp2_build(ilp_env_t *ienv)
static void ilp2_apply(ilp_env_t *ienv)
{
local_env_t *lenv = ienv->env;
local_env_t *lenv = (local_env_t*)ienv->env;
ir_graph *irg = ienv->co->irg;
/* first check if there was sth. to optimize */
......
......@@ -156,7 +156,7 @@ void be_register_scheduler(const char *name, schedule_func func)
{
if (scheduler == NULL)
scheduler = func;
be_add_module_to_list(&schedulers, name, func);
be_add_module_to_list(&schedulers, name, (void*)func);
}
void be_schedule_graph(ir_graph *irg)
......
......@@ -101,7 +101,7 @@ static bool has_definition(const ir_node *block)
static constr_info *get_or_set_info(be_ssa_construction_env_t *env,
const ir_node *node)
{
constr_info *info = ir_nodemap_get(&env->infos, node);
constr_info *info = (constr_info*)ir_nodemap_get(&env->infos, node);
if (info == NULL) {
info = OALLOCZ(&env->obst, constr_info);
ir_nodemap_insert(&env->infos, node, info);
......
......@@ -678,7 +678,7 @@ emit_I:
break;
case 'P': {
ia32_condition_code_t cc = va_arg(ap, ia32_condition_code_t);
ia32_condition_code_t cc = (ia32_condition_code_t)va_arg(ap, int);
ia32_emit_condition_code(cc);
break;
}
......@@ -862,7 +862,8 @@ static ir_node *find_original_value(ir_node *node)
}
}
static int determine_final_cc(const ir_node *node, int flags_pos, int cc)
static ia32_condition_code_t determine_final_cc(const ir_node *node,
int flags_pos, ia32_condition_code_t cc)
{
ir_node *flags = get_irn_n(node, flags_pos);
const ia32_attr_t *flags_attr;
......@@ -980,7 +981,7 @@ static void emit_ia32_Jcc(const ir_node *node)
}
}
}
ia32_emitf(proj_true, "\tj%P %L\n", cc);
ia32_emitf(proj_true, "\tj%P %L\n", (int)cc);
if (need_parity_label) {
ia32_emitf(NULL, "1:\n");
}
......@@ -1006,16 +1007,16 @@ static void emit_ia32_Setcc(const ir_node *node)
cc = determine_final_cc(node, n_ia32_Setcc_eflags, cc);
if (cc & ia32_cc_float_parity_cases) {
if (cc & ia32_cc_negated) {
ia32_emitf(node, "\tset%P %<R\n", cc, dreg);
ia32_emitf(node, "\tset%P %<R\n", (int)cc, dreg);
ia32_emitf(node, "\tsetp %>R\n", dreg);
ia32_emitf(node, "\torb %>R, %<R\n", dreg, dreg);
} else {
ia32_emitf(node, "\tset%P %<R\n", cc, dreg);
ia32_emitf(node, "\tset%P %<R\n", (int)cc, dreg);
ia32_emitf(node, "\tsetnp %>R\n", dreg);
ia32_emitf(node, "\tandb %>R, %<R\n", dreg, dreg);
}
} else {
ia32_emitf(node, "\tset%P %#R\n", cc, dreg);
ia32_emitf(node, "\tset%P %#R\n", (int)cc, dreg);
}
}
......@@ -1060,7 +1061,7 @@ static void emit_ia32_CMovcc(const ir_node *node)
panic("CMov with floatingpoint compare/parity not supported yet");
}
ia32_emitf(node, "\tcmov%P %#AR, %#R\n", cc, in_true, out);
ia32_emitf(node, "\tcmov%P %#AR, %#R\n", (int)cc, in_true, out);
}
/**
......@@ -3184,7 +3185,7 @@ static void bemit_jump(const ir_node *node)
bemit_jmp(get_cfop_target_block(node));
}
static void bemit_jcc(int pnc, const ir_node *dest_block)
static void bemit_jcc(ia32_condition_code_t pnc, const ir_node *dest_block)
{
unsigned char cc = pnc2cc(pnc);
bemit8(0x0F);
......
......@@ -5134,14 +5134,14 @@ static ir_node *gen_parity(ir_node *node)
* operations)
*/
ir_node *count = ia32_create_Immediate(NULL, 0, 16);
ir_node *shr = new_bd_ia32_Shr(dbgi, new_block, new_param, count);
ir_node *xor = new_bd_ia32_Xor(dbgi, new_block, noreg_GP, noreg_GP, nomem,
shr, new_param);
ir_node *xor2 = new_bd_ia32_XorHighLow(dbgi, new_block, xor);
ir_node *shr = new_bd_ia32_Shr(dbgi, new_block, new_param, count);
ir_node *xorn = new_bd_ia32_Xor(dbgi, new_block, noreg_GP, noreg_GP, nomem,
shr, new_param);
ir_node *xor2 = new_bd_ia32_XorHighLow(dbgi, new_block, xorn);
ir_node *flags;
set_ia32_ls_mode(xor, mode_Iu);
set_ia32_commutative(xor);
set_ia32_ls_mode(xorn, mode_Iu);
set_ia32_commutative(xorn);
set_irn_mode(xor2, mode_T);
flags = new_r_Proj(xor2, mode_Iu, pn_ia32_XorHighLow_flags);
......
......@@ -337,7 +337,7 @@ static void x87_emms(x87_state *state)
*/
static blk_state *x87_get_bl_state(x87_simulator *sim, ir_node *block)
{
blk_state *res = pmap_get(sim->blk_states, block);
blk_state *res = (blk_state*)pmap_get(sim->blk_states, block);
if (res == NULL) {
res = OALLOC(&sim->obst, blk_state);
......
......@@ -291,13 +291,13 @@ static void rewrite_float_unsigned_Conv(ir_node *node)
ir_node *sub = new_rd_Sub(dbgi, true_block, float_x, limitc,
mode_f);
ir_node *sub_conv = new_rd_Conv(dbgi, true_block, sub, mode_s);
ir_node *xor = new_rd_Eor(dbgi, true_block, sub_conv, c_const,
ir_node *xorn = new_rd_Eor(dbgi, true_block, sub_conv, c_const,
mode_s);
ir_node *converted = new_rd_Conv(dbgi, false_block, float_x,mode_s);
ir_node *lower_in[2] = { true_jmp, false_jmp };
ir_node *phi_in[2] = { xor, converted };
ir_node *phi_in[2] = { xorn, converted };
ir_node *phi;
ir_node *res_conv;
......
......@@ -270,7 +270,7 @@ static int firm_emit_indent(lc_appendable_t *app,
static int firm_emit_pnc(lc_appendable_t *app,
const lc_arg_occ_t *occ, const lc_arg_value_t *arg)
{
int value = arg->v_int;
ir_relation value = (ir_relation)arg->v_int;
const char *p = get_relation_string(value);
return lc_arg_append(app, occ, p, strlen(p));
......
......@@ -103,7 +103,7 @@ static inline const ir_edge_t *get_irn_out_edge_next_(const ir_node *irn, const
{
struct list_head *next = last->list.next;
const struct list_head *head
= &get_irn_edge_info_const(irn, last->kind)->outs_head;
= &get_irn_edge_info_const(irn, (ir_edge_kind_t)last->kind)->outs_head;
return next == head ? NULL : list_entry(next, ir_edge_t, list);
}
......@@ -112,7 +112,7 @@ static inline const ir_edge_t *get_irn_out_edge_next_(const ir_node *irn, const
* @param irn The node.
* @return The number of edges pointing to this node.
*/
static inline int get_irn_n_edges_kind_(const ir_node *irn, int kind)
static inline int get_irn_n_edges_kind_(const ir_node *irn, ir_edge_kind_t kind)
{
return get_irn_edge_info_const(irn, kind)->out_count;
}
......
......@@ -177,7 +177,7 @@ parse_error(read_env_t *env, const char *fmt, ...)
env->read_errors = true;
/* let's hope firm doesn't die on further errors */
do_node_verification(0);
do_node_verification(FIRM_VERIFICATION_OFF);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
......@@ -1804,7 +1804,7 @@ static void read_type(read_env_t *env)
size_t nparams = read_size_t(env);
size_t nresults = read_size_t(env);
size_t i;
int variadicity;
ir_variadicity variadicity;
type = new_type_method(nparams, nresults);
......@@ -1821,7 +1821,7 @@ static void read_type(read_env_t *env)
set_method_res_type(type, i, restype);
}
variadicity = (int) read_long(env);
variadicity = (ir_variadicity) read_long(env);
set_method_variadicity(type, variadicity);
set_method_calling_convention(type, callingconv);
......@@ -1967,10 +1967,10 @@ static void read_entity(read_env_t *env, ir_entity_kind kind)
ir_label_t nr = get_irp_next_label_nr();
entity = new_label_entity(nr);
break;
}
case IR_ENTITY_UNKNOWN:
panic("read_entity with IR_ENTITY_UNKNOWN?");
}
}
set_entity_compiler_generated(entity, compiler_generated);
set_entity_volatility(entity, volatility);
......@@ -2124,7 +2124,7 @@ static ir_node *read_ASM(read_env_t *env)
pin_state = read_pin_state(env);
n_in = read_preds(env);
in = obstack_finish(&env->preds_obst);
in = (ir_node**)obstack_finish(&env->preds_obst);
if (ARR_LEN(input_constraints) != (size_t)n_in) {
parse_error(env, "input_constraints != n_in in ir file");
......@@ -2192,13 +2192,13 @@ static pmap *node_readers;
static void register_node_reader(ident *ident, read_node_func func)
{
pmap_insert(node_readers, ident, func);
pmap_insert(node_readers, ident, (void*)func);
}
static ir_node *read_node(read_env_t *env)
{
ident *id = read_symbol(env);
read_node_func func = pmap_get(node_readers, id);
read_node_func func = (read_node_func)pmap_get(node_readers, id);
long nr = read_long(env);
ir_node *res;
if (func == NULL) {
......
......@@ -89,7 +89,8 @@ ir_relation get_inversed_relation(ir_relation relation)
ir_relation code = relation & ~(ir_relation_less|ir_relation_greater);
bool less = relation & ir_relation_less;
bool greater = relation & ir_relation_greater;
code |= (less ? ir_relation_greater : 0) | (greater ? ir_relation_less : 0);
code |= (less ? ir_relation_greater : ir_relation_false)
| (greater ? ir_relation_less : ir_relation_false);
return code;
}
......@@ -1570,30 +1571,5 @@ ir_switch_table *ir_switch_table_duplicate(ir_graph *irg,
return res;
}
unsigned firm_default_hash(const ir_node *node)
{
unsigned h;
int i, irn_arity;
/* hash table value = 9*(9*(9*(9*(9*arity+in[0])+in[1])+ ...)+mode)+code */
h = irn_arity = get_irn_arity(node);
/* consider all in nodes... except the block if not a control flow. */
for (i = is_cfop(node) ? -1 : 0; i < irn_arity; ++i) {
ir_node *pred = get_irn_n(node, i);
if (is_irn_cse_neutral(pred))
h *= 9;
else
h = 9*h + hash_ptr(pred);
}
/* ...mode,... */
h = 9*h + hash_ptr(get_irn_mode(node));
/* ...and code */
h = 9*h + hash_ptr(get_irn_op(node));
return h;
}
/* include generated code */
#include "gen_irnode.c.inl"
......@@ -1056,9 +1056,9 @@ static ir_node *equivalent_node_And(ir_node *n)
/* Check Conv(all_one) & Const = all_one */
ir_tarval *one = get_mode_all_one(convopmode);
ir_tarval *conv = tarval_convert_to(one, mode);
ir_tarval *and = tarval_and(conv, tv);
ir_tarval *tand = tarval_and(conv, tv);
if (tarval_is_all_one(and)) {
if (tarval_is_all_one(tand)) {
/* Conv(X) & Const = X */
n = a;
DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_AND);
......@@ -2462,9 +2462,9 @@ static ir_node *transform_node_Or_(ir_node *n)
ir_node *xora = new_rd_Eor(dbgi, block, a_left, a_right, a_mode);
ir_node *xorb = new_rd_Eor(dbgi, block, b_left, b_right, b_mode);
ir_node *conv = new_rd_Conv(dbgi, block, xora, b_mode);
ir_node *or = new_rd_Or(dbgi, block, conv, xorb, b_mode);
ir_node *orn = new_rd_Or(dbgi, block, conv, xorb, b_mode);
ir_node *zero = create_zero_const(irg, b_mode);
return new_rd_Cmp(dbgi, block, or, zero, ir_relation_less_greater);
return new_rd_Cmp(dbgi, block, orn, zero, ir_relation_less_greater);
}
if (values_in_mode(get_irn_mode(b_left), get_irn_mode(a_left))) {
ir_graph *irg = get_irn_irg(n);
......@@ -2475,9 +2475,9 @@ static ir_node *transform_node_Or_(ir_node *n)
ir_node *xora = new_rd_Eor(dbgi, block, a_left, a_right, a_mode);
ir_node *xorb = new_rd_Eor(dbgi, block, b_left, b_right, b_mode);
ir_node *conv = new_rd_Conv(dbgi, block, xorb, a_mode);
ir_node *or = new_rd_Or(dbgi, block, xora, conv, a_mode);
ir_node *orn = new_rd_Or(dbgi, block, xora, conv, a_mode);
ir_node *zero = create_zero_const(irg, a_mode);
return new_rd_Cmp(dbgi, block, or, zero, ir_relation_less_greater);
return new_rd_Cmp(dbgi, block, orn, zero, ir_relation_less_greater);
}
}
}
......@@ -3054,8 +3054,8 @@ restart:
ir_node *block = get_nodes_block(n);
ir_mode *mode = get_irn_mode(n);
ir_node *notn = new_rd_Not(dbgi, block, and_right, mode);
ir_node *and = new_rd_And(dbgi, block, a, notn, mode);
return and;
ir_node *andn = new_rd_And(dbgi, block, a, notn, mode);
return andn;
}
}
}
......@@ -3649,10 +3649,10 @@ static ir_node *transform_node_And(ir_node *n)
ir_node *xora = new_rd_Eor(dbgi, block, a_left, a_right, a_mode);
ir_node *xorb = new_rd_Eor(dbgi, block, b_left, b_right, b_mode);
ir_node *conv = new_rd_Conv(dbgi, block, xora, b_mode);
ir_node *or = new_rd_Or(dbgi, block, conv, xorb, b_mode);
ir_node *orn = new_rd_Or(dbgi, block, conv, xorb, b_mode);
ir_graph *irg = get_irn_irg(n);
ir_node *zero = create_zero_const(irg, b_mode);
return new_rd_Cmp(dbgi, block, or, zero, ir_relation_equal);
return new_rd_Cmp(dbgi, block, orn, zero, ir_relation_equal);
}
if (values_in_mode(get_irn_mode(b_left), get_irn_mode(a_left))) {
dbg_info *dbgi = get_irn_dbg_info(n);
......@@ -3662,10 +3662,10 @@ static ir_node *transform_node_And(ir_node *n)
ir_node *xora = new_rd_Eor(dbgi, block, a_left, a_right, a_mode);
ir_node *xorb = new_rd_Eor(dbgi, block, b_left, b_right, b_mode);
ir_node *conv = new_rd_Conv(dbgi, block, xorb, a_mode);
ir_node *or = new_rd_Or(dbgi, block, xora, conv, a_mode);
ir_node *orn = new_rd_Or(dbgi, block, xora, conv, a_mode);
ir_graph *irg = get_irn_irg(n);
ir_node *zero = create_zero_const(irg, a_mode);
return new_rd_Cmp(dbgi, block, or, zero, ir_relation_equal);
return new_rd_Cmp(dbgi, block, orn, zero, ir_relation_equal);
}
}
}
......
......@@ -290,16 +290,16 @@ typedef struct cast_attr {
/** Load attributes. */
typedef struct load_attr {
except_attr exc; /**< The exception attribute. MUST be the first one. */
unsigned volatility:1; /**< The volatility of this Load operation. */
unsigned unaligned:1; /**< The align attribute of this Load operation. */
ir_volatility volatility:1; /**< The volatility of this Load operation. */
ir_align unaligned:1; /**< The align attribute of this Load operation. */
ir_mode *mode; /**< The mode of this Load operation. */
} load_attr;
/** Store attributes. */
typedef struct store_attr {
except_attr exc; /**< the exception attribute. MUST be the first one. */
unsigned volatility:1; /**< The volatility of this Store operation. */
unsigned unaligned:1; /**< The align attribute of this Store operation. */
ir_volatility volatility:1; /**< The volatility of this Store operation. */
ir_align unaligned:1; /**< The align attribute of this Store operation. */
} store_attr;
typedef struct phi_attr {
......