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
8a8016af
Commit
8a8016af
authored
Oct 22, 2014
by
Christoph Mallon
Browse files
stat: Remove the unused if-conversion statistics.
They are remnants from the first if-conversion implementation.
parent
e6a83641
Changes
4
Hide whitespace changes
Inline
Side-by-side
ir/ir/irhooks.h
View file @
8a8016af
...
...
@@ -49,17 +49,6 @@ typedef enum {
HOOK_OPT_LAST
}
hook_opt_kind
;
/** Result of an if-conversion attempt */
typedef
enum
if_result_t
{
IF_RESULT_SUCCESS
=
0
,
/**< if conversion could be done */
IF_RESULT_SIDE_EFFECT
=
1
,
/**< if conversion failed because of side effect */
IF_RESULT_SIDE_EFFECT_PHI
=
2
,
/**< if conversion failed because of Phi node found */
IF_RESULT_TOO_DEEP
=
3
,
/**< if conversion failed because of to deep DAG's */
IF_RESULT_BAD_CF
=
4
,
/**< if conversion failed because of bad control flow */
IF_RESULT_DENIED
=
5
,
/**< if conversion failed because of architecture deny */
IF_RESULT_LAST
}
if_result_t
;
/**
* A generic function type.
*/
...
...
@@ -133,9 +122,6 @@ struct hook_entry {
/** This hook is called, when dead node elimination is started/stopped. */
void
(
*
_hook_dead_node_elim
)(
void
*
context
,
ir_graph
*
irg
,
int
start
);
/** This hook is called after if conversion has run. */
void
(
*
_hook_if_conversion
)(
void
*
context
,
ir_graph
*
irg
,
ir_node
*
phi
,
int
pos
,
ir_node
*
mux
,
if_result_t
reason
);
/** This hook is called after a call was detected as const call */
void
(
*
_hook_func_call
)(
void
*
context
,
ir_graph
*
irg
,
ir_node
*
call
);
...
...
@@ -188,7 +174,6 @@ typedef enum {
hook_tail_rec
,
/**< type for hook_tail_rec() hook */
hook_strength_red
,
/**< type for hook_strength_red() hook */
hook_dead_node_elim
,
/**< type for hook_dead_node_elim() hook */
hook_if_conversion
,
/**< type for hook_if_conversion() hook */
hook_func_call
,
/**< type for hook_func_call() hook */
/** type for hook_arch_dep_replace_mul_with_shifts() hook */
hook_arch_dep_replace_mul_with_shifts
,
...
...
@@ -275,9 +260,6 @@ extern hook_entry_t *hooks[hook_last];
hook_exec(hook_strength_red, (hook_ctx_, irg, node))
/** Called before dead node elimination is performed */
#define hook_dead_node_elim(irg, start) hook_exec(hook_dead_node_elim, (hook_ctx_, irg, start))
/** Called when if-conversion creates a Mux node */
#define hook_if_conversion(irg, phi, pos, mux, reason) \
hook_exec(hook_if_conversion, (hook_ctx_, irg, phi, pos, mux, reason))
/** Called when a function call is optimized */
#define hook_func_call(irg, call) \
hook_exec(hook_func_call, (hook_ctx_, irg, call))
...
...
ir/stat/firmstat.c
View file @
8a8016af
...
...
@@ -1750,28 +1750,6 @@ static void stat_dead_node_elim(void *ctx, ir_graph *irg, int start)
status
->
in_dead_node_elim
=
(
start
!=
0
);
}
/**
* Hook: if-conversion was tried.
*/
static
void
stat_if_conversion
(
void
*
context
,
ir_graph
*
irg
,
ir_node
*
phi
,
int
pos
,
ir_node
*
mux
,
if_result_t
reason
)
{
(
void
)
context
;
(
void
)
phi
;
(
void
)
pos
;
(
void
)
mux
;
if
(
!
status
->
stat_options
)
return
;
STAT_ENTER
;
{
graph_entry_t
*
graph
=
graph_get_entry
(
irg
,
status
->
irg_hash
);
cnt_inc
(
&
graph
->
cnt
[
gcnt_if_conv
+
reason
]);
}
STAT_LEAVE
;
}
/**
* Hook: real function call was optimized.
*/
...
...
@@ -2096,7 +2074,6 @@ void firm_init_stat(void)
HOOK
(
hook_tail_rec
,
stat_tail_rec
);
HOOK
(
hook_strength_red
,
stat_strength_red
);
HOOK
(
hook_dead_node_elim
,
stat_dead_node_elim
);
HOOK
(
hook_if_conversion
,
stat_if_conversion
);
HOOK
(
hook_func_call
,
stat_func_call
);
HOOK
(
hook_arch_dep_replace_mul_with_shifts
,
stat_arch_dep_replace_mul_with_shifts
);
HOOK
(
hook_arch_dep_replace_division_by_const
,
stat_arch_dep_replace_division_by_const
);
...
...
ir/stat/firmstat_t.h
View file @
8a8016af
...
...
@@ -246,10 +246,9 @@ enum graph_counter_names {
gcnt_param_adr
,
/**< number of parameter load/store addresses. */
gcnt_this_adr
,
/**< number of this load/store addresses. */
gcnt_other_adr
,
/**< number of other load/store addresses. */
gcnt_if_conv
,
/**< number of if conversions */
/* --- must be the last enum constant --- */
_gcnt_last
=
gcnt_
if_conv
+
IF_RESULT_LAST
/**< number of counters */
_gcnt_last
=
gcnt_
other_adr
/**< number of counters */
};
/**
...
...
ir/stat/stat_dmp.c
View file @
8a8016af
...
...
@@ -149,15 +149,6 @@ static const struct {
{
(
hook_opt_kind
)
FS_OPT_RTS_MEMCMP
,
"RTS optimization: call to memcmp() replaced"
},
};
static
const
char
*
if_conv_names
[
IF_RESULT_LAST
]
=
{
"if conv done "
,
"if conv side effect "
,
"if conv Phi node found "
,
"if conv to deep DAG's "
,
"if conv bad control flow "
,
"if conv denied by arch "
,
};
/**
* dumps a opcode hash into human readable form
*/
...
...
@@ -435,8 +426,6 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
if
(
entry
->
irg
)
{
ir_graph
*
const_irg
=
get_const_code_irg
();
int
i
;
if
(
entry
->
irg
==
const_irg
)
{
fprintf
(
dmp
->
f
,
"
\n
Const code Irg %p"
,
(
void
*
)
entry
->
irg
);
}
else
{
...
...
@@ -472,10 +461,6 @@ static void simple_dump_graph(dumper_t *dmp, graph_entry_t *entry)
cnt_to_uint
(
&
entry
->
cnt
[
gcnt_indirect_calls
]),
cnt_to_uint
(
&
entry
->
cnt
[
gcnt_external_calls
])
);
for
(
i
=
0
;
i
<
IF_RESULT_LAST
;
++
i
)
{
fprintf
(
dmp
->
f
,
" %s : %u
\n
"
,
if_conv_names
[
i
],
cnt_to_uint
(
&
entry
->
cnt
[
gcnt_if_conv
+
i
]));
}
}
else
{
fprintf
(
dmp
->
f
,
"
\n
Globals counts:
\n
"
);
fprintf
(
dmp
->
f
,
"--------------
\n
"
);
...
...
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