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
939bdc66
Commit
939bdc66
authored
Jun 02, 2009
by
Michael Beck
Browse files
- svn properties added
- typos fixed - C99 features removed [r26089]
parent
03a0b8a1
Changes
1
Show whitespace changes
Inline
Side-by-side
ir/be/benewalloc.c
View file @
939bdc66
...
@@ -29,12 +29,12 @@
...
@@ -29,12 +29,12 @@
* Only a proof of concept at this moment...
* Only a proof of concept at this moment...
*
*
* The idea is to allocate registers in 2 passes:
* The idea is to allocate registers in 2 passes:
* 1. A first pass to determine "prefered" registers for live-ranges. This
* 1. A first pass to determine "prefer
r
ed" registers for live-ranges. This
* calculates for each register and each live-range a value indicating
* calculates for each register and each live-range a value indicating
* the useful
l
ness. (You can roughly think of the value as the negative
* the usefulness. (You can roughly think of the value as the negative
* costs needed for copies when the value is in the specific registers...)
* costs needed for copies when the value is in the specific registers...)
*
*
* 2. Walk blocks and assigns registers in a greedy fashion. Prefering registers
* 2. Walk blocks and assigns registers in a greedy fashion. Prefer
r
ing registers
* with high preferences. When register constraints are not met, add copies
* with high preferences. When register constraints are not met, add copies
* and split live-ranges.
* and split live-ranges.
*
*
...
@@ -342,6 +342,7 @@ static void assign_reg(const ir_node *block, ir_node *node)
...
@@ -342,6 +342,7 @@ static void assign_reg(const ir_node *block, ir_node *node)
allocation_info_t
*
info
;
allocation_info_t
*
info
;
const
arch_register_req_t
*
req
;
const
arch_register_req_t
*
req
;
reg_pref_t
*
reg_prefs
;
reg_pref_t
*
reg_prefs
;
ir_node
*
in_node
;
unsigned
i
;
unsigned
i
;
assert
(
arch_irn_consider_in_reg_alloc
(
cls
,
node
));
assert
(
arch_irn_consider_in_reg_alloc
(
cls
,
node
));
...
@@ -358,7 +359,7 @@ static void assign_reg(const ir_node *block, ir_node *node)
...
@@ -358,7 +359,7 @@ static void assign_reg(const ir_node *block, ir_node *node)
info
=
get_allocation_info
(
node
);
info
=
get_allocation_info
(
node
);
req
=
arch_get_register_req_out
(
node
);
req
=
arch_get_register_req_out
(
node
);
ir_node
*
in_node
=
skip_Proj
(
node
);
in_node
=
skip_Proj
(
node
);
if
(
req
->
type
&
arch_register_req_type_should_be_same
)
{
if
(
req
->
type
&
arch_register_req_type_should_be_same
)
{
float
weight
=
get_block_execfreq
(
execfreqs
,
block
);
float
weight
=
get_block_execfreq
(
execfreqs
,
block
);
int
arity
=
get_irn_arity
(
in_node
);
int
arity
=
get_irn_arity
(
in_node
);
...
...
Write
Preview
Supports
Markdown
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