Commit 04569019 authored by Michael Beck's avatar Michael Beck
Browse files

Further pushed size_t: callgraph functions uses size_t now.

parent b45c1dbc
......@@ -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 int 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, int 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, int 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 int get_irg_caller_loop_depth(const ir_graph *irg, int 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 int 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, int 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, int 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 int get_irg_callee_loop_depth(const ir_graph *irg, int 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 int 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 int 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);
......
......@@ -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, int 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 int 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);
......
This diff is collapsed.
......@@ -1045,19 +1045,19 @@ int Call_has_callees(const ir_node *node)
(node->attr.call.callee_arr != NULL));
}
int 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, int 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 int 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);
......
/*
* Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
* Copyright (C) 1995-2011 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. */
int max_callgraph_loop_depth; /**< needed in callgraph. */
int 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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment