Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
b9391dcc
Commit
b9391dcc
authored
Nov 27, 2012
by
Christoph Mallon
Browse files
be: Pass ir_graph* instead of ir_node* to allocate_reg_req().
parent
624e2a2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/benode.c
View file @
b9391dcc
...
...
@@ -186,9 +186,8 @@ static int Call_cmp_attr(const ir_node *a, const ir_node *b)
return
be_nodes_equal
(
a
,
b
);
}
static
arch_register_req_t
*
allocate_reg_req
(
const
ir_node
*
node
)
static
arch_register_req_t
*
allocate_reg_req
(
ir_graph
*
const
irg
)
{
ir_graph
*
irg
=
get_irn_irg
(
node
);
struct
obstack
*
obst
=
be_get_be_obst
(
irg
);
arch_register_req_t
*
req
=
OALLOCZ
(
obst
,
arch_register_req_t
);
...
...
@@ -339,7 +338,7 @@ ir_node *be_new_Perm(const arch_register_class_t *cls, ir_node *block,
be_set_constr_in
(
irn
,
i
,
cls
->
class_req
);
be_set_constr_out
(
irn
,
i
,
cls
->
class_req
);
}
else
{
arch_register_req_t
*
new_req
=
allocate_reg_req
(
ir
n
);
arch_register_req_t
*
const
new_req
=
allocate_reg_req
(
ir
g
);
new_req
->
cls
=
cls
;
new_req
->
type
=
(
req
->
type
&
arch_register_req_type_aligned
);
new_req
->
width
=
req
->
width
;
...
...
@@ -411,7 +410,6 @@ ir_node *be_new_Copy(ir_node *bl, ir_node *op)
{
ir_node
*
in
[
1
];
ir_node
*
res
;
arch_register_req_t
*
req
;
be_node_attr_t
*
attr
;
ir_graph
*
irg
=
get_Block_irg
(
bl
);
const
arch_register_req_t
*
in_req
=
arch_get_irn_register_req
(
op
);
...
...
@@ -425,7 +423,7 @@ ir_node *be_new_Copy(ir_node *bl, ir_node *op)
be_node_set_reg_class_in
(
res
,
0
,
cls
);
be_node_set_reg_class_out
(
res
,
0
,
cls
);
req
=
allocate_reg_req
(
res
);
arch_register_req_t
*
const
req
=
allocate_reg_req
(
irg
);
req
->
cls
=
cls
;
req
->
type
=
arch_register_req_type_should_be_same
|
(
in_req
->
type
&
arch_register_req_type_aligned
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment