Commit bb9f2e36 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

s/\<\(LC_\)\?INLINE\>/inline/.

[r22889]
parent 57f7225b
......@@ -41,13 +41,13 @@ struct _gs_matrix_t {
row_col_t *rows;
};
static INLINE void alloc_cols(row_col_t *row, int c_cols) {
static inline void alloc_cols(row_col_t *row, int c_cols) {
assert(c_cols > row->c_cols);
row->c_cols = c_cols;
row->cols = XREALLOC(row->cols, col_val_t, c_cols);
}
static INLINE void alloc_rows(gs_matrix_t *m, int c_rows, int c_cols, int begin_init) {
static inline void alloc_rows(gs_matrix_t *m, int c_rows, int c_cols, int begin_init) {
int i;
assert(c_rows > m->c_rows);
......
......@@ -219,7 +219,7 @@ size_t hashset_size(const HashSet *self)
* @note also see comments for hashset_insert()
* @internal
*/
static INLINE
static inline
InsertReturnValue insert_nogrow(HashSet *self, KeyType key)
{
size_t num_probes = 0;
......@@ -270,7 +270,7 @@ InsertReturnValue insert_nogrow(HashSet *self, KeyType key)
* calculate shrink and enlarge limits
* @internal
*/
static INLINE
static inline
void reset_thresholds(HashSet *self)
{
self->enlarge_threshold = (size_t) HT_OCCUPANCY_FLT(self->num_buckets);
......@@ -326,7 +326,7 @@ void insert_new(HashSet *self, unsigned hash, ValueType value)
* Resize the hashset
* @internal
*/
static INLINE
static inline
void resize(HashSet *self, size_t new_size)
{
size_t num_buckets = self->num_buckets;
......@@ -363,7 +363,7 @@ void resize(HashSet *self, size_t new_size)
#else
/* resize must be defined outside */
static INLINE void resize(HashSet *self, size_t new_size);
static inline void resize(HashSet *self, size_t new_size);
#endif
......@@ -371,7 +371,7 @@ static INLINE void resize(HashSet *self, size_t new_size);
* grow the hashset if adding 1 more elements would make it too crowded
* @internal
*/
static INLINE
static inline
void maybe_grow(HashSet *self)
{
size_t resize_to;
......@@ -388,7 +388,7 @@ void maybe_grow(HashSet *self)
* shrink the hashset if it is only sparsely filled
* @internal
*/
static INLINE
static inline
void maybe_shrink(HashSet *self)
{
size_t size;
......@@ -516,7 +516,7 @@ void hashset_remove(HashSet *self, ConstKeyType key)
* Initializes hashset with a specific size
* @internal
*/
static INLINE
static inline
void init_size(HashSet *self, size_t initial_size)
{
if(initial_size < 4)
......
......@@ -58,7 +58,7 @@ struct _hungarian_problem_t {
DEBUG_ONLY(firm_dbg_module_t *dbg);
};
static INLINE void *get_init_mem(struct obstack *obst, long sz) {
static inline void *get_init_mem(struct obstack *obst, long sz) {
void *p = obstack_alloc(obst, sz);
memset(p, 0, sz);
return p;
......
......@@ -93,7 +93,7 @@ static unsigned pdeqs_cached;
*
* @param p The pdeq chunk.
*/
static INLINE void free_pdeq_block (pdeq *p)
static inline void free_pdeq_block (pdeq *p)
{
#ifndef NDEBUG
p->magic = 0xbadf00d1;
......@@ -110,7 +110,7 @@ static INLINE void free_pdeq_block (pdeq *p)
*
* @return A new pdeq chunk.
*/
static INLINE pdeq *alloc_pdeq_block (void)
static inline pdeq *alloc_pdeq_block (void)
{
pdeq *p;
if (TUNE_NSAVED_PDEQS && pdeqs_cached) {
......
......@@ -126,7 +126,7 @@ MANGLEP(stats) (SET *table)
table->naccess, table->ncollision, table->nkey, table->ndups, table->max_chain_len, nfree);
}
static INLINE void
static inline void
stat_chain_len (SET *table, int chain_len)
{
table->ncollision += chain_len;
......@@ -244,7 +244,7 @@ MANGLEP(count) (SET *table)
* do one iteration step, return 1
* if still data in the set, 0 else
*/
static INLINE int
static inline int
iter_step (SET *table)
{
if (++table->iter_j >= SEGMENT_SIZE) {
......@@ -305,7 +305,7 @@ MANGLEP(break) (SET *table)
/*
* limit the hash value
*/
static INLINE unsigned
static inline unsigned
Hash (SET *table, unsigned h)
{
unsigned address;
......@@ -319,7 +319,7 @@ Hash (SET *table, unsigned h)
* returns non-zero if the number of elements in
* the set is greater then number of segments * MAX_LOAD_FACTOR
*/
static INLINE int
static inline int
loaded (SET *table)
{
return ( ++table->nkey
......
......@@ -51,9 +51,9 @@
#include "irgwalk.h"
static ir_visited_t master_cg_visited = 0;
static INLINE int cg_irg_visited (ir_graph *n);
static INLINE void mark_cg_irg_visited(ir_graph *n);
static INLINE void set_cg_irg_visited (ir_graph *n, ir_visited_t i);
static inline int cg_irg_visited (ir_graph *n);
static inline void mark_cg_irg_visited(ir_graph *n);
static inline void set_cg_irg_visited (ir_graph *n, ir_visited_t i);
/** Returns the callgraph state of the program representation. */
irp_callgraph_state get_irp_callgraph_state(void) {
......@@ -431,7 +431,7 @@ typedef struct scc_info {
/**
* allocates a new scc_info on the obstack
*/
static INLINE scc_info *new_scc_info(struct obstack *obst) {
static inline scc_info *new_scc_info(struct obstack *obst) {
scc_info *info = obstack_alloc(obst, sizeof(*info));
memset(info, 0, sizeof(*info));
return info;
......@@ -440,68 +440,68 @@ static INLINE scc_info *new_scc_info(struct obstack *obst) {
/**
* Returns non-zero if a graph was already visited.
*/
static INLINE int cg_irg_visited(ir_graph *irg) {
static inline int cg_irg_visited(ir_graph *irg) {
return irg->self_visited >= master_cg_visited;
}
/**
* Marks a graph as visited.
*/
static INLINE void mark_cg_irg_visited(ir_graph *irg) {
static inline void mark_cg_irg_visited(ir_graph *irg) {
irg->self_visited = master_cg_visited;
}
/**
* Set a graphs visited flag to i.
*/
static INLINE void set_cg_irg_visited(ir_graph *irg, ir_visited_t i) {
static inline void set_cg_irg_visited(ir_graph *irg, ir_visited_t i) {
irg->self_visited = i;
}
/**
* Returns the visited flag of a graph.
*/
static INLINE ir_visited_t get_cg_irg_visited(ir_graph *irg) {
static inline ir_visited_t get_cg_irg_visited(ir_graph *irg) {
return irg->self_visited;
}
static INLINE void mark_irg_in_stack(ir_graph *irg) {
static inline void mark_irg_in_stack(ir_graph *irg) {
scc_info *info = get_irg_link(irg);
assert(info && "missing call to init_scc()");
info->in_stack = 1;
}
static INLINE void mark_irg_not_in_stack(ir_graph *irg) {
static inline void mark_irg_not_in_stack(ir_graph *irg) {
scc_info *info = get_irg_link(irg);
assert(info && "missing call to init_scc()");
info->in_stack = 0;
}
static INLINE int irg_is_in_stack(ir_graph *irg) {
static inline int irg_is_in_stack(ir_graph *irg) {
scc_info *info = get_irg_link(irg);
assert(info && "missing call to init_scc()");
return info->in_stack;
}
static INLINE void set_irg_uplink(ir_graph *irg, int uplink) {
static inline void set_irg_uplink(ir_graph *irg, int uplink) {
scc_info *info = get_irg_link(irg);
assert(info && "missing call to init_scc()");
info->uplink = uplink;
}
static INLINE int get_irg_uplink(ir_graph *irg) {
static inline int get_irg_uplink(ir_graph *irg) {
scc_info *info = get_irg_link(irg);
assert(info && "missing call to init_scc()");
return info->uplink;
}
static INLINE void set_irg_dfn(ir_graph *irg, int dfn) {
static inline void set_irg_dfn(ir_graph *irg, int dfn) {
scc_info *info = get_irg_link(irg);
assert(info && "missing call to init_scc()");
info->dfn = dfn;
}
static INLINE int get_irg_dfn(ir_graph *irg) {
static inline int get_irg_dfn(ir_graph *irg) {
scc_info *info = get_irg_link(irg);
assert(info && "missing call to init_scc()");
return info->dfn;
......@@ -517,7 +517,7 @@ static int tos = 0; /**< top of stack */
/**
* Initialize the irg stack.
*/
static INLINE void init_stack(void) {
static inline void init_stack(void) {
if (stack) {
ARR_RESIZE(ir_graph *, stack, 1000);
} else {
......@@ -530,7 +530,7 @@ static INLINE void init_stack(void) {
* push a graph on the irg stack
* @param n the graph to be pushed
*/
static INLINE void push(ir_graph *irg) {
static inline void push(ir_graph *irg) {
if (tos == ARR_LEN(stack)) {
int nlen = ARR_LEN(stack) * 2;
ARR_RESIZE(ir_node *, stack, nlen);
......@@ -542,7 +542,7 @@ static INLINE void push(ir_graph *irg) {
/**
* return the topmost graph on the stack and pop it
*/
static INLINE ir_graph *pop(void) {
static inline ir_graph *pop(void) {
ir_graph *irg = stack[--tos];
mark_irg_not_in_stack(irg);
return irg;
......@@ -552,7 +552,7 @@ static INLINE ir_graph *pop(void) {
* The nodes up to irg belong to the current loop.
* Removes them from the stack and adds them to the current loop.
*/
static INLINE void pop_scc_to_loop(ir_graph *irg) {
static inline void pop_scc_to_loop(ir_graph *irg) {
ir_graph *m;
do {
......@@ -594,7 +594,7 @@ static void close_loop(ir_loop *l) {
* Removes and unmarks all nodes up to n from the stack.
* The nodes must be visited once more to assign them to a scc.
*/
static INLINE void pop_scc_unmark_visit(ir_graph *n) {
static inline void pop_scc_unmark_visit(ir_graph *n) {
ir_graph *m = NULL;
while (m != n) {
......
......@@ -76,7 +76,7 @@ static struct _dfs_node_t *_dfs_get_node(const struct _dfs_t *self, const void *
#define _dfs_int_is_ancestor(n, m) ((m)->pre_num >= (n)->pre_num && (m)->pre_num <= (n)->max_pre_num)
static INLINE int _dfs_is_ancestor(const struct _dfs_t *dfs, const void *a, const void *b)
static inline int _dfs_is_ancestor(const struct _dfs_t *dfs, const void *a, const void *b)
{
struct _dfs_node_t *n = _dfs_get_node(dfs, a);
struct _dfs_node_t *m = _dfs_get_node(dfs, b);
......
......@@ -65,11 +65,11 @@ static int exec_freq_cmp(const void *e1, const void *e2, size_t size) {
return (ef1->reg != ef2->reg);
}
static INLINE unsigned int exec_freq_hash(reg_exec_freq *e) {
static inline unsigned int exec_freq_hash(reg_exec_freq *e) {
return HASH_PTR(e->reg);
}
static INLINE void set_region_exec_freq(void *reg, double freq) {
static inline void set_region_exec_freq(void *reg, double freq) {
reg_exec_freq ef;
ef.reg = reg;
ef.freq = freq;
......@@ -295,7 +295,7 @@ int is_fragile_Proj(ir_node *n) {
static double exception_prob = 0.001;
static INLINE int is_loop_head(ir_node *cond)
static inline int is_loop_head(ir_node *cond)
{
(void) cond;
return 0;
......@@ -305,7 +305,7 @@ static INLINE int is_loop_head(ir_node *cond)
*
* Given all outs of the predecessor region, we can compute the weight of
* this single edge. */
static INLINE double get_weighted_region_exec_freq(void *reg, int pos) {
static inline double get_weighted_region_exec_freq(void *reg, int pos) {
void *pred_reg = get_region_in(reg, pos);
double res, full_freq = get_region_exec_freq (pred_reg);
int n_outs = get_region_n_outs (pred_reg);
......@@ -332,7 +332,7 @@ static INLINE double get_weighted_region_exec_freq(void *reg, int pos) {
return res;
}
static INLINE void compute_region_freqency(void *reg, double head_weight) {
static inline void compute_region_freqency(void *reg, double head_weight) {
int i, n_ins = get_region_n_ins(reg);
double my_freq = 0;
......
......@@ -68,11 +68,11 @@ int region_attr_cmp(const void *e1, const void *e2, size_t size) {
return (ra1->reg != ra2->reg);
}
static INLINE int attr_set_hash(region_attr *a) {
static inline int attr_set_hash(region_attr *a) {
return HASH_PTR(a->reg);
}
static INLINE region_attr *get_region_attr(void *region) {
static inline region_attr *get_region_attr(void *region) {
region_attr r_attr, *res;
r_attr.reg = region;
......@@ -128,7 +128,7 @@ void add_loop_cfop (void *region, void *cfop) {
ARR_APP1(void *, get_region_attr(region)->op_array, cfop);
}
static INLINE void exc_outs(void *reg, ir_node *cfop) {
static inline void exc_outs(void *reg, ir_node *cfop) {
if (is_fragile_op(cfop) || (is_fragile_Proj(cfop)))
inc_region_n_exc_outs(reg);
}
......
......@@ -78,7 +78,7 @@ typedef struct scc_info {
} scc_info;
/** Allocate a new scc_info on the given obstack */
static INLINE scc_info *new_scc_info(struct obstack *obst) {
static inline scc_info *new_scc_info(struct obstack *obst) {
scc_info *info = obstack_alloc(obst, sizeof(*info));
memset(info, 0, sizeof(*info));
return info;
......@@ -87,7 +87,7 @@ static INLINE scc_info *new_scc_info(struct obstack *obst) {
/**
* Marks the node n to be on the stack.
*/
static INLINE void mark_irn_in_stack(ir_node *n) {
static inline void mark_irn_in_stack(ir_node *n) {
scc_info *info = get_irn_link(n);
info->in_stack = 1;
}
......@@ -95,7 +95,7 @@ static INLINE void mark_irn_in_stack(ir_node *n) {
/**
* Marks the node n to be not on the stack.
*/
static INLINE void mark_irn_not_in_stack(ir_node *n) {
static inline void mark_irn_not_in_stack(ir_node *n) {
scc_info *info = get_irn_link(n);
info->in_stack = 0;
}
......@@ -103,7 +103,7 @@ static INLINE void mark_irn_not_in_stack(ir_node *n) {
/**
* Returns whether node n is on the stack.
*/
static INLINE int irn_is_in_stack(ir_node *n) {
static inline int irn_is_in_stack(ir_node *n) {
scc_info *info = get_irn_link(n);
return info->in_stack;
}
......@@ -111,7 +111,7 @@ static INLINE int irn_is_in_stack(ir_node *n) {
/**
* Sets node n uplink value.
*/
static INLINE void set_irn_uplink(ir_node *n, int uplink) {
static inline void set_irn_uplink(ir_node *n, int uplink) {
scc_info *info = get_irn_link(n);
info->uplink = uplink;
}
......@@ -119,7 +119,7 @@ static INLINE void set_irn_uplink(ir_node *n, int uplink) {
/**
* Return node n uplink value.
*/
static INLINE int get_irn_uplink(ir_node *n) {
static inline int get_irn_uplink(ir_node *n) {
scc_info *info = get_irn_link(n);
return info->uplink;
}
......@@ -127,7 +127,7 @@ static INLINE int get_irn_uplink(ir_node *n) {
/**
* Sets node n dfn value.
*/
static INLINE void set_irn_dfn(ir_node *n, int dfn) {
static inline void set_irn_dfn(ir_node *n, int dfn) {
scc_info *info = get_irn_link(n);
info->dfn = dfn;
}
......@@ -135,7 +135,7 @@ static INLINE void set_irn_dfn(ir_node *n, int dfn) {
/**
* Returns node n dfn value.
*/
static INLINE int get_irn_dfn(ir_node *n) {
static inline int get_irn_dfn(ir_node *n) {
scc_info *info = get_irn_link(n);
return info->dfn;
}
......@@ -152,7 +152,7 @@ static int tos = 0;
/**
* Initializes the IR-node stack
*/
static INLINE void init_stack(void) {
static inline void init_stack(void) {
if (stack) {
ARR_RESIZE(ir_node *, stack, 1000);
} else {
......@@ -170,7 +170,7 @@ static void finish_stack(void)
/**
* Push a node n onto the IR-node stack.
*/
static INLINE void push(ir_node *n) {
static inline void push(ir_node *n) {
if (tos == ARR_LEN(stack)) {
int nlen = ARR_LEN(stack) * 2;
ARR_RESIZE(ir_node *, stack, nlen);
......@@ -182,7 +182,7 @@ static INLINE void push(ir_node *n) {
/**
* Pop a node from the IR-node stack and return it.
*/
static INLINE ir_node *pop(void) {
static inline ir_node *pop(void) {
ir_node *n = stack[--tos];
mark_irn_not_in_stack(n);
return n;
......@@ -192,7 +192,7 @@ static INLINE ir_node *pop(void) {
* The nodes from tos up to n belong to the current loop.
* Removes them from the stack and adds them to the current loop.
*/
static INLINE void pop_scc_to_loop(ir_node *n) {
static inline void pop_scc_to_loop(ir_node *n) {
ir_node *m;
do {
......@@ -237,7 +237,7 @@ static void close_loop(ir_loop *l) {
* Removes and unmarks all nodes up to n from the stack.
* The nodes must be visited once more to assign them to a scc.
*/
static INLINE void pop_scc_unmark_visit(ir_node *n) {
static inline void pop_scc_unmark_visit(ir_node *n) {
ir_node *m;
do {
......@@ -275,7 +275,7 @@ static ir_loop *new_loop(void) {
* Clear the backedges for all nodes.
* Called from a walker.
*/
static INLINE void init_node(ir_node *n, void *env) {
static inline void init_node(ir_node *n, void *env) {
struct obstack *obst = env;
if (is_Block(n))
set_irn_link(n, new_scc_info(obst));
......@@ -285,7 +285,7 @@ static INLINE void init_node(ir_node *n, void *env) {
/**
* Initializes the common global settings for the scc algorithm
*/
static INLINE void init_scc_common(void) {
static inline void init_scc_common(void) {
current_dfn = 1;
loop_node_cnt = 0;
init_stack();
......@@ -295,12 +295,12 @@ static INLINE void init_scc_common(void) {
* Initializes the scc algorithm for the intraprocedural case.
* Add scc info to every block node.
*/
static INLINE void init_scc(ir_graph *irg, struct obstack *obst) {
static inline void init_scc(ir_graph *irg, struct obstack *obst) {
init_scc_common();
irg_walk_graph(irg, init_node, NULL, obst);
}
static INLINE void finish_scc(void)
static inline void finish_scc(void)
{
finish_stack();
}
......@@ -309,7 +309,7 @@ static INLINE void finish_scc(void)
/**
* Initializes the scc algorithm for the interprocedural case.
*/
static INLINE void init_ip_scc(struct obstack *obst) {
static inline void init_ip_scc(struct obstack *obst) {
init_scc_common();
cg_walk(init_node, NULL, obst);
......@@ -519,7 +519,7 @@ static ir_node *find_tail(ir_node *n) {
/**
* returns non.zero if l is the outermost loop.
*/
INLINE static int is_outermost_loop(ir_loop *l) {
inline static int is_outermost_loop(ir_loop *l) {
return l == get_loop_outer_loop(l);
}
......
......@@ -577,14 +577,14 @@ static void dom_compress(tmp_dom_info *v) {
* if V is a root, return v, else return the vertex u, not being the
* root, with minimum u->semi on the path from v to its root.
*/
INLINE static tmp_dom_info *dom_eval(tmp_dom_info *v) {
inline static tmp_dom_info *dom_eval(tmp_dom_info *v) {
if (!v->ancestor) return v;
dom_compress (v);
return v->label;
}
/** make V W's ancestor */
INLINE static void dom_link(tmp_dom_info *v, tmp_dom_info *w) {
inline static void dom_link(tmp_dom_info *v, tmp_dom_info *w) {
w->ancestor = v;
}
......
......@@ -45,7 +45,7 @@ struct _ir_extblk {
* Checks whether a pointer points to a extended basic block.
* Intern version for libFirm.
*/
static INLINE int
static inline int
_is_ir_extbb (const void *thing) {
return (get_kind(thing) == k_ir_extblk);
}
......@@ -54,7 +54,7 @@ _is_ir_extbb (const void *thing) {
* Gets the visited counter of an extended block.
* Internal version for libFirm.
*/
static INLINE ir_visited_t
static inline ir_visited_t
_get_extbb_visited(const ir_extblk *blk) {
assert(blk);
return blk->visited;
......@@ -64,7 +64,7 @@ _get_extbb_visited(const ir_extblk *blk) {
* Sets the visited counter of an extended block.
* Internal version for libFirm.
*/
static INLINE void
static inline void
_set_extbb_visited(ir_extblk *blk, ir_visited_t visited) {
assert(blk);
blk->visited = visited;
......@@ -74,7 +74,7 @@ _set_extbb_visited(ir_extblk *blk, ir_visited_t visited) {
* Mark an extended block as visited in a graph.
* Internal version for libFirm.
*/
static INLINE void
static inline void
_mark_extbb_visited(ir_extblk *blk) {
assert(blk);
blk->visited = current_ir_graph->block_visited;
......@@ -84,7 +84,7 @@ _mark_extbb_visited(ir_extblk *blk) {
* Returns non-zero if an extended was visited.
* Internal version for libFirm.
*/
static INLINE int
static inline int
_extbb_visited(const ir_extblk *blk) {
assert(blk);
return blk->visited >= current_ir_graph->block_visited;
......@@ -94,7 +94,7 @@ _extbb_visited(const ir_extblk *blk) {
* Returns non-zero if an extended block was NOT visited.
* Internal version for libFirm.
*/
static INLINE int
static inline int
_extbb_not_visited(const ir_extblk *blk) {
assert(blk);
return blk->visited < current_ir_graph->block_visited;
......@@ -104,7 +104,7 @@ _extbb_not_visited(const ir_extblk *blk) {
* Returns the link field of an extended block.
* Internal version for libFirm.
*/
static INLINE void *
static inline void *
_get_extbb_link(const ir_extblk *blk) {
assert(blk);
return blk->link;
......@@ -114,7 +114,7 @@ _get_extbb_link(const ir_extblk *blk) {
* Sets the link field of an extended block.
* Internal version for libFirm.
*/
static INLINE void
static inline void
_set_extbb_link(ir_extblk *blk, void *link) {
assert(blk);
blk->link = link;
......@@ -123,7 +123,7 @@ _set_extbb_link(ir_extblk *blk, void *link) {
/**
* Return the number of basis blocks of an extended block
*/
static INLINE int
static inline int
_get_extbb_n_blocks(const ir_extblk *blk) {
assert(blk);
return ARR_LEN(blk->blks);
......@@ -132,7 +132,7 @@ _get_extbb_n_blocks(const ir_extblk *blk) {
/**
* Return the i'th basis block of an extended block
*/
static INLINE ir_node *
static inline ir_node *
_get_extbb_block(ir_extblk *blk, int pos)
{
assert(blk && 0 <= pos && pos < _get_extbb_n_blocks(blk));
......@@ -142,7 +142,7 @@ _get_extbb_block(ir_extblk *blk, int pos)
/**
* Return the leader basis block of an extended block
*/
static INLINE ir_node *
static inline ir_node *
_get_extbb_leader(ir_extblk *blk)
{
return blk->blks[0];
......