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
04569019
Commit
04569019
authored
Mar 02, 2011
by
Michael Beck
Browse files
Further pushed size_t: callgraph functions uses size_t now.
parent
b45c1dbc
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
include/libfirm/callgraph.h
View file @
04569019
...
...
@@ -58,42 +58,42 @@ FIRM_API irp_callgraph_state get_irp_callgraph_state(void);
FIRM_API
void
set_irp_callgraph_state
(
irp_callgraph_state
s
);
/** Returns the number of procedures that call the given irg. */
FIRM_API
in
t
get_irg_n_callers
(
const
ir_graph
*
irg
);
FIRM_API
size_
t
get_irg_n_callers
(
const
ir_graph
*
irg
);
/** Returns the caller at position pos. */
ir_graph
*
get_irg_caller
(
const
ir_graph
*
irg
,
in
t
pos
);
ir_graph
*
get_irg_caller
(
const
ir_graph
*
irg
,
size_
t
pos
);
/** Returns non-zero if the caller at position pos is "a backedge", i.e. a recursion. */
FIRM_API
int
is_irg_caller_backedge
(
const
ir_graph
*
irg
,
in
t
pos
);
FIRM_API
int
is_irg_caller_backedge
(
const
ir_graph
*
irg
,
size_
t
pos
);
/** Returns non-zero if the irg has a backedge caller. */
FIRM_API
int
has_irg_caller_backedge
(
const
ir_graph
*
irg
);
/** Returns the maximal loop depth of call nodes that call along this edge. */
FIRM_API
in
t
get_irg_caller_loop_depth
(
const
ir_graph
*
irg
,
in
t
pos
);
FIRM_API
size_
t
get_irg_caller_loop_depth
(
const
ir_graph
*
irg
,
size_
t
pos
);
/** Returns the number of procedures that are called by the given irg. */
FIRM_API
in
t
get_irg_n_callees
(
const
ir_graph
*
irg
);
FIRM_API
size_
t
get_irg_n_callees
(
const
ir_graph
*
irg
);
/** Returns the callee at position pos. */
FIRM_API
ir_graph
*
get_irg_callee
(
const
ir_graph
*
irg
,
in
t
pos
);
FIRM_API
ir_graph
*
get_irg_callee
(
const
ir_graph
*
irg
,
size_
t
pos
);
/** Returns non-zero if the callee at position pos is "a backedge", i.e. a recursion. */
FIRM_API
int
is_irg_callee_backedge
(
const
ir_graph
*
irg
,
in
t
pos
);
FIRM_API
int
is_irg_callee_backedge
(
const
ir_graph
*
irg
,
size_
t
pos
);
/** Returns non-zero if the irg has a backedge callee. */
FIRM_API
int
has_irg_callee_backedge
(
const
ir_graph
*
irg
);
/** Returns the maximal loop depth of call nodes that call along this edge. */
FIRM_API
in
t
get_irg_callee_loop_depth
(
const
ir_graph
*
irg
,
in
t
pos
);
FIRM_API
size_
t
get_irg_callee_loop_depth
(
const
ir_graph
*
irg
,
size_
t
pos
);
/** Returns the maximal loop depth of all paths from an external visible method to
this irg. */
FIRM_API
in
t
get_irg_loop_depth
(
const
ir_graph
*
irg
);
FIRM_API
size_
t
get_irg_loop_depth
(
const
ir_graph
*
irg
);
/** Returns the maximal recursion depth of all paths from an external visible method to
this irg. */
FIRM_API
in
t
get_irg_recursion_depth
(
const
ir_graph
*
irg
);
FIRM_API
size_
t
get_irg_recursion_depth
(
const
ir_graph
*
irg
);
/** Returns the method execution frequency of a graph. */
FIRM_API
double
get_irg_method_execution_frequency
(
const
ir_graph
*
irg
);
...
...
include/libfirm/irnode.h
View file @
04569019
...
...
@@ -459,13 +459,13 @@ FIRM_API int is_self_recursive_Call(const ir_node *call);
* @param node A Call node.
*/
FIRM_API
int
Call_has_callees
(
const
ir_node
*
node
);
FIRM_API
int
get_Call_n_callees
(
const
ir_node
*
node
);
FIRM_API
ir_entity
*
get_Call_callee
(
const
ir_node
*
node
,
in
t
pos
);
FIRM_API
size_t
get_Call_n_callees
(
const
ir_node
*
node
);
FIRM_API
ir_entity
*
get_Call_callee
(
const
ir_node
*
node
,
size_
t
pos
);
/** Set the full callee array.
*
* The passed array is copied. Assumes current_ir_graph set properly! */
FIRM_API
void
set_Call_callee_arr
(
ir_node
*
node
,
const
in
t
n
,
ir_entity
**
arr
);
FIRM_API
void
set_Call_callee_arr
(
ir_node
*
node
,
size_
t
n
,
ir_entity
**
arr
);
FIRM_API
void
remove_Call_callee_arr
(
ir_node
*
node
);
FIRM_API
ir_node
**
get_Builtin_param_arr
(
ir_node
*
node
);
...
...
ir/ana/callgraph.c
View file @
04569019
This diff is collapsed.
Click to expand it.
ir/ir/irnode.c
View file @
04569019
...
...
@@ -1045,19 +1045,19 @@ int Call_has_callees(const ir_node *node)
(
node
->
attr
.
call
.
callee_arr
!=
NULL
));
}
in
t
get_Call_n_callees
(
const
ir_node
*
node
)
size_
t
get_Call_n_callees
(
const
ir_node
*
node
)
{
assert
(
is_Call
(
node
)
&&
node
->
attr
.
call
.
callee_arr
);
return
ARR_LEN
(
node
->
attr
.
call
.
callee_arr
);
}
ir_entity
*
get_Call_callee
(
const
ir_node
*
node
,
in
t
pos
)
ir_entity
*
get_Call_callee
(
const
ir_node
*
node
,
size_
t
pos
)
{
assert
(
pos
>=
0
&&
pos
<
get_Call_n_callees
(
node
));
assert
(
pos
<
get_Call_n_callees
(
node
));
return
node
->
attr
.
call
.
callee_arr
[
pos
];
}
void
set_Call_callee_arr
(
ir_node
*
node
,
const
in
t
n
,
ir_entity
**
arr
)
void
set_Call_callee_arr
(
ir_node
*
node
,
size_
t
n
,
ir_entity
**
arr
)
{
ir_graph
*
irg
=
get_irn_irg
(
node
);
...
...
ir/ir/irtypes.h
View file @
04569019
/*
* Copyright (C) 1995-20
08
University of Karlsruhe. All right reserved.
* Copyright (C) 1995-20
11
University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
...
...
@@ -445,7 +445,7 @@ enum irg_anchors {
typedef
struct
cg_callee_entry
{
ir_graph
*
irg
;
/**< The called irg. */
ir_node
**
call_list
;
/**< The list of all calls to the irg. */
int
max_depth
;
/**< Maximum depth of all Call nodes to irg. */
size_t
max_depth
;
/**< Maximum depth of all Call nodes to irg. */
}
cg_callee_entry
;
/**
...
...
@@ -505,8 +505,8 @@ struct ir_graph {
cg_callee_entry
**
callees
;
/**< For callgraph analysis: list of callee calls */
unsigned
*
callee_isbe
;
/**< For callgraph analysis: raw bitset if backedge info calculated. */
ir_loop
*
l
;
/**< For callgraph analysis. */
int
callgraph_loop_depth
;
/**< For callgraph analysis */
int
callgraph_recursion_depth
;
/**< For callgraph analysis */
size_t
callgraph_loop_depth
;
/**< For callgraph analysis */
size_t
callgraph_recursion_depth
;
/**< For callgraph analysis */
double
method_execution_frequency
;
/**< For callgraph analysis */
...
...
@@ -588,8 +588,8 @@ struct ir_prog {
irp_callgraph_state
callgraph_state
;
/**< The state of the callgraph. */
ir_loop
*
outermost_cg_loop
;
/**< For callgraph analysis: entry point
to looptree over callgraph. */
in
t
max_callgraph_loop_depth
;
/**< needed in callgraph. */
in
t
max_callgraph_recursion_depth
;
/**< needed in callgraph. */
size_
t
max_callgraph_loop_depth
;
/**< needed in callgraph. */
size_
t
max_callgraph_recursion_depth
;
/**< needed in callgraph. */
double
max_method_execution_frequency
;
/**< needed in callgraph. */
irp_temperature_state
temperature_state
;
/**< accumulated temperatures computed? */
exec_freq_state
execfreq_state
;
/**< The state of execution frequency information */
...
...
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