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
192986af
Commit
192986af
authored
Aug 07, 2008
by
Michael Beck
Browse files
- speed-up: if a partition has NO follower we can use the old split algorithm
[r21039]
parent
423099ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/opt/combo.c
View file @
192986af
...
...
@@ -596,9 +596,8 @@ static void update_worklist(partition_t *Z, partition_t *Z_prime, environment_t
}
}
/* update_worklist */
#ifdef NO_FOLLOWER
/**
* Split a partition by a local list.
* Split a partition
that has NO followers
by a local list.
*
* @param Z the Z partition to split
* @param g a (non-empty) node list
...
...
@@ -606,7 +605,7 @@ static void update_worklist(partition_t *Z, partition_t *Z_prime, environment_t
*
* @return a new partition containing the nodes of g
*/
static
partition_t
*
split
(
partition_t
*
Z
,
node_t
*
g
,
environment_t
*
env
)
{
static
partition_t
*
split
_no_followers
(
partition_t
*
Z
,
node_t
*
g
,
environment_t
*
env
)
{
partition_t
*
Z_prime
;
node_t
*
node
;
unsigned
n
=
0
;
...
...
@@ -645,7 +644,11 @@ static partition_t *split(partition_t *Z, node_t *g, environment_t *env) {
dump_partition
(
"Now "
,
Z
);
dump_partition
(
"Created new "
,
Z_prime
);
return
Z_prime
;
}
/* split */
}
/* split_no_followers */
#ifdef NO_FOLLOWER
#define split(Z, g, env) split_no_followers(Z, g, env)
#else
...
...
@@ -746,6 +749,13 @@ static partition_t *split(partition_t *X, node_t *gg, environment_t *env) {
node_t
*
g
,
*
h
,
*
node
;
int
max_input
,
n
,
m
;
if
(
list_empty
(
&
X
->
Follower
))
{
/* if the partition has NO follower, we can use the fast
splitting algorithm. */
return
split_no_followers
(
X
,
gg
,
env
);
}
/* else do the race */
dump_partition
(
"Splitting "
,
X
);
dump_list
(
"by list "
,
gg
);
...
...
@@ -2582,7 +2592,7 @@ void combo(ir_graph *irg) {
/* register a debug mask */
FIRM_DBG_REGISTER
(
dbg
,
"firm.opt.combo"
);
firm_dbg_set_mask
(
dbg
,
SET_LEVEL_3
);
//
firm_dbg_set_mask(dbg, SET_LEVEL_3);
DB
((
dbg
,
LEVEL_1
,
"Doing COMBO for %+F
\n
"
,
irg
));
...
...
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