projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prefix global entities from the ia32 backend with ia32_ to prevent (future) collisitions.
[libfirm]
/
ir
/
be
/
beinfo.c
diff --git
a/ir/be/beinfo.c
b/ir/be/beinfo.c
index
837d223
..
b6ca707
100644
(file)
--- a/
ir/be/beinfo.c
+++ b/
ir/be/beinfo.c
@@
-64,7
+64,7
@@
void be_info_new_node(ir_node *node)
}
}
}
}
-static void new_
P
hi_copy_attr(ir_graph *irg, const ir_node *old_node,
+static void new_
p
hi_copy_attr(ir_graph *irg, const ir_node *old_node,
ir_node *new_node)
{
backend_info_t *old_info = be_get_info(old_node);
ir_node *new_node)
{
backend_info_t *old_info = be_get_info(old_node);
@@
-75,14
+75,24
@@
static void new_Phi_copy_attr(ir_graph *irg, const ir_node *old_node,
old_phi_copy_attr(irg, old_node, new_node);
}
old_phi_copy_attr(irg, old_node, new_node);
}
-int be_
infos_equal(const backend_info_t *info1, const backend_info_t *info
2)
+int be_
nodes_equal(ir_node *node1, ir_node *node
2)
{
{
- int len = ARR_LEN(info1->out_infos);
- int i;
+ const backend_info_t *info1 = be_get_info(node1);
+ const backend_info_t *info2 = be_get_info(node2);
+ int len = ARR_LEN(info1->out_infos);
+ int arity = get_irn_arity(node1);
+ int i;
if (ARR_LEN(info2->out_infos) != len)
return false;
if (ARR_LEN(info2->out_infos) != len)
return false;
+ assert(arity == get_irn_arity(node2));
+
+ for (i = 0; i < arity; ++i) {
+ if (info1->in_reqs[i] != info2->in_reqs[i])
+ return false;
+ }
+
for (i = 0; i < len; ++i) {
const reg_out_info_t *out1 = &info1->out_infos[i];
const reg_out_info_t *out2 = &info2->out_infos[i];
for (i = 0; i < len; ++i) {
const reg_out_info_t *out1 = &info1->out_infos[i];
const reg_out_info_t *out2 = &info2->out_infos[i];
@@
-95,13
+105,6
@@
int be_infos_equal(const backend_info_t *info1, const backend_info_t *info2)
return true;
}
return true;
}
-int be_nodes_equal(const ir_node *node1, const ir_node *node2)
-{
- backend_info_t *info1 = be_get_info(node1);
- backend_info_t *info2 = be_get_info(node2);
- return be_infos_equal(info1, info2);
-}
-
static void init_walker(ir_node *node, void *data)
{
(void) data;
static void init_walker(ir_node *node, void *data)
{
(void) data;
@@
-116,7
+119,7
@@
void be_info_init(void)
panic("double initialization of be_info");
old_phi_copy_attr = op_Phi->ops.copy_attr;
panic("double initialization of be_info");
old_phi_copy_attr = op_Phi->ops.copy_attr;
- op_Phi->ops.copy_attr = new_
P
hi_copy_attr;
+ op_Phi->ops.copy_attr = new_
p
hi_copy_attr;
initialized = true;
/* phis have register and register requirements now which we want to dump */
initialized = true;
/* phis have register and register requirements now which we want to dump */
@@
-156,7
+159,7
@@
void be_info_free(void)
if (!initialized)
panic("be_info_free called without prior init");
if (!initialized)
panic("be_info_free called without prior init");
- assert(op_Phi->ops.copy_attr == new_
P
hi_copy_attr);
+ assert(op_Phi->ops.copy_attr == new_
p
hi_copy_attr);
op_Phi->ops.copy_attr = old_phi_copy_attr;
initialized = false;
op_Phi->ops.copy_attr = old_phi_copy_attr;
initialized = false;