Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
7d5b3311
Commit
7d5b3311
authored
Sep 15, 2011
by
yb9976
Browse files
Fixed inconsistent uses of DEBUG_ONLY.
parent
af8c688e
Changes
21
Hide whitespace changes
Inline
Side-by-side
ir/adt/hungarian.c
View file @
7d5b3311
...
...
@@ -43,7 +43,7 @@
#include
"hungarian.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
struct
hungarian_problem_t
{
unsigned
num_rows
;
/**< number of rows */
...
...
ir/ana/interval_analysis.c
View file @
7d5b3311
...
...
@@ -40,7 +40,7 @@
#include
"irprintf.h"
#include
"hashptr.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
/*------------------------------------------------------------------*/
/* A new in array via a hashmap. */
...
...
ir/ana/vrp.c
View file @
7d5b3311
...
...
@@ -41,7 +41,7 @@
#include
"bitset.h"
#include
"debug.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
typedef
struct
vrp_env_t
{
waitq
*
workqueue
;
...
...
ir/be/bechordal_common.c
View file @
7d5b3311
...
...
@@ -78,8 +78,8 @@ static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head
*/
set_irn_link
(
irn
,
def
);
DEBUG_ONLY
(
b
->
magic
=
BORDER_FOURCC
)
;
DEBUG_ONLY
(
def
->
magic
=
BORDER_FOURCC
)
;
DEBUG_ONLY
(
b
->
magic
=
BORDER_FOURCC
;
)
DEBUG_ONLY
(
def
->
magic
=
BORDER_FOURCC
;
)
}
else
{
/*
* If the def is encountered, the use was made and so was the
...
...
@@ -88,7 +88,7 @@ static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head
*/
b
=
(
border_t
*
)
get_irn_link
(
irn
);
DEBUG_ONLY
(
assert
(
b
&&
b
->
magic
==
BORDER_FOURCC
&&
"Illegal border encountered"
)
)
;
DEBUG_ONLY
(
assert
(
b
&&
b
->
magic
==
BORDER_FOURCC
&&
"Illegal border encountered"
);
)
}
b
->
pressure
=
pressure
;
...
...
ir/be/becopyheur2.c
View file @
7d5b3311
...
...
@@ -958,7 +958,7 @@ static void process_cloud(co2_cloud_t *cloud)
DBG
((
env
->
dbg
,
LEVEL_3
,
"mst:
\n
"
));
for
(
i
=
0
;
i
<
cloud
->
n_memb
;
++
i
)
{
DEBUG_ONLY
(
co2_cloud_irn_t
*
ci
=
cloud
->
seq
[
i
]
)
;
DEBUG_ONLY
(
co2_cloud_irn_t
*
ci
=
cloud
->
seq
[
i
];
)
DBG
((
env
->
dbg
,
LEVEL_3
,
"
\t
%+F -> %+F
\n
"
,
ci
->
inh
.
irn
,
ci
->
mst_parent
->
inh
.
irn
));
}
...
...
ir/be/belistsched.c
View file @
7d5b3311
...
...
@@ -61,7 +61,7 @@
#include
"lc_opts.h"
#include
"lc_opts_enum.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
=
NULL
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
=
NULL
;
)
/**
* Scheduling environment for the whole graph.
...
...
ir/be/beloopana.c
View file @
7d5b3311
...
...
@@ -40,7 +40,7 @@
#include
"beloopana.h"
#include
"bemodule.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
=
NULL
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
=
NULL
;
)
#define HASH_LOOP_INFO(info) (HASH_PTR((info)->loop) ^ HASH_PTR((info)->cls))
...
...
ir/be/betranshlp.c
View file @
7d5b3311
...
...
@@ -211,7 +211,7 @@ ir_node *be_transform_node(ir_node *node)
if
(
new_node
!=
NULL
)
return
new_node
;
DEBUG_ONLY
(
be_set_transformed_node
(
node
,
NULL
)
)
;
DEBUG_ONLY
(
be_set_transformed_node
(
node
,
NULL
);
)
op
=
get_irn_op
(
node
);
if
(
op
->
ops
.
generic
==
NULL
)
{
...
...
ir/be/ia32/ia32_transform.c
View file @
7d5b3311
...
...
@@ -3929,7 +3929,7 @@ static ir_node *gen_Conv(ir_node *node)
}
}
else
{
/* this should be optimized already, but who knows... */
DEBUG_ONLY
(
ir_fprintf
(
stderr
,
"Debug warning: conv %+F is pointless
\n
"
,
node
)
)
;
DEBUG_ONLY
(
ir_fprintf
(
stderr
,
"Debug warning: conv %+F is pointless
\n
"
,
node
);
)
DB
((
dbg
,
LEVEL_1
,
"killed Conv(mode, mode) ..."
));
return
be_transform_node
(
op
);
}
...
...
ir/be/ia32/ia32_x87.c
View file @
7d5b3311
...
...
@@ -217,7 +217,7 @@ static void x87_set_st(x87_state *state, int reg_idx, ir_node *node, int pos)
state
->
st
[
MASK_TOS
(
state
->
tos
+
pos
)].
node
=
node
;
DB
((
dbg
,
LEVEL_2
,
"After SET_REG: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
}
/* x87_set_st */
/**
...
...
@@ -248,7 +248,7 @@ static void x87_fxch(x87_state *state, int pos)
state
->
st
[
MASK_TOS
(
state
->
tos
)]
=
entry
;
DB
((
dbg
,
LEVEL_2
,
"After FXCH: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
}
/* x87_fxch */
/**
...
...
@@ -286,7 +286,7 @@ static void x87_push_dbl(x87_state *state, int reg_idx, ir_node *node)
state
->
st
[
state
->
tos
].
reg_idx
=
reg_idx
;
state
->
st
[
state
->
tos
].
node
=
node
;
DB
((
dbg
,
LEVEL_2
,
"After PUSH: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DB
((
dbg
,
LEVEL_2
,
"After PUSH: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
}
/* x87_push_dbl */
/**
...
...
@@ -316,7 +316,7 @@ static void x87_pop(x87_state *state)
--
state
->
depth
;
state
->
tos
=
MASK_TOS
(
state
->
tos
+
1
);
DB
((
dbg
,
LEVEL_2
,
"After POP: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DB
((
dbg
,
LEVEL_2
,
"After POP: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
}
/* x87_pop */
/**
...
...
@@ -583,9 +583,9 @@ static x87_state *x87_shuffle(x87_simulator *sim, ir_node *block,
/* Hmm: permutation needed */
DB
((
dbg
,
LEVEL_2
,
"
\n
%+F needs permutation: from
\n
"
,
block
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
DB
((
dbg
,
LEVEL_2
,
" to
\n
"
));
DEBUG_ONLY
(
x87_dump_stack
(
dst_state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
dst_state
);
)
#ifdef DEBUG_libfirm
...
...
@@ -910,9 +910,9 @@ static int sim_binop(x87_state *state, ir_node *n, const exchange_tmpl *tmpl)
DB
((
dbg
,
LEVEL_1
,
">>> %+F %s, %s -> %s
\n
"
,
n
,
arch_register_get_name
(
op1_reg
),
arch_register_get_name
(
op2_reg
),
arch_register_get_name
(
out
)));
DEBUG_ONLY
(
vfp_dump_live
(
live
)
)
;
DEBUG_ONLY
(
vfp_dump_live
(
live
);
)
DB
((
dbg
,
LEVEL_1
,
"Stack before: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
op1_idx
=
x87_on_stack
(
state
,
reg_index_1
);
assert
(
op1_idx
>=
0
);
...
...
@@ -1071,7 +1071,7 @@ static int sim_unop(x87_state *state, ir_node *n, ir_op *op)
unsigned
live
=
vfp_live_args_after
(
sim
,
n
,
REGMASK
(
out
));
DB
((
dbg
,
LEVEL_1
,
">>> %+F -> %s
\n
"
,
n
,
out
->
name
));
DEBUG_ONLY
(
vfp_dump_live
(
live
)
)
;
DEBUG_ONLY
(
vfp_dump_live
(
live
);
)
op1_idx
=
x87_on_stack
(
state
,
arch_register_get_index
(
op1
));
...
...
@@ -1358,9 +1358,9 @@ static int sim_FtstFnstsw(x87_state *state, ir_node *n)
unsigned
live
=
vfp_live_args_after
(
sim
,
n
,
0
);
DB
((
dbg
,
LEVEL_1
,
">>> %+F %s
\n
"
,
n
,
arch_register_get_name
(
reg1
)));
DEBUG_ONLY
(
vfp_dump_live
(
live
)
)
;
DEBUG_ONLY
(
vfp_dump_live
(
live
);
)
DB
((
dbg
,
LEVEL_1
,
"Stack before: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
assert
(
op1_idx
>=
0
);
if
(
op1_idx
!=
0
)
{
...
...
@@ -1410,9 +1410,9 @@ static int sim_Fucom(x87_state *state, ir_node *n)
DB
((
dbg
,
LEVEL_1
,
">>> %+F %s, %s
\n
"
,
n
,
arch_register_get_name
(
op1
),
arch_register_get_name
(
op2
)));
DEBUG_ONLY
(
vfp_dump_live
(
live
)
)
;
DEBUG_ONLY
(
vfp_dump_live
(
live
);
)
DB
((
dbg
,
LEVEL_1
,
"Stack before: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
op1_idx
=
x87_on_stack
(
state
,
reg_index_1
);
assert
(
op1_idx
>=
0
);
...
...
@@ -1656,7 +1656,7 @@ static int sim_Keep(x87_state *state, ir_node *node)
}
DB
((
dbg
,
LEVEL_1
,
"Stack after: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
return
NO_NODE_ADDED
;
}
/* sim_Keep */
...
...
@@ -1778,7 +1778,7 @@ static int sim_Copy(x87_state *state, ir_node *n)
DB
((
dbg
,
LEVEL_1
,
">>> %+F %s -> %s
\n
"
,
n
,
arch_register_get_name
(
op1
),
arch_register_get_name
(
out
)));
DEBUG_ONLY
(
vfp_dump_live
(
live
)
)
;
DEBUG_ONLY
(
vfp_dump_live
(
live
);
)
op1_idx
=
x87_on_stack
(
state
,
arch_register_get_index
(
op1
));
...
...
@@ -1916,7 +1916,7 @@ static int sim_Call(x87_state *state, ir_node *n)
end_call:
DB
((
dbg
,
LEVEL_1
,
"Stack after: "
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
return
NO_NODE_ADDED
;
}
/* sim_Call */
...
...
@@ -2038,8 +2038,8 @@ static x87_state *x87_kill_deads(x87_simulator *sim, ir_node *block, x87_state *
state
=
x87_clone_state
(
sim
,
state
);
DB
((
dbg
,
LEVEL_1
,
"Killing deads:
\n
"
));
DEBUG_ONLY
(
vfp_dump_live
(
live
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
vfp_dump_live
(
live
);
)
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
if
(
kill_mask
!=
0
&&
live
==
0
)
{
/* special case: kill all registers */
...
...
@@ -2114,7 +2114,7 @@ static void x87_simulate_block(x87_simulator *sim, ir_node *block)
DB
((
dbg
,
LEVEL_1
,
"Simulate %+F
\n
"
,
block
));
DB
((
dbg
,
LEVEL_2
,
"State at Block begin:
\n
"
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
/* at block begin, kill all dead registers */
state
=
x87_kill_deads
(
sim
,
block
,
state
);
...
...
@@ -2151,7 +2151,7 @@ static void x87_simulate_block(x87_simulator *sim, ir_node *block)
start_block
=
get_irg_start_block
(
get_irn_irg
(
block
));
DB
((
dbg
,
LEVEL_2
,
"State at Block end:
\n
"
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DB
((
dbg
,
LEVEL_2
,
"State at Block end:
\n
"
));
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
/* check if the state must be shuffled */
foreach_block_succ
(
block
,
edge
)
{
...
...
@@ -2165,7 +2165,7 @@ static void x87_simulate_block(x87_simulator *sim, ir_node *block)
if
(
succ_state
->
begin
==
NULL
)
{
DB
((
dbg
,
LEVEL_2
,
"Set begin state for succ %+F:
\n
"
,
succ
));
DEBUG_ONLY
(
x87_dump_stack
(
state
)
)
;
DEBUG_ONLY
(
x87_dump_stack
(
state
);
)
succ_state
->
begin
=
state
;
waitq_put
(
sim
->
worklist
,
succ
);
...
...
ir/opt/boolopt.c
View file @
7d5b3311
...
...
@@ -57,7 +57,7 @@ typedef struct {
int
changed
;
/**< Set if the graph was changed. */
}
bool_opt_env_t
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
/**
* Check if tho given nodes, l and r, represent two compares with
...
...
ir/opt/combo.c
View file @
7d5b3311
...
...
@@ -219,7 +219,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg;)
DEBUG_ONLY
(
static
const
char
*
what_reason
;)
/** Next partition number. */
DEBUG_ONLY
(
static
unsigned
part_nr
=
0
)
;
DEBUG_ONLY
(
static
unsigned
part_nr
=
0
;
)
/** The tarval returned by Unknown nodes: set to either tarval_bad OR tarval_top. */
static
ir_tarval
*
tarval_UNKNOWN
;
...
...
@@ -3529,7 +3529,7 @@ static ir_graph_state_t do_combo(ir_graph *irg)
set_value_of_func
(
get_node_tarval
);
set_compute_functions
();
DEBUG_ONLY
(
part_nr
=
0
)
;
DEBUG_ONLY
(
part_nr
=
0
;
)
ir_reserve_resources
(
irg
,
IR_RESOURCE_IRN_LINK
|
IR_RESOURCE_PHI_LIST
);
...
...
@@ -3544,7 +3544,7 @@ static ir_graph_state_t do_combo(ir_graph *irg)
irg_walk_graph
(
irg
,
create_initial_partitions
,
init_block_phis
,
&
env
);
/* set the hook: from now, every node has a partition and a type */
DEBUG_ONLY
(
set_dump_node_vcgattr_hook
(
dump_partition_hook
)
)
;
DEBUG_ONLY
(
set_dump_node_vcgattr_hook
(
dump_partition_hook
);
)
/* all nodes on the initial partition have type Top */
env
.
initial
->
type_is_T_or_C
=
1
;
...
...
@@ -3592,7 +3592,7 @@ static ir_graph_state_t do_combo(ir_graph *irg)
ir_free_resources
(
irg
,
IR_RESOURCE_IRN_LINK
|
IR_RESOURCE_PHI_LIST
);
/* remove the partition hook */
DEBUG_ONLY
(
set_dump_node_vcgattr_hook
(
NULL
)
)
;
DEBUG_ONLY
(
set_dump_node_vcgattr_hook
(
NULL
);
)
DEL_ARR_F
(
env
.
kept_memory
);
del_set
(
env
.
opcode2id_map
);
...
...
ir/opt/convopt.c
View file @
7d5b3311
...
...
@@ -56,7 +56,7 @@
#include
"vrp.h"
#include
"opt_manage.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
static
inline
int
imin
(
int
a
,
int
b
)
{
return
a
<
b
?
a
:
b
;
}
...
...
ir/opt/garbage_collect.c
View file @
7d5b3311
...
...
@@ -36,7 +36,7 @@
#include
"error.h"
#include
"debug.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
static
void
visit_entity
(
ir_entity
*
entity
);
...
...
ir/opt/ifconv.c
View file @
7d5b3311
...
...
@@ -53,7 +53,7 @@ typedef struct walker_env {
bool
changed
;
/**< Set if the graph was changed. */
}
walker_env
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
/**
* Returns non-zero if a Block can be emptied.
...
...
ir/opt/ircgopt.c
View file @
7d5b3311
...
...
@@ -45,7 +45,7 @@
#include
"irtools.h"
#include
"irpass.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
/**
* Walker: adds Call operations to a head's link list.
...
...
ir/opt/jumpthreading.c
View file @
7d5b3311
...
...
@@ -50,7 +50,7 @@
#undef AVOID_PHIB
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
/**
* Add the new predecessor x to node node, which is either a Block or a Phi
...
...
ir/opt/loop.c
View file @
7d5b3311
...
...
@@ -53,7 +53,7 @@
#include
"irloop_t.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
/**
* Convenience macro for iterating over every phi node of the given block.
...
...
ir/opt/opt_blocks.c
View file @
7d5b3311
...
...
@@ -155,7 +155,7 @@ typedef struct listmap_t {
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;)
/** Next partition number. */
DEBUG_ONLY
(
static
unsigned
part_nr
=
0
)
;
DEBUG_ONLY
(
static
unsigned
part_nr
=
0
;
)
#ifdef DEBUG_libfirm
/**
...
...
@@ -293,7 +293,7 @@ static partition_t *create_partition(ir_node *meet_block, environment_t *env)
INIT_LIST_HEAD
(
&
part
->
blocks
);
part
->
meet_block
=
meet_block
;
part
->
n_blocks
=
0
;
DEBUG_ONLY
(
part
->
nr
=
part_nr
++
)
;
DEBUG_ONLY
(
part
->
nr
=
part_nr
++
;
)
list_add_tail
(
&
part
->
part_list
,
&
env
->
partitions
);
return
part
;
}
/* create_partition */
...
...
@@ -1203,7 +1203,7 @@ int shape_blocks(ir_graph *irg)
/* register a debug mask */
FIRM_DBG_REGISTER
(
dbg
,
"firm.opt.blocks"
);
DEBUG_ONLY
(
part_nr
=
0
)
;
DEBUG_ONLY
(
part_nr
=
0
;
)
DB
((
dbg
,
LEVEL_1
,
"Shaping blocks for %+F
\n
"
,
irg
));
/* works better, when returns are placed at the end of the blocks */
...
...
ir/opt/tailrec.c
View file @
7d5b3311
...
...
@@ -47,7 +47,7 @@
#include
"ircons_t.h"
#include
"irpass.h"
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
)
;
DEBUG_ONLY
(
static
firm_dbg_module_t
*
dbg
;
)
/**
* the environment for collecting data
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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