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
85fab83d
Commit
85fab83d
authored
Mar 31, 2006
by
Christian Würdig
Browse files
added functions to get copy op
parent
36c6b998
Changes
4
Hide whitespace changes
Inline
Side-by-side
ir/be/benode.c
View file @
85fab83d
...
...
@@ -335,6 +335,10 @@ ir_node *be_new_Copy(const arch_register_class_t *cls, ir_graph *irg, ir_node *b
return
res
;
}
ir_node
*
be_get_Copy_op
(
const
ir_node
*
cpy
)
{
return
get_irn_n
(
cpy
,
be_pos_Copy_op
);
}
ir_node
*
be_new_Keep
(
const
arch_register_class_t
*
cls
,
ir_graph
*
irg
,
ir_node
*
bl
,
int
n
,
ir_node
*
in
[])
{
int
i
;
...
...
@@ -913,7 +917,7 @@ static void *put_out_reg_req(arch_register_req_t *req, const ir_node *irn, int o
if
(
be_is_Copy
(
irn
))
{
req
->
type
|=
arch_register_req_type_should_be_same
;
req
->
other_same
=
get_
irn_n
(
irn
,
be_pos_
Copy_o
rig
);
req
->
other_same
=
be_
get_Copy_o
p
(
irn
);
}
}
else
{
...
...
ir/be/benode_t.h
View file @
85fab83d
...
...
@@ -103,9 +103,11 @@ enum {
ir_node
*
be_new_Reload
(
const
arch_register_class_t
*
cls
,
const
arch_register_class_t
*
cls_frame
,
ir_graph
*
irg
,
ir_node
*
bl
,
ir_node
*
frame
,
ir_node
*
spill_node
,
ir_mode
*
mode
);
enum
{
be_pos_Copy_o
rig
=
0
be_pos_Copy_o
p
=
0
};
ir_node
*
be_new_Copy
(
const
arch_register_class_t
*
cls
,
ir_graph
*
irg
,
ir_node
*
block
,
ir_node
*
in
);
ir_node
*
be_get_Copy_op
(
const
ir_node
*
cpy
);
ir_node
*
be_new_Perm
(
const
arch_register_class_t
*
cls
,
ir_graph
*
irg
,
ir_node
*
bl
,
int
arity
,
ir_node
*
in
[]);
ir_node
*
be_new_Keep
(
const
arch_register_class_t
*
cls
,
ir_graph
*
irg
,
ir_node
*
bl
,
int
arity
,
ir_node
*
in
[]);
...
...
ir/be/beraextern.c
View file @
85fab83d
...
...
@@ -627,7 +627,7 @@ static void dump_affinities_walker(ir_node *irn, void *env) {
/* copies have affinities */
if
(
arch_irn_classify
(
raenv
->
aenv
,
irn
)
==
arch_irn_class_copy
)
{
ir_node
*
other
=
get_
irn_n
(
irn
,
be_pos_
Copy_o
rig
);
ir_node
*
other
=
be_
get_Copy_o
p
(
irn
);
if
(
!
arch_irn_is
(
raenv
->
aenv
,
other
,
ignore
))
{
vi2
=
get_var_info
(
other
);
...
...
ir/be/bespillbelady.c
View file @
85fab83d
...
...
@@ -597,7 +597,7 @@ static void remove_copies(belady_env_t *bel) {
user
=
get_irn_edge
(
get_irn_irg
(
irn
),
irn
,
0
)
->
src
;
src
=
get_
irn_n
(
irn
,
be_pos_
Copy_o
rig
);
src
=
be_
get_Copy_o
p
(
irn
);
set_irn_n
(
user
,
0
,
src
);
}
}
...
...
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