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
aad59c31
Commit
aad59c31
authored
Mar 08, 2013
by
Matthias Braun
Browse files
remove assure_doms from public API, use assure_irg_properties instead
parent
1ebb96b9
Changes
11
Hide whitespace changes
Inline
Side-by-side
include/libfirm/irdom.h
View file @
aad59c31
...
...
@@ -178,9 +178,6 @@ FIRM_API void postdom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre,
*/
FIRM_API
void
compute_doms
(
ir_graph
*
irg
);
/** Recomputes dominator relation of a graph if necessary */
FIRM_API
void
assure_doms
(
ir_graph
*
irg
);
/** Computes the post dominance relation for all basic blocks of a given graph.
*
* Sets a flag in irg to "dom_consistent".
...
...
@@ -198,9 +195,6 @@ FIRM_API void assure_doms(ir_graph *irg);
*/
FIRM_API
void
compute_postdoms
(
ir_graph
*
irg
);
/** Recompute postdominance relation if necessary */
FIRM_API
void
assure_postdoms
(
ir_graph
*
irg
);
/** Frees the dominance data structures. Sets the flag in irg to "dom_none". */
FIRM_API
void
free_dom
(
ir_graph
*
irg
);
...
...
ir/ana/cdep.c
View file @
aad59c31
...
...
@@ -130,7 +130,7 @@ void compute_cdep(ir_graph *irg)
cdep_data
->
cdep_map
=
pmap_create
();
assure_
postdoms
(
irg
);
assure_
irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_POSTDOMINANCE
);
/* we must temporary change the post dominator relation:
the ipdom of the startblock is the end block.
...
...
ir/ana/domfront.c
View file @
aad59c31
...
...
@@ -80,10 +80,10 @@ void ir_compute_dominance_frontiers(ir_graph *irg)
{
ir_dom_front_info_t
*
info
=
&
irg
->
domfront
;
assure_edges
(
irg
);
assure_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_OUT_EDGES
|
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
obstack_init
(
&
info
->
obst
);
info
->
df_map
=
pmap_create
();
assure_doms
(
irg
);
compute_df
(
get_irg_start_block
(
irg
),
info
);
add_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE_FRONTIERS
);
...
...
ir/ana/irdom.c
View file @
aad59c31
...
...
@@ -605,12 +605,6 @@ void compute_doms(ir_graph *irg)
add_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
}
void
assure_doms
(
ir_graph
*
irg
)
{
if
(
!
irg_has_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
))
compute_doms
(
irg
);
}
void
free_dom
(
ir_graph
*
irg
)
{
clear_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
...
...
@@ -701,12 +695,6 @@ void compute_postdoms(ir_graph *irg)
add_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_POSTDOMINANCE
);
}
void
assure_postdoms
(
ir_graph
*
irg
)
{
if
(
!
irg_has_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_POSTDOMINANCE
))
compute_postdoms
(
irg
);
}
void
free_postdom
(
ir_graph
*
irg
)
{
/* Update graph state */
...
...
ir/ana/irlivechk.c
View file @
aad59c31
...
...
@@ -33,6 +33,7 @@
#include "irnode_t.h"
#include "irnodemap.h"
#include "iredges_t.h"
#include "irgraph_t.h"
#include "irdom.h"
#include "irdump.h"
...
...
@@ -199,11 +200,11 @@ static inline void compute_back_edge_chains(lv_chk_t *lv)
lv_chk_t
*
lv_chk_new
(
ir_graph
*
irg
)
{
assure_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
lv_chk_t
*
res
=
XMALLOC
(
lv_chk_t
);
int
i
;
assure_doms
(
irg
);
stat_ev_tim_push
();
ir_nodemap_init
(
&
res
->
block_infos
,
irg
);
obstack_init
(
&
res
->
obst
);
...
...
ir/be/bechordal.c
View file @
aad59c31
...
...
@@ -335,8 +335,9 @@ static void be_ra_chordal_color(be_chordal_env_t *const chordal_env)
{
char
buf
[
256
];
ir_graph
*
const
irg
=
chordal_env
->
irg
;
assure_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
be_assure_live_sets
(
irg
);
assure_doms
(
irg
);
be_timer_push
(
T_CONSTR
);
...
...
ir/be/bepbqpcoloring.c
View file @
aad59c31
...
...
@@ -567,11 +567,11 @@ static void be_pbqp_coloring(be_chordal_env_t *env)
printf
(
"#### ----- === Allocating registers of %s (%s) ===
\n
"
,
cls
->
name
,
get_entity_name
(
get_irg_entity
(
irg
)));
#endif
assure_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
be_assure_live_sets
(
irg
);
lv
=
be_get_irg_liveness
(
irg
);
/* insert perms */
assure_doms
(
irg
);
dom_tree_walk_irg
(
irg
,
insert_perms
,
NULL
,
env
);
/* dump graph after inserting perms */
...
...
@@ -621,7 +621,7 @@ static void be_pbqp_coloring(be_chordal_env_t *env)
#if TIMER
ir_timer_reset_and_start
(
t_ra_pbqp_alloc_create
);
#endif
assure_
doms
(
irg
);
assure_
irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
dom_tree_walk_irg
(
irg
,
create_pbqp_coloring_instance
,
NULL
,
&
pbqp_alloc_env
);
#if TIMER
ir_timer_stop
(
t_ra_pbqp_alloc_create
);
...
...
ir/be/bestate.c
View file @
aad59c31
...
...
@@ -463,8 +463,9 @@ void be_assure_state(ir_graph *irg, const arch_register_t *reg, void *func_env,
spill_info_t
*
info
;
be_lv_t
*
lv
=
be_get_irg_liveness
(
irg
);
assure_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO
|
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
be_assure_live_sets
(
irg
);
assure_loopinfo
(
irg
);
obstack_init
(
&
env
.
obst
);
env
.
reg
=
reg
;
...
...
@@ -476,7 +477,6 @@ void be_assure_state(ir_graph *irg, const arch_register_t *reg, void *func_env,
env
.
spills
=
NULL
;
ir_nodehashmap_init
(
&
env
.
spill_infos
);
assure_doms
(
irg
);
ir_reserve_resources
(
irg
,
IR_RESOURCE_IRN_VISITED
|
IR_RESOURCE_IRN_LINK
);
inc_irg_visited
(
irg
);
...
...
ir/ir/irgopt.c
View file @
aad59c31
...
...
@@ -181,9 +181,8 @@ int optimize_graph_df(ir_graph *irg)
add_irg_constraints
(
irg
,
IR_GRAPH_CONSTRAINT_OPTIMIZE_UNREACHABLE_CODE
);
new_identities
(
irg
);
assure_edges
(
irg
);
assure_doms
(
irg
);
assure_irg_properties
(
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_OUT_EDGES
|
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
ir_reserve_resources
(
irg
,
IR_RESOURCE_IRN_LINK
);
irg_walk_graph
(
irg
,
NULL
,
opt_walker
,
waitq
);
...
...
@@ -197,7 +196,8 @@ int optimize_graph_df(ir_graph *irg)
opt_walker
(
n
,
waitq
);
}
/* Calculate dominance so we can kill unreachable code
* We want this intertwined with localopts for better optimization (phase coupling) */
* We want this intertwined with localopts for better optimization
* (phase coupling) */
compute_doms
(
irg
);
irg_block_walk_graph
(
irg
,
NULL
,
find_unreachable_blocks
,
waitq
);
}
...
...
ir/ir/irgraph.c
View file @
aad59c31
...
...
@@ -670,8 +670,8 @@ void assure_irg_properties(ir_graph *irg, ir_graph_properties_t props)
{
IR_GRAPH_PROPERTY_NO_UNREACHABLE_CODE
,
remove_unreachable_code
},
{
IR_GRAPH_PROPERTY_NO_BADS
,
remove_bads
},
{
IR_GRAPH_PROPERTY_NO_TUPLES
,
remove_tuples
},
{
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
,
assur
e_doms
},
{
IR_GRAPH_PROPERTY_CONSISTENT_POSTDOMINANCE
,
assur
e_postdoms
},
{
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
,
comput
e_doms
},
{
IR_GRAPH_PROPERTY_CONSISTENT_POSTDOMINANCE
,
comput
e_postdoms
},
{
IR_GRAPH_PROPERTY_CONSISTENT_OUT_EDGES
,
assure_edges
},
{
IR_GRAPH_PROPERTY_CONSISTENT_OUTS
,
assure_irg_outs
},
{
IR_GRAPH_PROPERTY_CONSISTENT_LOOPINFO
,
assure_loopinfo
},
...
...
ir/stat/firmstat.c
View file @
aad59c31
...
...
@@ -1111,7 +1111,7 @@ static void update_graph_stat(graph_entry_t *global, graph_entry_t *graph)
/* we need dominator info */
if
(
graph
->
irg
!=
get_const_code_irg
())
{
assure_
doms
(
graph
->
irg
);
assure_
irg_properties
(
graph
->
irg
,
IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE
);
}
/* count the nodes in the graph */
...
...
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