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

Switch irg index to type size_t, making the API more consistent.

parent 2dcaef36
......@@ -256,7 +256,7 @@ FIRM_API long get_irg_graph_nr(const ir_graph *irg);
* smaller than get_irp_last_idx()
* Note: you cannot use this number for get_irp_irg()
*/
FIRM_API int get_irg_idx(const ir_graph *irg);
FIRM_API size_t get_irg_idx(const ir_graph *irg);
/**
* Get the node for an index.
......
......@@ -139,7 +139,7 @@ FIRM_API void remove_irp_irg_from_list(ir_graph *irg);
FIRM_API void remove_irp_irg(ir_graph *irg);
/** returns the biggest not used irg index number */
FIRM_API int get_irp_last_idx(void);
FIRM_API size_t get_irp_last_idx(void);
/** Returns the number of ir graphs in the irp. */
FIRM_API size_t get_irp_n_irgs(void);
......
......@@ -494,7 +494,7 @@ long get_irg_graph_nr(const ir_graph *irg)
}
#endif
int get_irg_idx(const ir_graph *irg)
size_t get_irg_idx(const ir_graph *irg)
{
return irg->index;
}
......
......@@ -247,7 +247,7 @@ ir_graph *(get_irp_irg)(size_t pos)
return _get_irp_irg(pos);
}
int get_irp_last_idx(void)
size_t get_irp_last_idx(void)
{
return irp->max_irg_idx;
}
......
......@@ -115,7 +115,7 @@ static inline long get_irp_new_node_nr(void)
return irp->max_node_nr++;
}
static inline int get_irp_new_irg_idx(void)
static inline size_t get_irp_new_irg_idx(void)
{
assert(irp);
return irp->max_irg_idx++;
......
......@@ -522,7 +522,7 @@ struct ir_graph {
irg_edges_info_t edge_info; /**< edge info for automatic outs */
ir_node **idx_irn_map; /**< Array mapping node indexes to nodes. */
int index; /**< a unique number for each graph */
size_t index; /**< a unique number for each graph */
ir_phase *phases[PHASE_LAST+1]; /**< Phase information. */
void *be_data; /**< backend can put in private data here */
......@@ -597,7 +597,7 @@ struct ir_prog {
ir_exc_region_t last_region_nr; /**< The last exception region number that was assigned. */
ir_label_t last_label_nr; /**< The highest label number for generating unique labels. */
int max_irg_idx; /**< highest unused irg index */
size_t max_irg_idx; /**< highest unused irg index */
long max_node_nr; /**< to generate unique numbers for nodes. */
unsigned dump_nr; /**< number of program info dumps */
#ifndef NDEBUG
......
......@@ -987,7 +987,7 @@ static void check_for_possible_endless_loops(ir_graph *irg)
void optimize_funccalls(void)
{
size_t i, n;
int last_idx;
size_t last_idx;
env_t ctx;
size_t num_const = 0;
size_t num_pure = 0;
......
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