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
a16a4fcf
Commit
a16a4fcf
authored
Feb 16, 2006
by
Sebastian Hack
Browse files
Added register requirements transfer function
parent
c0a211ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
ir/be/benode.c
View file @
a16a4fcf
...
...
@@ -291,6 +291,29 @@ void be_set_constr_single_reg(ir_node *irn, int pos, const arch_register_t *reg)
r
->
req
.
cls
=
reg
->
reg_class
;
}
void
be_set_constr_limited
(
ir_node
*
irn
,
int
pos
,
const
arch_register_req_t
*
req
)
{
int
idx
=
pos
<
0
?
-
(
pos
-
1
)
:
pos
;
be_node_attr_t
*
a
=
get_irn_attr
(
irn
);
be_reg_data_t
*
rd
=
&
a
->
reg_data
[
idx
];
be_req_t
*
r
=
pos
<
0
?
&
rd
->
req
:
&
rd
->
in_req
;
assert
(
is_be_node
(
irn
));
assert
(
!
(
pos
>=
0
)
||
pos
<
get_irn_arity
(
irn
));
assert
(
!
(
pos
<
0
)
||
-
(
pos
+
1
)
<=
a
->
n_outs
);
assert
(
arch_register_req_is
(
req
,
limited
));
r
->
kind
=
be_req_kind_old_limited
;
r
->
req
.
limited
=
be_limited
;
r
->
req
.
limited_env
=
r
;
r
->
req
.
type
=
arch_register_req_type_limited
;
r
->
req
.
cls
=
req
->
cls
;
r
->
x
.
old_limited
.
old_limited
=
req
->
limited
;
r
->
x
.
old_limited
.
old_limited_env
=
req
->
limited_env
;
}
void
be_set_IncSP_offset
(
ir_node
*
irn
,
int
offset
)
{
...
...
ir/be/benode_t.h
View file @
a16a4fcf
...
...
@@ -81,16 +81,14 @@ ir_node *be_get_Spill_context(const ir_node *irn);
void
be_set_constr_single_reg
(
ir_node
*
irn
,
int
pos
,
const
arch_register_t
*
reg
);
/**
* Modify the output register requirements of a Perm.
* This function incur register constraints to an output value of a Perm.
* This is used when handling register constraints in general,
* see beconstrperm.c
* @param irn The perm node.
* @param pos The position.
* @param req The requirements to set to.
* @param negate_limited When the requirements are limited, inverse the set of admissible registers.
* Impose register constraints on a backend node.
* The register subsets given by the limited function in @p req are copied to the backend node.
* This requires that the constraint type of the @p req is arch_register_req_type_limited.
* @param irn The backend node.
* @param pos The position (@see be_set_constr_single_reg()).
* @param req The register requirements which shall be transferred.
*/
void
be_set_
Perm_out_req
(
ir_node
*
irn
,
int
pos
,
const
arch_register_req_t
*
req
,
unsigned
negate_limited
);
void
be_set_
constr_limited
(
ir_node
*
irn
,
int
pos
,
const
arch_register_req_t
*
req
);
/**
* Insert a Perm node after a specific node in the schedule.
...
...
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