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
d71dd461
Commit
d71dd461
authored
Dec 19, 2012
by
Christoph Mallon
Browse files
be: Replace be_put_allocatable_regs() by be_get_allocatable_regs().
parent
70b88494
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/be_t.h
View file @
d71dd461
...
...
@@ -11,9 +11,10 @@
#ifndef FIRM_BE_BE_T_H
#define FIRM_BE_BE_T_H
#include
<assert.h>
#include
"be.h"
#include
"be_types.h"
#include
"bitset.h"
#include
"firm_types.h"
#include
"pmap.h"
#include
"timing.h"
...
...
@@ -70,9 +71,6 @@ extern asm_constraint_flags_t asm_constraint_flags[256];
void
be_init_default_asm_constraint_flags
(
void
);
void
be_put_allocatable_regs
(
const
ir_graph
*
irg
,
const
arch_register_class_t
*
cls
,
bitset_t
*
bs
);
void
be_get_allocatable_regs
(
ir_graph
const
*
irg
,
arch_register_class_t
const
*
cls
,
unsigned
*
raw_bitset
);
unsigned
be_get_n_allocatable_regs
(
const
ir_graph
*
irg
,
...
...
ir/be/beabi.c
View file @
d71dd461
...
...
@@ -1803,28 +1803,12 @@ void be_abi_introduce(ir_graph *irg)
pmap_destroy
(
env
.
regs
);
}
void
be_put_allocatable_regs
(
const
ir_graph
*
irg
,
const
arch_register_class_t
*
cls
,
bitset_t
*
bs
)
{
be_irg_t
*
birg
=
be_birg_from_irg
(
irg
);
unsigned
*
allocatable_regs
=
birg
->
allocatable_regs
;
unsigned
i
;
assert
(
bitset_size
(
bs
)
==
cls
->
n_regs
);
bitset_clear_all
(
bs
);
for
(
i
=
0
;
i
<
cls
->
n_regs
;
++
i
)
{
const
arch_register_t
*
reg
=
&
cls
->
regs
[
i
];
if
(
rbitset_is_set
(
allocatable_regs
,
reg
->
global_index
))
bitset_set
(
bs
,
i
);
}
}
unsigned
be_get_n_allocatable_regs
(
const
ir_graph
*
irg
,
const
arch_register_class_t
*
cls
)
{
bitset_
t
*
bs
=
bitset_alloca
(
cls
->
n_regs
);
be_
pu
t_allocatable_regs
(
irg
,
cls
,
bs
);
return
bitset_popcount
(
bs
);
unsigned
*
cons
t
bs
=
r
bitset_alloca
(
cls
->
n_regs
);
be_
ge
t_allocatable_regs
(
irg
,
cls
,
bs
);
return
r
bitset_popcount
(
bs
,
cls
->
n_regs
);
}
void
be_get_allocatable_regs
(
ir_graph
const
*
const
irg
,
arch_register_class_t
const
*
const
cls
,
unsigned
*
const
raw_bitset
)
...
...
ir/be/bechordal_main.c
View file @
d71dd461
...
...
@@ -220,7 +220,7 @@ static void pre_spill(be_chordal_env_t *const chordal_env, arch_register_class_t
be_assure_live_chk
(
irg
);
/* put all ignore registers into the ignore register set. */
be_
pu
t_allocatable_regs
(
irg
,
cls
,
chordal_env
->
allocatable_regs
);
be_
ge
t_allocatable_regs
(
irg
,
cls
,
chordal_env
->
allocatable_regs
->
data
);
be_timer_push
(
T_RA_CONSTR
);
be_pre_spill_prepare_constr
(
irg
,
cls
);
...
...
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