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
3c24632c
Commit
3c24632c
authored
Sep 18, 2008
by
Matthias Braun
Browse files
improve debug output, increase depth limit to 7
[r22081]
parent
d411db59
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/becopyheur4.c
View file @
3c24632c
...
@@ -82,7 +82,7 @@ typedef float real_t;
...
@@ -82,7 +82,7 @@ typedef float real_t;
#define REAL(C) (C ## f)
#define REAL(C) (C ## f)
static
unsigned
last_chunk_id
=
0
;
static
unsigned
last_chunk_id
=
0
;
static
int
recolor_limit
=
4
;
static
int
recolor_limit
=
7
;
static
real_t
dislike_influence
=
REAL
(
0
.
1
);
static
real_t
dislike_influence
=
REAL
(
0
.
1
);
typedef
struct
_col_cost_t
{
typedef
struct
_col_cost_t
{
...
@@ -862,12 +862,12 @@ static aff_chunk_t *fragment_chunk(co_mst_env_t *env, int col, aff_chunk_t *c, w
...
@@ -862,12 +862,12 @@ static aff_chunk_t *fragment_chunk(co_mst_env_t *env, int col, aff_chunk_t *c, w
if
(
get_mst_irn_col
(
node
)
==
col
)
{
if
(
get_mst_irn_col
(
node
)
==
col
)
{
decider
=
decider_has_color
;
decider
=
decider_has_color
;
check_for_best
=
1
;
check_for_best
=
1
;
DBG
((
dbg
,
LEVEL_4
,
"
\t
color %d wanted"
,
col
));
DBG
((
dbg
,
LEVEL_4
,
"
\t
color %d wanted
\n
"
,
col
));
}
}
else
{
else
{
decider
=
decider_hasnot_color
;
decider
=
decider_hasnot_color
;
check_for_best
=
0
;
check_for_best
=
0
;
DBG
((
dbg
,
LEVEL_4
,
"
\t
color %d forbidden"
,
col
));
DBG
((
dbg
,
LEVEL_4
,
"
\t
color %d forbidden
\n
"
,
col
));
}
}
/* create a new chunk starting at current node */
/* create a new chunk starting at current node */
...
@@ -1013,21 +1013,25 @@ static int recolor_nodes(co_mst_env_t *env, co_mst_irn_t *node, col_cost_t *cost
...
@@ -1013,21 +1013,25 @@ static int recolor_nodes(co_mst_env_t *env, co_mst_irn_t *node, col_cost_t *cost
if
(
depth
>
*
max_depth
)
if
(
depth
>
*
max_depth
)
*
max_depth
=
depth
;
*
max_depth
=
depth
;
if
(
depth
>=
recolor_limit
)
return
0
;
DBG
((
dbg
,
LEVEL_4
,
"
\t
Recoloring %+F with color-costs"
,
node
->
irn
));
DBG
((
dbg
,
LEVEL_4
,
"
\t
Recoloring %+F with color-costs"
,
node
->
irn
));
DBG_COL_COST
(
env
,
LEVEL_4
,
costs
);
DBG_COL_COST
(
env
,
LEVEL_4
,
costs
);
DB
((
dbg
,
LEVEL_4
,
"
\n
"
));
DB
((
dbg
,
LEVEL_4
,
"
\n
"
));
if
(
depth
>=
recolor_limit
)
{
DBG
((
dbg
,
LEVEL_4
,
"
\t
Hit recolor limit
\n
"
));
return
0
;
}
for
(
i
=
0
;
i
<
env
->
n_regs
;
++
i
)
{
for
(
i
=
0
;
i
<
env
->
n_regs
;
++
i
)
{
int
tgt_col
=
costs
[
i
].
col
;
int
tgt_col
=
costs
[
i
].
col
;
int
neigh_ok
=
1
;
int
neigh_ok
=
1
;
int
j
;
int
j
;
/* If the costs for that color (and all successive) are infinite, bail out we won't make it anyway. */
/* If the costs for that color (and all successive) are infinite, bail out we won't make it anyway. */
if
(
costs
[
i
].
cost
==
REAL
(
0
.
0
))
if
(
costs
[
i
].
cost
==
REAL
(
0
.
0
))
{
DBG
((
dbg
,
LEVEL_4
,
"
\t
All further colors forbidden
\n
"
));
return
0
;
return
0
;
}
/* Set the new color of the node and mark the node as temporarily fixed. */
/* Set the new color of the node and mark the node as temporarily fixed. */
assert
(
node
->
tmp_col
<
0
&&
"Node must not have been temporary fixed."
);
assert
(
node
->
tmp_col
<
0
&&
"Node must not have been temporary fixed."
);
...
@@ -1080,6 +1084,7 @@ static int recolor_nodes(co_mst_env_t *env, co_mst_irn_t *node, col_cost_t *cost
...
@@ -1080,6 +1084,7 @@ static int recolor_nodes(co_mst_env_t *env, co_mst_irn_t *node, col_cost_t *cost
}
}
}
}
DBG
((
dbg
,
LEVEL_4
,
"
\t
All colors failed
\n
"
));
return
0
;
return
0
;
}
}
...
...
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