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
dc3c6e3f
Commit
dc3c6e3f
authored
Mar 30, 2006
by
Christian Würdig
Browse files
removed some unused variables
code cleanup deactivated deadnode elimination
parent
9156483f
Changes
6
Hide whitespace changes
Inline
Side-by-side
ir/be/beabi.c
View file @
dc3c6e3f
...
...
@@ -1101,7 +1101,7 @@ static void create_barrier(be_abi_irg_t *env, ir_node *bl, ir_node **mem, pmap *
}
in
=
(
ir_node
**
)
obstack_finish
(
&
env
->
obst
);
irn
=
be_new_Barrier
(
env
->
birg
->
irg
,
bl
,
n
,
in
);
irn
=
be_new_Barrier
(
irg
,
bl
,
n
,
in
);
obstack_free
(
&
env
->
obst
,
in
);
for
(
n
=
0
;
n
<
n_regs
;
++
n
)
{
...
...
@@ -1109,7 +1109,7 @@ static void create_barrier(be_abi_irg_t *env, ir_node *bl, ir_node **mem, pmap *
ir_node
*
proj
;
const
arch_register_t
*
reg
=
rm
[
n
].
reg
;
proj
=
new_r_Proj
(
env
->
birg
->
irg
,
bl
,
irn
,
get_irn_mode
(
rm
[
n
].
irn
),
n
);
proj
=
new_r_Proj
(
irg
,
bl
,
irn
,
get_irn_mode
(
rm
[
n
].
irn
),
n
);
be_node_set_reg_class
(
irn
,
n
,
reg
->
reg_class
);
if
(
in_req
)
be_set_constr_single_reg
(
irn
,
n
,
reg
);
...
...
@@ -1123,7 +1123,7 @@ static void create_barrier(be_abi_irg_t *env, ir_node *bl, ir_node **mem, pmap *
}
if
(
mem
)
{
*
mem
=
new_r_Proj
(
env
->
birg
->
irg
,
bl
,
irn
,
mode_M
,
n
);
*
mem
=
new_r_Proj
(
irg
,
bl
,
irn
,
mode_M
,
n
);
}
obstack_free
(
&
env
->
obst
,
rm
);
...
...
@@ -1146,10 +1146,8 @@ static void modify_irg(be_abi_irg_t *env)
ir_node
*
mem
=
get_irg_initial_mem
(
irg
);
type
*
method_type
=
get_entity_type
(
get_irg_entity
(
irg
));
pset
*
dont_save
=
pset_new_ptr
(
8
);
pmap
*
reg_proj_map
=
pmap_create
();
int
n_params
=
get_method_n_params
(
method_type
);
int
max_arg
=
0
;
int
arg_offset
=
0
;
int
i
,
j
,
n
;
...
...
@@ -1178,10 +1176,11 @@ static void modify_irg(be_abi_irg_t *env)
int
nr
=
get_Proj_proj
(
irn
);
max_arg
=
MAX
(
max_arg
,
nr
);
}
max_arg
=
MAX
(
max_arg
+
1
,
n_params
);
args
=
obstack_alloc
(
&
env
->
obst
,
max_arg
*
sizeof
(
args
[
0
]));
memset
(
args
,
0
,
max_arg
*
sizeof
(
args
[
0
]));
used_proj_nr
=
bitset_alloca
(
1024
);
max_arg
=
MAX
(
max_arg
+
1
,
n_params
);
args
=
obstack_alloc
(
&
env
->
obst
,
max_arg
*
sizeof
(
args
[
0
]));
memset
(
args
,
0
,
max_arg
*
sizeof
(
args
[
0
]));
/* Fill the argument vector */
foreach_out_edge
(
arg_tuple
,
edge
)
{
...
...
@@ -1522,9 +1521,8 @@ static int get_dir(ir_node *irn)
static
int
process_stack_bias
(
be_abi_irg_t
*
env
,
ir_node
*
bl
,
int
bias
)
{
const
arch_env_t
*
aenv
=
env
->
birg
->
main_env
->
arch_env
;
int
omit_fp
=
env
->
call
->
flags
.
bits
.
try_omit_fp
;
ir_node
*
irn
;
int
start_bias
=
bias
;
int
omit_fp
=
env
->
call
->
flags
.
bits
.
try_omit_fp
;
sched_foreach
(
bl
,
irn
)
{
...
...
ir/be/bechordal.c
View file @
dc3c6e3f
...
...
@@ -324,12 +324,9 @@ static bitset_t *get_decisive_partner_regs(bitset_t *bs, const operand_t *o1, co
static
void
pair_up_operands
(
const
be_chordal_alloc_env_t
*
alloc_env
,
insn_t
*
insn
)
{
const
be_chordal_env_t
*
env
=
alloc_env
->
chordal_env
;
const
arch_env_t
*
aenv
=
env
->
birg
->
main_env
->
arch_env
;
firm_dbg_module_t
*
dbg
=
alloc_env
->
constr_dbg
;
int
n_uses
=
insn_n_uses
(
insn
);
int
n_defs
=
insn_n_defs
(
insn
);
int
max_pairs
=
MIN
(
n_uses
,
n_defs
);
bitset_t
*
bs
=
bitset_alloca
(
env
->
cls
->
n_regs
);
bipartite_t
*
bp
=
bipartite_new
(
n_defs
,
n_uses
);
int
*
pairing
=
alloca
(
MAX
(
n_defs
,
n_uses
)
*
sizeof
(
pairing
[
0
]));
...
...
@@ -511,7 +508,6 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, ir_node *i
const
arch_env_t
*
aenv
=
env
->
birg
->
main_env
->
arch_env
;
int
n_regs
=
env
->
cls
->
n_regs
;
bitset_t
*
bs
=
bitset_alloca
(
n_regs
);
bitset_t
*
non_ignore
=
bitset_alloca
(
n_regs
);
ir_node
**
alloc_nodes
=
alloca
(
n_regs
*
sizeof
(
alloc_nodes
[
0
]));
bipartite_t
*
bp
=
bipartite_new
(
n_regs
,
n_regs
);
int
*
assignment
=
alloca
(
n_regs
*
sizeof
(
assignment
[
0
]));
...
...
@@ -665,8 +661,6 @@ end:
static
void
constraints
(
ir_node
*
bl
,
void
*
data
)
{
be_chordal_alloc_env_t
*
env
=
data
;
arch_env_t
*
arch_env
=
env
->
chordal_env
->
birg
->
main_env
->
arch_env
;
FIRM_DBG_REGISTER
(
firm_dbg_module_t
*
dbg
,
"firm.be.chordal.constr"
);
/*
Start silent in the start block.
...
...
@@ -704,7 +698,6 @@ static void pressure(ir_node *block, void *env_ptr)
be_chordal_alloc_env_t
*
alloc_env
=
env_ptr
;
be_chordal_env_t
*
env
=
alloc_env
->
chordal_env
;
const
arch_env_t
*
arch_env
=
env
->
birg
->
main_env
->
arch_env
;
bitset_t
*
live
=
alloc_env
->
live
;
firm_dbg_module_t
*
dbg
=
env
->
dbg
;
ir_node
*
irn
;
...
...
ir/be/bechordal_main.c
View file @
dc3c6e3f
...
...
@@ -319,7 +319,7 @@ static void be_ra_chordal_main(const be_irg_t *bi)
be_ssa_destruction
(
&
chordal_env
);
dump
(
BE_CH_DUMP_SSADESTR
,
irg
,
chordal_env
.
cls
,
"-ssadestr"
,
dump_ir_block_graph_sched
);
be_ssa_destruction_check
(
&
chordal_env
);
//
be_ra_chordal_check(&chordal_env);
be_ra_chordal_check
(
&
chordal_env
);
copystat_dump
(
irg
);
...
...
ir/be/bemain.c
View file @
dc3c6e3f
...
...
@@ -303,7 +303,7 @@ static void be_main_loop(FILE *file_handle)
* Note that this requires disabling the edges here.
*/
edges_deactivate
(
irg
);
dead_node_elimination
(
irg
);
//
dead_node_elimination(irg);
edges_activate
(
irg
);
/* Compute loop nesting information (for weighting copies) */
...
...
ir/be/benode.c
View file @
dc3c6e3f
...
...
@@ -611,9 +611,9 @@ int be_has_frame_entity(const ir_node *irn)
case
beo_FrameLoad
:
case
beo_FrameAddr
:
return
1
;
default:
return
0
;
}
return
0
;
}
entity
*
be_get_frame_entity
(
const
ir_node
*
irn
)
...
...
@@ -787,8 +787,6 @@ static INLINE ir_node *find_a_spill(const ir_node *irn)
entity
*
be_get_spill_entity
(
const
ir_node
*
irn
)
{
int
opc
=
get_irn_opcode
(
irn
);
switch
(
be_get_irn_opcode
(
irn
))
{
case
beo_Reload
:
{
...
...
@@ -924,7 +922,6 @@ static void *put_out_reg_req(arch_register_req_t *req, const ir_node *irn, int o
static
void
*
put_in_reg_req
(
arch_register_req_t
*
req
,
const
ir_node
*
irn
,
int
pos
)
{
const
be_node_attr_t
*
a
=
get_irn_attr
(
irn
);
int
n
=
get_irn_arity
(
irn
);
if
(
pos
<
get_irn_arity
(
irn
)
&&
pos
<
a
->
max_reg_data
)
memcpy
(
req
,
&
a
->
reg_data
[
pos
].
in_req
,
sizeof
(
req
[
0
]));
...
...
@@ -1083,7 +1080,6 @@ static const arch_register_req_t *get_Phi_reg_req_recursive(const phi_handler_t
{
int
n
=
get_irn_arity
(
phi
);
ir_node
*
op
;
int
done
=
0
;
int
i
;
if
(
*
visited
&&
pset_find_ptr
(
*
visited
,
phi
))
...
...
@@ -1319,6 +1315,8 @@ static int dump_node(ir_node *irn, FILE *f, dump_reason_t reason)
fprintf
(
f
,
"direction: %s
\n
"
,
a
->
dir
==
be_stack_dir_expand
?
"expand"
:
"shrink"
);
}
break
;
default:
break
;
}
}
...
...
ir/be/besched.c
View file @
dc3c6e3f
...
...
@@ -53,7 +53,6 @@ void be_sched_dump(FILE *f, ir_graph *irg)
/* Init the scheduling stuff. */
void
be_sched_init
(
void
)
{
FIRM_DBG_REGISTER
(
firm_dbg_module_t
*
dbg
,
"be.sched"
);
sched_irn_data_offset
=
register_additional_node_data
(
sizeof
(
sched_info_t
));
}
...
...
@@ -80,7 +79,7 @@ int sched_verify(const ir_node *block)
const
ir_node
**
save_nodes
;
const
ir_edge_t
*
edge
;
pset
*
scheduled_nodes
=
pset_new_ptr_default
();
FIRM_DBG_REGISTER
(
firm_dbg_module_t
*
dbg_sched
,
"be.sched"
);
FIRM_DBG_REGISTER
(
firm_dbg_module_t
*
dbg_sched
,
"
firm.
be.sched"
);
firm_dbg_set_mask
(
dbg_sched
,
-
1
);
...
...
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