* @note The differences to bsearch(3) which does not give proper insert locations
* in the case that the element is not conatined in the array.
*/
-static inline int
-ir_arr_bsearch(const void *arr, size_t elm_size, ir_arr_cmp_func_t *cmp, const void *elm)
+static inline int ir_arr_bsearch(const void *arr, size_t elm_size, ir_arr_cmp_func_t *cmp, const void *elm)
{
int hi = ARR_LEN(arr);
int lo = 0;
*
* @return the new bitset
*/
-static inline
-unsigned *rbitset_duplicate_obstack_alloc(struct obstack *obst,
- const unsigned *old_bitset,
- unsigned size)
+static inline unsigned *rbitset_duplicate_obstack_alloc(struct obstack *obst,
+ const unsigned *old_bitset, unsigned size)
{
unsigned size_bytes = BITSET_SIZE_BYTES(size);
unsigned *res = obstack_alloc(obst, size_bytes);
* @param arity The arity of the new node, <0 if can be changed dynamically.
* @param in An array of arity predecessor nodes.
*/
-ir_node *
-new_ir_node(dbg_info *db,
- ir_graph *irg,
- ir_node *block,
- ir_op *op,
- ir_mode *mode,
- int arity,
- ir_node *in[]);
+ir_node *new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op,
+ ir_mode *mode, int arity, ir_node *in[]);
/**
* Return the block the node belongs to. This is only
*
* @note See hacker's delight, page 27.
*/
-static inline
-int add_saturated(int x, int y)
+static inline int add_saturated(int x, int y)
{
int sum = x + y;
/*
* @param x A 32-bit word.
* @return The number of bits set in x.
*/
-static inline
-unsigned popcnt(unsigned x) {
+static inline unsigned popcnt(unsigned x)
+{
x -= ((x >> 1) & 0x55555555);
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
x = (x + (x >> 4)) & 0x0f0f0f0f;
* @param x The word.
* @return The number of leading (from the most significant bit) zeros.
*/
-static inline
-unsigned nlz(unsigned x) {
+static inline unsigned nlz(unsigned x)
+{
#ifdef USE_X86_ASSEMBLY
unsigned res;
if(x == 0)
* @param x The word.
* @return The number of trailing zeros.
*/
-static inline
-unsigned ntz(unsigned x) {
+static inline unsigned ntz(unsigned x)
+{
#ifdef USE_X86_ASSEMBLY
unsigned res;
if(x == 0)
* Returns the biggest power of 2 that is equal or smaller than @p x
* (see hackers delight power-of-2 boundaries, page 48)
*/
-static inline
-unsigned floor_po2(unsigned x)
+static inline unsigned floor_po2(unsigned x)
{
#ifdef USE_X86_ASSEMBLY // in this case nlz is fast
if(x == 0)
* @remark x has to be <= 0x8000000 of course
* @note see hackers delight power-of-2 boundaries, page 48
*/
-static inline
-unsigned ceil_po2(unsigned x)
+static inline unsigned ceil_po2(unsigned x)
{
if(x == 0)
return 0;
/**
* Tests whether @p x is a power of 2
*/
-static inline
-int is_po2(unsigned x)
+static inline int is_po2(unsigned x)
{
return (x & (x-1)) == 0;
}
* @note also see comments for hashset_insert()
* @internal
*/
-static inline
-InsertReturnValue insert_nogrow(HashSet *self, KeyType key)
+static inline InsertReturnValue insert_nogrow(HashSet *self, KeyType key)
{
size_t num_probes = 0;
size_t num_buckets = self->num_buckets;
* calculate shrink and enlarge limits
* @internal
*/
-static inline
-void reset_thresholds(HashSet *self)
+static inline void reset_thresholds(HashSet *self)
{
self->enlarge_threshold = (size_t) HT_OCCUPANCY_FLT(self->num_buckets);
self->shrink_threshold = (size_t) HT_EMPTY_FLT(self->num_buckets);
* contains no deleted entries and the element doesn't exist in the hashset yet.
* @internal
*/
-static
-void insert_new(HashSet *self, unsigned hash, ValueType value)
+static void insert_new(HashSet *self, unsigned hash, ValueType value)
{
size_t num_probes = 0;
size_t num_buckets = self->num_buckets;
* Resize the hashset
* @internal
*/
-static inline
-void resize(HashSet *self, size_t new_size)
+static inline void resize(HashSet *self, size_t new_size)
{
size_t num_buckets = self->num_buckets;
size_t i;
* grow the hashset if adding 1 more elements would make it too crowded
* @internal
*/
-static inline
-void maybe_grow(HashSet *self)
+static inline void maybe_grow(HashSet *self)
{
size_t resize_to;
* shrink the hashset if it is only sparsely filled
* @internal
*/
-static inline
-void maybe_shrink(HashSet *self)
+static inline void maybe_shrink(HashSet *self)
{
size_t size;
size_t resize_to;
* Initializes hashset with a specific size
* @internal
*/
-static inline
-void init_size(HashSet *self, size_t initial_size)
+static inline void init_size(HashSet *self, size_t initial_size)
{
if (initial_size < 4)
initial_size = 4;
#ifdef STATS
-void
-MANGLEP(stats) (SET *table)
+void MANGLEP(stats) (SET *table)
{
int nfree = 0;
#ifdef PSET
table->naccess, table->ncollision, table->nkey, table->ndups, table->max_chain_len, nfree);
}
-static inline void
-stat_chain_len (SET *table, int chain_len)
+static inline void stat_chain_len(SET *table, int chain_len)
{
table->ncollision += chain_len;
if (table->max_chain_len < chain_len) table->max_chain_len = chain_len;
const char *MANGLEP(tag);
-void
-MANGLEP(describe) (SET *table)
+void MANGLEP(describe) (SET *table)
{
unsigned i, j, collide;
Element *ptr;
#endif /* !DEBUG */
-SET *
-(PMANGLE(new)) (MANGLEP(cmp_fun) cmp, int nslots)
+SET *(PMANGLE(new)) (MANGLEP(cmp_fun) cmp, int nslots)
{
int i;
SET *table = XMALLOC(SET);
}
-void
-PMANGLE(del) (SET *table)
+void PMANGLE(del) (SET *table)
{
#ifdef DEBUG
MANGLEP(tag) = table->tag;
xfree (table);
}
-int
-MANGLEP(count) (SET *table)
+int MANGLEP(count) (SET *table)
{
return table->nkey;
}
* do one iteration step, return 1
* if still data in the set, 0 else
*/
-static inline int
-iter_step (SET *table)
+static inline int iter_step(SET *table)
{
if (++table->iter_j >= SEGMENT_SIZE) {
table->iter_j = 0;
/*
* finds the first entry in the table
*/
-void *
-MANGLEP(first) (SET *table)
+void * MANGLEP(first) (SET *table)
{
assert (!table->iter_tail);
table->iter_i = 0;
/*
* returns next entry in the table
*/
-void *
-MANGLEP(next) (SET *table)
+void *MANGLEP(next) (SET *table)
{
if (!table->iter_tail)
return NULL;
return table->iter_tail->entry.dptr;
}
-void
-MANGLEP(break) (SET *table)
+void MANGLEP(break) (SET *table)
{
table->iter_tail = NULL;
}
/*
* limit the hash value
*/
-static inline unsigned
-Hash (SET *table, unsigned h)
+static inline unsigned Hash(SET *table, unsigned h)
{
unsigned address;
address = h & (table->maxp - 1); /* h % table->maxp */
* returns non-zero if the number of elements in
* the set is greater then number of segments * MAX_LOAD_FACTOR
*/
-static inline int
-loaded (SET *table)
+static inline int loaded(SET *table)
{
return ( ++table->nkey
> (table->nseg << SEGMENT_SIZE_SHIFT) * MAX_LOAD_FACTOR);
* after all segments were split, table->p is set to zero and
* table->maxp is duplicated.
*/
-static void
-expand_table (SET *table)
+static void expand_table(SET *table)
{
unsigned NewAddress;
int OldSegmentIndex, NewSegmentIndex;
}
-void *
-MANGLE(_,_search) (SET *table,
+void * MANGLE(_,_search) (SET *table,
const void *key,
#ifndef PSET
size_t size,
return x != y;
}
-void *
-pset_remove (SET *table, const void *key, unsigned hash)
+void *pset_remove(SET *table, const void *key, unsigned hash)
{
unsigned h;
Segment *CurrentSegment;
}
-void *
-(pset_find) (SET *se, const void *key, unsigned hash)
+void *(pset_find) (SET *se, const void *key, unsigned hash)
{
return pset_find (se, key, hash);
}
-void *
-(pset_insert) (SET *se, const void *key, unsigned hash)
+void *(pset_insert) (SET *se, const void *key, unsigned hash)
{
return pset_insert (se, key, hash);
}
#else /* !PSET */
-void *
-(set_find) (set *se, const void *key, size_t size, unsigned hash)
+void *(set_find) (set *se, const void *key, size_t size, unsigned hash)
{
return set_find (se, key, size, hash);
}
-void *
-(set_insert) (set *se, const void *key, size_t size, unsigned hash)
+void *(set_insert) (set *se, const void *key, size_t size, unsigned hash)
{
return set_insert (se, key, size, hash);
}
-set_entry *
-(set_hinsert) (set *se, const void *key, size_t size, unsigned hash)
+set_entry *(set_hinsert) (set *se, const void *key, size_t size, unsigned hash)
{
return set_hinsert (se, key, size, hash);
}
unsigned infeasible : 1;
};
-static int
-cmp_freq(const void *a, const void *b, size_t size)
+static int cmp_freq(const void *a, const void *b, size_t size)
{
const freq_t *p = a;
const freq_t *q = b;
return !(p->irn == q->irn);
}
-static freq_t *
-set_find_freq(set * set, const ir_node * irn)
+static freq_t *set_find_freq(set *set, const ir_node *irn)
{
freq_t query;
return set_find(set, &query, sizeof(query), HASH_PTR(irn));
}
-static freq_t *
-set_insert_freq(set * set, const ir_node * irn)
+static freq_t *set_insert_freq(set *set, const ir_node *irn)
{
freq_t query;
return set_insert(set, &query, sizeof(query), HASH_PTR(irn));
}
-double
-get_block_execfreq(const ir_exec_freq *ef, const ir_node * irn)
+double get_block_execfreq(const ir_exec_freq *ef, const ir_node *irn)
{
if (!ef->infeasible) {
set *freqs = ef->set;
return res;
}
-static double *
-solve_lgs(gs_matrix_t *mat, double *x, int size)
+static double *solve_lgs(gs_matrix_t *mat, double *x, int size)
{
double init = 1.0 / size;
double dev;
/*
* Determine probability that predecessor pos takes this cf edge.
*/
-static double
-get_cf_probability(ir_node *bb, int pos, double loop_weight)
+static double get_cf_probability(ir_node *bb, int pos, double loop_weight)
{
double sum = 0.0;
double cur = 1.0;
set_insert_freq(freqs, bl);
}
-ir_exec_freq *
-compute_execfreq(ir_graph * irg, double loop_weight)
+ir_exec_freq *compute_execfreq(ir_graph *irg, double loop_weight)
{
gs_matrix_t *mat;
int size;
return ef;
}
-void
-free_execfreq(ir_exec_freq *ef)
+void free_execfreq(ir_exec_freq *ef)
{
del_set(ef->set);
unregister_hook(hook_node_info, &ef->hook);
/* A walker that only visits the nodes we want to see. */
-static void
-my_irg_walk_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env)
+static void my_irg_walk_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env)
{
int i;
set_irn_visited(node, current_ir_graph->visited);
* Checks whether a pointer points to a extended basic block.
* Intern version for libFirm.
*/
-static inline int
-_is_ir_extbb(const void *thing) {
+static inline int _is_ir_extbb(const void *thing)
+{
return (get_kind(thing) == k_ir_extblk);
}
* Gets the visited counter of an extended block.
* Internal version for libFirm.
*/
-static inline ir_visited_t
-_get_extbb_visited(const ir_extblk *blk) {
+static inline ir_visited_t _get_extbb_visited(const ir_extblk *blk)
+{
assert(blk);
return blk->visited;
}
* Sets the visited counter of an extended block.
* Internal version for libFirm.
*/
-static inline void
-_set_extbb_visited(ir_extblk *blk, ir_visited_t visited) {
+static inline void _set_extbb_visited(ir_extblk *blk, ir_visited_t visited)
+{
assert(blk);
blk->visited = visited;
}
* Mark an extended block as visited in a graph.
* Internal version for libFirm.
*/
-static inline void
-_mark_extbb_visited(ir_extblk *blk) {
+static inline void _mark_extbb_visited(ir_extblk *blk)
+{
assert(blk);
blk->visited = current_ir_graph->block_visited;
}
* Returns non-zero if an extended was visited.
* Internal version for libFirm.
*/
-static inline int
-_extbb_visited(const ir_extblk *blk) {
+static inline int _extbb_visited(const ir_extblk *blk)
+{
assert(blk);
return blk->visited >= current_ir_graph->block_visited;
}
* Returns non-zero if an extended block was NOT visited.
* Internal version for libFirm.
*/
-static inline int
-_extbb_not_visited(const ir_extblk *blk) {
+static inline int _extbb_not_visited(const ir_extblk *blk)
+{
assert(blk);
return blk->visited < current_ir_graph->block_visited;
}
* Returns the link field of an extended block.
* Internal version for libFirm.
*/
-static inline void *
-_get_extbb_link(const ir_extblk *blk) {
+static inline void *_get_extbb_link(const ir_extblk *blk)
+{
assert(blk);
return blk->link;
}
* Sets the link field of an extended block.
* Internal version for libFirm.
*/
-static inline void
-_set_extbb_link(ir_extblk *blk, void *link) {
+static inline void _set_extbb_link(ir_extblk *blk, void *link)
+{
assert(blk);
blk->link = link;
}
/**
* Return the number of basis blocks of an extended block
*/
-static inline int
-_get_extbb_n_blocks(const ir_extblk *blk) {
+static inline int _get_extbb_n_blocks(const ir_extblk *blk)
+{
assert(blk);
return ARR_LEN(blk->blks);
}
/**
* Return the i'th basis block of an extended block
*/
-static inline ir_node *
-_get_extbb_block(const ir_extblk *blk, int pos)
+static inline ir_node *_get_extbb_block(const ir_extblk *blk, int pos)
{
assert(blk && 0 <= pos && pos < _get_extbb_n_blocks(blk));
return blk->blks[pos];
/**
* Return the leader basis block of an extended block
*/
-static inline ir_node *
-_get_extbb_leader(const ir_extblk *blk)
+static inline ir_node *_get_extbb_leader(const ir_extblk *blk)
{
return blk->blks[0];
}
/* -------- inline functions -------- */
-static inline int
-_is_ir_loop(const void *thing) {
+static inline int _is_ir_loop(const void *thing)
+{
return get_kind(thing) == k_ir_loop;
}
-static inline void
-_set_irg_loop(ir_graph *irg, ir_loop *loop) {
+static inline void _set_irg_loop(ir_graph *irg, ir_loop *loop)
+{
assert(irg);
irg->loop = loop;
}
-static inline ir_loop *
-_get_irg_loop(const ir_graph *irg) {
+static inline ir_loop *_get_irg_loop(const ir_graph *irg)
+{
assert(irg);
return irg->loop;
}
-static inline ir_loop *
-_get_loop_outer_loop(const ir_loop *loop) {
+static inline ir_loop *_get_loop_outer_loop(const ir_loop *loop)
+{
assert(_is_ir_loop(loop));
return loop->outer_loop;
}
-static inline int
-_get_loop_depth(const ir_loop *loop) {
+static inline int _get_loop_depth(const ir_loop *loop)
+{
assert(_is_ir_loop(loop));
return loop->depth;
}
-static inline int
-_get_loop_n_sons(const ir_loop *loop) {
+static inline int _get_loop_n_sons(const ir_loop *loop)
+{
assert(_is_ir_loop(loop));
return loop->n_sons;
}
/* Uses temporary information to get the loop */
-static inline ir_loop *
-_get_irn_loop(const ir_node *n) {
+static inline ir_loop *_get_irn_loop(const ir_node *n)
+{
return n->loop;
}
}
/** Fix the state inputs of calls that still hang on unknowns */
-static
-void fix_call_state_inputs(be_abi_irg_t *env)
+static void fix_call_state_inputs(be_abi_irg_t *env)
{
const arch_env_t *arch_env = env->arch_env;
int i, n, n_states;
const arch_register_req_t *single_req;
};
-static inline const arch_register_class_t *
-_arch_register_get_class(const arch_register_t *reg)
+static inline const arch_register_class_t *_arch_register_get_class(const arch_register_t *reg)
{
return reg->reg_class;
}
-static inline
-unsigned _arch_register_get_index(const arch_register_t *reg)
+static inline unsigned _arch_register_get_index(const arch_register_t *reg)
{
return reg->index;
}
-static inline
-const char *_arch_register_get_name(const arch_register_t *reg)
+static inline const char *_arch_register_get_name(const arch_register_t *reg)
{
return reg->name;
}
/** return the register class flags */
#define arch_register_class_flags(cls) ((cls)->flags)
-static inline const arch_register_t *
-_arch_register_for_index(const arch_register_class_t *cls, unsigned idx)
+static inline const arch_register_t *_arch_register_for_index(const arch_register_class_t *cls, unsigned idx)
{
assert(idx < cls->n_regs);
return &cls->regs[idx];
return MIN(pressure, MAXPRESSURE);
}
-static void
-regpressureanawalker(ir_node *bb, void *data)
+static void regpressureanawalker(ir_node *bb, void *data)
{
regpressure_ana_t *ra = data;
pset *live = pset_new_ptr_default();
ir_node *end_state;
} block_info_t;
-static inline
-block_info_t *new_block_info(struct obstack *obst, ir_node *block)
+static inline block_info_t *new_block_info(struct obstack *obst, ir_node *block)
{
block_info_t *res = OALLOCZ(obst, block_info_t);
return res;
}
-static inline
-block_info_t *get_block_info(ir_node *block)
+static inline block_info_t *get_block_info(ir_node *block)
{
assert(irn_visited(block));
return (block_info_t*) get_irn_link(block);
}
-static inline
-spill_info_t *create_spill_info(minibelady_env_t *env, ir_node *state)
+static inline spill_info_t *create_spill_info(minibelady_env_t *env, ir_node *state)
{
spill_info_t *spill_info = OALLOCZ(&env->obst, spill_info_t);
spill_info->value = state;
return spill_info;
}
-static inline
-spill_info_t *get_spill_info(minibelady_env_t *env, const ir_node *node)
+static inline spill_info_t *get_spill_info(minibelady_env_t *env, const ir_node *node)
{
spill_info_t *spill_info
= (spill_info_t*) ir_nodemap_get(&env->spill_infos, node);
return spill_info;
}
-static
-spill_info_t *create_spill(minibelady_env_t *env, ir_node *state, int force)
+static spill_info_t *create_spill(minibelady_env_t *env, ir_node *state, int force)
{
spill_info_t *spill_info;
ir_node *next;
return spill_info;
}
-static
-void create_reload(minibelady_env_t *env, ir_node *state, ir_node *before,
- ir_node *last_state)
+static void create_reload(minibelady_env_t *env, ir_node *state,
+ ir_node *before, ir_node *last_state)
{
spill_info_t *spill_info = create_spill(env, state, 0);
ir_node *spill = spill_info->spill;
ARR_APP1(ir_node*, spill_info->reloads, reload);
}
-static
-void spill_phi(minibelady_env_t *env, ir_node *phi)
+static void spill_phi(minibelady_env_t *env, ir_node *phi)
{
ir_graph *irg = get_irn_irg(phi);
ir_node *block = get_nodes_block(phi);
}
}
-static
-void belady(minibelady_env_t *env, ir_node *block);
+static void belady(minibelady_env_t *env, ir_node *block);
/**
* Collects all values live-in at block @p block and all phi results in this
* their args to break interference and make it possible to spill them to the
* same spill slot.
*/
-static
-block_info_t *compute_block_start_state(minibelady_env_t *env, ir_node *block)
+static block_info_t *compute_block_start_state(minibelady_env_t *env, ir_node *block)
{
block_info_t *block_info;
be_next_use_t next_use;
* whether it is used from a register or is reloaded
* before the use.
*/
-static
-void belady(minibelady_env_t *env, ir_node *block)
+static void belady(minibelady_env_t *env, ir_node *block)
{
ir_node *current_state;
ir_node *node;
DBG((dbg, LEVEL_3, "End value for %+F: %+F\n", block, current_state));
}
-static
-void belady_walker(ir_node *block, void *data)
+static void belady_walker(ir_node *block, void *data)
{
belady((minibelady_env_t*) data, block);
}
-static
-ir_node *get_end_of_block_insertion_point(ir_node *block)
+static ir_node *get_end_of_block_insertion_point(ir_node *block)
{
ir_node *last = sched_last(block);
/**
* We must adapt the live-outs to the live-ins at each block-border.
*/
-static
-void fix_block_borders(ir_node *block, void *data)
+static void fix_block_borders(ir_node *block, void *data)
{
minibelady_env_t *env = data;
ir_graph *irg = get_irn_irg(block);
return 0;
}
-static inline
-unsigned get_step(const ir_node *node)
+static inline unsigned get_step(const ir_node *node)
{
return PTR_TO_INT(get_irn_link(node));
}
return get_next_use(env, from, from_step, def, skip_from_uses);
}
-static
-void set_sched_step_walker(ir_node *block, void *data)
+static void set_sched_step_walker(ir_node *block, void *data)
{
ir_node *node;
unsigned step = 0;
return result;
}
-static
-void collect(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent);
+static void collect(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent);
-static
-void be_check_entity(be_verify_spillslots_env_t *env, ir_node *node, ir_entity *ent)
+static void be_check_entity(be_verify_spillslots_env_t *env, ir_node *node, ir_entity *ent)
{
if (ent == NULL) {
ir_fprintf(stderr, "Verify warning: Node %+F in block %+F(%s) should have an entity assigned\n",
}
}
-static
-void collect_spill(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent)
+static void collect_spill(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent)
{
ir_entity *spillent = arch_get_frame_entity(node);
be_check_entity(env, node, spillent);
}
}
-static
-void rewire_fpu_mode_nodes(be_irg_t *birg)
+static void rewire_fpu_mode_nodes(be_irg_t *birg)
{
collect_fpu_mode_nodes_env_t env;
be_ssa_construction_env_t senv;
memset(info->out_infos, 0, n_res * sizeof(info->out_infos[0]));
}
-void
-init_ia32_x87_attributes(ir_node *res)
+void init_ia32_x87_attributes(ir_node *res)
{
#ifndef NDEBUG
ia32_attr_t *attr = get_ia32_attr(res);
ia32_current_cg->do_x87_sim = 1;
}
-void
-init_ia32_asm_attributes(ir_node *res)
+void init_ia32_asm_attributes(ir_node *res)
{
#ifndef NDEBUG
ia32_attr_t *attr = get_ia32_attr(res);
#endif
}
-void
-init_ia32_immediate_attributes(ir_node *res, ir_entity *symconst,
- int symconst_sign, int no_pic_adjust,
- long offset)
+void init_ia32_immediate_attributes(ir_node *res, ir_entity *symconst,
+ int symconst_sign, int no_pic_adjust,
+ long offset)
{
ia32_immediate_attr_t *attr = get_irn_generic_attr(res);
attr->call_tp = call_tp;
}
-void
-init_ia32_copyb_attributes(ir_node *res, unsigned size)
+void init_ia32_copyb_attributes(ir_node *res, unsigned size)
{
ia32_copyb_attr_t *attr = get_irn_generic_attr(res);
attr->size = size;
}
-void
-init_ia32_condcode_attributes(ir_node *res, long pnc)
+void init_ia32_condcode_attributes(ir_node *res, long pnc)
{
ia32_condcode_attr_t *attr = get_irn_generic_attr(res);
attr->pn_code = pnc;
}
-void
-init_ia32_climbframe_attributes(ir_node *res, unsigned count)
+void init_ia32_climbframe_attributes(ir_node *res, unsigned count)
{
ia32_climbframe_attr_t *attr = get_irn_generic_attr(res);
}
/** Compare nodes attributes for all "normal" nodes. */
-static
-int ia32_compare_nodes_attr(ir_node *a, ir_node *b)
+static int ia32_compare_nodes_attr(ir_node *a, ir_node *b)
{
const ia32_attr_t* attr_a = get_ia32_attr_const(a);
const ia32_attr_t* attr_b = get_ia32_attr_const(b);
}
/** Compare node attributes for nodes with condition code. */
-static
-int ia32_compare_condcode_attr(ir_node *a, ir_node *b)
+static int ia32_compare_condcode_attr(ir_node *a, ir_node *b)
{
const ia32_condcode_attr_t *attr_a;
const ia32_condcode_attr_t *attr_b;
}
/** Compare node attributes for CopyB nodes. */
-static
-int ia32_compare_copyb_attr(ir_node *a, ir_node *b)
+static int ia32_compare_copyb_attr(ir_node *a, ir_node *b)
{
const ia32_copyb_attr_t *attr_a;
const ia32_copyb_attr_t *attr_b;
/** Compare ASM node attributes. */
-static
-int ia32_compare_asm_attr(ir_node *a, ir_node *b)
+static int ia32_compare_asm_attr(ir_node *a, ir_node *b)
{
const ia32_asm_attr_t *attr_a;
const ia32_asm_attr_t *attr_b;
}
/** Compare node attributes for Immediates. */
-static
-int ia32_compare_immediate_attr(ir_node *a, ir_node *b)
+static int ia32_compare_immediate_attr(ir_node *a, ir_node *b)
{
const ia32_immediate_attr_t *attr_a = get_ia32_immediate_attr_const(a);
const ia32_immediate_attr_t *attr_b = get_ia32_immediate_attr_const(b);
}
/** Compare node attributes for x87 nodes. */
-static
-int ia32_compare_x87_attr(ir_node *a, ir_node *b)
+static int ia32_compare_x87_attr(ir_node *a, ir_node *b)
{
return ia32_compare_nodes_attr(a, b);
}
/** Compare node attributes for ClimbFrame nodes. */
-static
-int ia32_compare_climbframe_attr(ir_node *a, ir_node *b)
+static int ia32_compare_climbframe_attr(ir_node *a, ir_node *b)
{
const ia32_climbframe_attr_t *attr_a;
const ia32_climbframe_attr_t *attr_b;
/* ABI Handling */
/************************************************************************/
-static
-void mips_emit_IncSP(const ir_node *node)
+static void mips_emit_IncSP(const ir_node *node)
{
int offset = be_get_IncSP_offset(node);
#endif
-static
-int mips_to_appear_in_schedule(void *block_env, const ir_node *node)
+static int mips_to_appear_in_schedule(void *block_env, const ir_node *node)
{
(void) block_env;
}
#if 0
-static
-ir_node *gen_node_for_SwitchCond(mips_transform_env_t *env)
+static ir_node *gen_node_for_SwitchCond(mips_transform_env_t *env)
{
ir_node *selector = get_Cond_selector(env->irn);
ir_mode *selector_mode = get_irn_mode(selector);
return mflo;
}
-static
-ir_node *gen_node_for_IJmp(mips_transform_env_t *env)
+static ir_node *gen_node_for_IJmp(mips_transform_env_t *env)
{
ir_node *node = env->irn;
dbg_info *dbg = get_irn_dbg_info(node);
return new_bd_mips_jr(dbg, block, target);
}
-static
-ir_node *gen_node_for_Rot(mips_transform_env_t *env)
+static ir_node *gen_node_for_Rot(mips_transform_env_t *env)
{
ir_node *node = env->irn;
ir_node *subu, *srlv, *sllv, *or;
#include "gen_ir_cons.c.inl"
-static ir_node *
-new_bd_Start(dbg_info *db, ir_node *block)
+static ir_node *new_bd_Start(dbg_info *db, ir_node *block)
{
ir_node *res;
ir_graph *irg = current_ir_graph;
return res;
} /* new_bd_Start */
-static ir_node *
-new_bd_End(dbg_info *db, ir_node *block)
+static ir_node *new_bd_End(dbg_info *db, ir_node *block)
{
ir_node *res;
ir_graph *irg = current_ir_graph;
* Creates a Phi node with all predecessors. Calling this constructor
* is only allowed if the corresponding block is mature.
*/
-static ir_node *
-new_bd_Phi(dbg_info *db, ir_node *block, int arity, ir_node **in, ir_mode *mode)
+static ir_node *new_bd_Phi(dbg_info *db, ir_node *block, int arity, ir_node **in, ir_mode *mode)
{
ir_node *res;
ir_graph *irg = current_ir_graph;
return res;
} /* new_bd_Phi */
-static ir_node *
-new_bd_Const_type(dbg_info *db, tarval *con, ir_type *tp)
+static ir_node *new_bd_Const_type(dbg_info *db, tarval *con, ir_type *tp)
{
ir_node *res;
ir_graph *irg = current_ir_graph;
return res;
} /* new_bd_Const_type */
-static ir_node *
-new_bd_Const(dbg_info *db, tarval *con)
+static ir_node *new_bd_Const(dbg_info *db, tarval *con)
{
ir_graph *irg = current_ir_graph;
return new_rd_Const_type(db, irg, con, firm_unknown_type);
} /* new_bd_Const */
-static ir_node *
-new_bd_Const_long(dbg_info *db, ir_mode *mode, long value)
+static ir_node *new_bd_Const_long(dbg_info *db, ir_mode *mode, long value)
{
ir_graph *irg = current_ir_graph;
return new_rd_Const(db, irg, new_tarval_from_long(value, mode));
} /* new_bd_Const_long */
-static ir_node *
-new_bd_defaultProj(dbg_info *db, ir_node *block, ir_node *arg,
- long max_proj) {
+static ir_node *new_bd_defaultProj(dbg_info *db, ir_node *block, ir_node *arg,
+ long max_proj)
+{
ir_node *res;
assert(arg->op == op_Cond);
return res;
} /* new_bd_defaultProj */
-static ir_node *
-new_bd_Sel(dbg_info *db, ir_node *block, ir_node *store, ir_node *objptr,
- int arity, ir_node **in, ir_entity *ent) {
+static ir_node *new_bd_Sel(dbg_info *db, ir_node *block, ir_node *store,
+ ir_node *objptr, int arity, ir_node **in,
+ ir_entity *ent)
+{
ir_node **r_in;
ir_node *res;
int r_arity;
return res;
} /* new_bd_Sel */
-static ir_node *
-new_bd_SymConst_type(dbg_info *db, ir_node *block, ir_mode *mode,
- symconst_symbol value,symconst_kind symkind, ir_type *tp) {
+static ir_node *new_bd_SymConst_type(dbg_info *db, ir_node *block,
+ ir_mode *mode, symconst_symbol value,
+ symconst_kind symkind, ir_type *tp)
+{
ir_graph *irg = current_ir_graph;
ir_node *res = new_ir_node(db, irg, block, op_SymConst, mode, 0, NULL);
return res;
} /* new_bd_SymConst_type */
-static ir_node *
-new_bd_Sync(dbg_info *db, ir_node *block)
+static ir_node *new_bd_Sync(dbg_info *db, ir_node *block)
{
ir_node *res;
ir_graph *irg = current_ir_graph;
} /* new_bd_Sync */
-static ir_node *
-new_bd_EndReg(dbg_info *db, ir_node *block)
+static ir_node *new_bd_EndReg(dbg_info *db, ir_node *block)
{
ir_node *res;
ir_graph *irg = current_ir_graph;
return res;
} /* new_bd_EndReg */
-static ir_node *
-new_bd_EndExcept(dbg_info *db, ir_node *block)
+static ir_node *new_bd_EndExcept(dbg_info *db, ir_node *block)
{
ir_node *res;
ir_graph *irg = current_ir_graph;
return res;
} /* new_bd_EndExcept */
-static ir_node *
-new_bd_ASM(dbg_info *db, ir_node *block, int arity, ir_node *in[], ir_asm_constraint *inputs,
- int n_outs, ir_asm_constraint *outputs, int n_clobber, ident *clobber[], ident *asm_text) {
+static ir_node *new_bd_ASM(dbg_info *db, ir_node *block, int arity,
+ ir_node *in[], ir_asm_constraint *inputs, int n_outs,
+ ir_asm_constraint *outputs, int n_clobber,
+ ident *clobber[], ident *asm_text)
+{
ir_node *res;
ir_graph *irg = current_ir_graph;
/* private interfaces, for professional use only */
/* --------------------------------------------- */
-ir_node *
-new_rd_Start(dbg_info *db, ir_graph *irg, ir_node *block)
+ir_node *new_rd_Start(dbg_info *db, ir_graph *irg, ir_node *block)
{
ir_graph *rem = current_ir_graph;
ir_node *res;
return res;
} /* new_rd_Start */
-ir_node *
-new_rd_End(dbg_info *db, ir_graph *irg, ir_node *block)
+ir_node *new_rd_End(dbg_info *db, ir_graph *irg, ir_node *block)
{
ir_node *res;
ir_graph *rem = current_ir_graph;
/* Creates a Phi node with all predecessors. Calling this constructor
is only allowed if the corresponding block is mature. */
-ir_node *
-new_rd_Phi(dbg_info *db, ir_node *block, int arity, ir_node **in, ir_mode *mode)
+ir_node *new_rd_Phi(dbg_info *db, ir_node *block, int arity, ir_node **in, ir_mode *mode)
{
ir_node *res;
ir_graph *rem = current_ir_graph;
return res;
} /* new_rd_Phi */
-ir_node *
-new_rd_Const_type(dbg_info *db, ir_graph *irg, tarval *con, ir_type *tp)
+ir_node *new_rd_Const_type(dbg_info *db, ir_graph *irg, tarval *con, ir_type *tp)
{
ir_node *res;
ir_graph *rem = current_ir_graph;
return res;
} /* new_rd_Const_type */
-ir_node *
-new_rd_Const(dbg_info *db, ir_graph *irg, tarval *con)
+ir_node *new_rd_Const(dbg_info *db, ir_graph *irg, tarval *con)
{
ir_node *res;
//#ifdef USE_ORIGINAL
return res;
} /* new_rd_Const */
-ir_node *
-new_rd_Const_long(dbg_info *db, ir_graph *irg, ir_mode *mode, long value)
+ir_node *new_rd_Const_long(dbg_info *db, ir_graph *irg, ir_mode *mode, long value)
{
return new_rd_Const(db, irg, new_tarval_from_long(value, mode));
} /* new_rd_Const_long */
-ir_node *
-new_rd_defaultProj(dbg_info *db, ir_node *block, ir_node *arg, long max_proj)
+ir_node *new_rd_defaultProj(dbg_info *db, ir_node *block, ir_node *arg, long max_proj)
{
ir_node *res;
ir_graph *rem = current_ir_graph;
return res;
} /* new_rd_defaultProj */
-ir_node *
-new_rd_simpleSel(dbg_info *db, ir_node *block,
- ir_node *store, ir_node *objptr, ir_entity *ent) {
+ir_node *new_rd_simpleSel(dbg_info *db, ir_node *block, ir_node *store,
+ ir_node *objptr, ir_entity *ent)
+{
ir_node *res;
ir_graph *rem = current_ir_graph;
return res;
} /* new_rd_simpleSel */
-ir_node *
-new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_mode *mode,
- symconst_symbol value, symconst_kind symkind, ir_type *tp) {
+ir_node *new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_mode *mode,
+ symconst_symbol value, symconst_kind symkind,
+ ir_type *tp)
+{
ir_node *res;
ir_graph *rem = current_ir_graph;
ir_node *block = get_irg_start_block(irg);
return res;
} /* new_rd_SymConst_type */
-ir_node *
-new_rd_SymConst(dbg_info *db, ir_graph *irg, ir_mode *mode,
- symconst_symbol value, symconst_kind symkind) {
+ir_node *new_rd_SymConst(dbg_info *db, ir_graph *irg, ir_mode *mode,
+ symconst_symbol value, symconst_kind symkind)
+{
return new_rd_SymConst_type(db, irg, mode, value, symkind, firm_unknown_type);
} /* new_rd_SymConst */
- ir_node *new_rd_SymConst_addr_ent(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_entity *symbol, ir_type *tp) {
+ir_node *new_rd_SymConst_addr_ent(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_entity *symbol, ir_type *tp)
+{
symconst_symbol sym;
sym.entity_p = symbol;
return new_rd_SymConst_type(db, irg, mode, sym, symconst_addr_ent, tp);
return new_rd_SymConst_type(db, irg, mode, sym, symconst_type_align, tp);
} /* new_rd_SymConst_align */
-ir_node *
-new_rd_Sync(dbg_info *db, ir_node *block, int arity, ir_node *in[])
+ir_node *new_rd_Sync(dbg_info *db, ir_node *block, int arity, ir_node *in[])
{
ir_node *res;
ir_graph *rem = current_ir_graph;
return res;
} /* new_rd_Sync */
-ir_node *
-new_rd_EndReg(dbg_info *db, ir_graph *irg, ir_node *block)
+ir_node *new_rd_EndReg(dbg_info *db, ir_graph *irg, ir_node *block)
{
ir_node *res;
return res;
} /* new_rd_EndReg */
-ir_node *
-new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block)
+ir_node *new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block)
{
ir_node *res;
/** public interfaces */
/** construction tools */
-ir_node *
-new_d_Start(dbg_info *db)
+ir_node *new_d_Start(dbg_info *db)
{
ir_node *res;
return res;
} /* new_d_Start */
-ir_node *
-new_d_End(dbg_info *db)
+ir_node *new_d_End(dbg_info *db)
{
ir_node *res;
res = new_ir_node(db, current_ir_graph, current_ir_graph->current_block,
* *************************************************************************** */
/** Creates a Phi node with 0 predecessors. */
-static inline ir_node *
-new_rd_Phi0(ir_graph *irg, ir_node *block, ir_mode *mode)
+static inline ir_node *new_rd_Phi0(ir_graph *irg, ir_node *block, ir_mode *mode)
{
ir_node *res;
* @param phi0 in non-NULL: the Phi0 node in the same block that represents
* the value for which the new Phi is constructed
*/
-static inline ir_node *
-new_rd_Phi_in(ir_graph *irg, ir_node *block, ir_mode *mode,
- ir_node **in, int ins, ir_node *phi0) {
+static inline ir_node *new_rd_Phi_in(ir_graph *irg, ir_node *block,
+ ir_mode *mode, ir_node **in, int ins,
+ ir_node *phi0)
+{
int i;
ir_node *res, *known;
return res;
} /* new_rd_Phi_in */
-static ir_node *
-get_r_value_internal(ir_node *block, int pos, ir_mode *mode);
+static ir_node *get_r_value_internal(ir_node *block, int pos, ir_mode *mode);
-static ir_node *
-phi_merge(ir_node *block, int pos, ir_mode *mode, ir_node **nin, int ins);
+static ir_node *phi_merge(ir_node *block, int pos, ir_mode *mode, ir_node **nin, int ins);
/**
* Construct a new frag_array for node n.
}
} /* get_frag_arr */
-static void
-set_frag_value(ir_node **frag_arr, int pos, ir_node *val)
+static void set_frag_value(ir_node **frag_arr, int pos, ir_node *val)
{
#ifdef DEBUG_libfirm
int i;
assert(!"potential endless recursion in set_frag_value");
} /* set_frag_value */
-static ir_node *
-get_r_frag_value_internal(ir_node *block, ir_node *cfOp, int pos, ir_mode *mode)
+static ir_node *get_r_frag_value_internal(ir_node *block, ir_node *cfOp,
+ int pos, ir_mode *mode)
{
ir_node *res;
ir_node **frag_arr;
* node might optimize it away and return a real value.
* This function must be called with an in-array of proper size.
*/
-static ir_node *
-phi_merge(ir_node *block, int pos, ir_mode *mode, ir_node **nin, int ins)
+static ir_node *phi_merge(ir_node *block, int pos, ir_mode *mode, ir_node **nin, int ins)
{
ir_node *prevBlock, *res, *phi0, *phi0_all;
int i;
* @param pos the value number of the value searched
* @param mode the mode of this value (needed for Phi construction)
*/
-static ir_node *
-get_r_value_internal(ir_node *block, int pos, ir_mode *mode)
+static ir_node *get_r_value_internal(ir_node *block, int pos, ir_mode *mode)
{
ir_node *res;
/* There are 4 cases to treat.
* Finalize a Block node, when all control flows are known.
* Acceptable parameters are only Block nodes.
*/
-void
-mature_immBlock(ir_node *block)
+void mature_immBlock(ir_node *block)
{
int ins;
ir_node *n, **nin;
}
} /* mature_immBlock */
-ir_node *
-new_d_Phi(dbg_info *db, int arity, ir_node **in, ir_mode *mode)
+ir_node *new_d_Phi(dbg_info *db, int arity, ir_node **in, ir_mode *mode)
{
return new_bd_Phi(db, current_ir_graph->current_block, arity, in, mode);
} /* new_d_Phi */
-ir_node *
-new_d_Const(dbg_info *db, tarval *con)
+ir_node *new_d_Const(dbg_info *db, tarval *con)
{
return new_bd_Const(db, con);
} /* new_d_Const */
-ir_node *
-new_d_Const_long(dbg_info *db, ir_mode *mode, long value)
+ir_node *new_d_Const_long(dbg_info *db, ir_mode *mode, long value)
{
return new_bd_Const_long(db, mode, value);
} /* new_d_Const_long */
-ir_node *
-new_d_Const_type(dbg_info *db, tarval *con, ir_type *tp)
+ir_node *new_d_Const_type(dbg_info *db, tarval *con, ir_type *tp)
{
return new_bd_Const_type(db, con, tp);
} /* new_d_Const_type */
-ir_node *
-new_d_defaultProj(dbg_info *db, ir_node *arg, long max_proj)
+ir_node *new_d_defaultProj(dbg_info *db, ir_node *arg, long max_proj)
{
ir_node *res;
assert(arg->op == op_Cond);
}
} /* firm_alloc_frag_arr */
-ir_node *
-new_d_simpleSel(dbg_info *db, ir_node *store, ir_node *objptr, ir_entity *ent)
+ir_node *new_d_simpleSel(dbg_info *db, ir_node *store, ir_node *objptr, ir_entity *ent)
/* GL: objptr was called frame before. Frame was a bad choice for the name
as the operand could as well be a pointer to a dynamic object. */
{
store, objptr, 0, NULL, ent);
} /* new_d_simpleSel */
-ir_node *
-new_d_SymConst_type(dbg_info *db, ir_mode *mode, symconst_symbol value, symconst_kind kind, ir_type *tp)
+ir_node *new_d_SymConst_type(dbg_info *db, ir_mode *mode, symconst_symbol value, symconst_kind kind, ir_type *tp)
{
return new_bd_SymConst_type(db, get_irg_start_block(current_ir_graph), mode,
value, kind, tp);
} /* new_d_SymConst_type */
-ir_node *
-new_d_SymConst(dbg_info *db, ir_mode *mode, symconst_symbol value, symconst_kind kind)
+ir_node *new_d_SymConst(dbg_info *db, ir_mode *mode, symconst_symbol value, symconst_kind kind)
{
return new_bd_SymConst_type(db, get_irg_start_block(current_ir_graph), mode,
value, kind, firm_unknown_type);
} /* new_d_SymConst */
-ir_node *
-new_d_Sync(dbg_info *db, int arity, ir_node *in[])
+ir_node *new_d_Sync(dbg_info *db, int arity, ir_node *in[])
{
return new_rd_Sync(db, current_ir_graph->current_block, arity, in);
} /* new_d_Sync */
-ir_node *
-new_d_EndReg(dbg_info *db)
+ir_node *new_d_EndReg(dbg_info *db)
{
return new_bd_EndReg(db, current_ir_graph->current_block);
} /* new_d_EndReg */
-ir_node *
-new_d_EndExcept(dbg_info *db)
+ir_node *new_d_EndExcept(dbg_info *db)
{
return new_bd_EndExcept(db, current_ir_graph->current_block);
} /* new_d_EndExcept */
-ir_node *
-new_d_ASM(dbg_info *db, int arity, ir_node *in[], ir_asm_constraint *inputs,
- int n_outs, ir_asm_constraint *outputs,
- int n_clobber, ident *clobber[], ident *asm_text) {
+ir_node *new_d_ASM(dbg_info *db, int arity, ir_node *in[], ir_asm_constraint *inputs,
+ int n_outs, ir_asm_constraint *outputs, int n_clobber,
+ ident *clobber[], ident *asm_text)
+{
return new_bd_ASM(db, current_ir_graph->current_block, arity, in, inputs, n_outs, outputs, n_clobber, clobber, asm_text);
} /* new_d_ASM */
/* Block construction */
/* immature Block without predecessors */
-ir_node *
-new_d_immBlock(dbg_info *db)
+ir_node *new_d_immBlock(dbg_info *db)
{
ir_node *res;
return res;
} /* new_d_immBlock */
-ir_node *
-new_immBlock(void)
+ir_node *new_immBlock(void)
{
return new_d_immBlock(NULL);
} /* new_immBlock */
/* immature PartBlock with its predecessors */
-ir_node *
-new_d_immPartBlock(dbg_info *db, ir_node *pred_jmp)
+ir_node *new_d_immPartBlock(dbg_info *db, ir_node *pred_jmp)
{
ir_node *res = new_d_immBlock(db);
ir_node *blk = get_nodes_block(pred_jmp);
return res;
} /* new_d_immPartBlock */
-ir_node *
-new_immPartBlock(ir_node *pred_jmp)
+ir_node *new_immPartBlock(ir_node *pred_jmp)
{
return new_d_immPartBlock(NULL, pred_jmp);
} /* new_immPartBlock */
/* add an edge to a jmp/control flow node */
-void
-add_immBlock_pred(ir_node *block, ir_node *jmp)
+void add_immBlock_pred(ir_node *block, ir_node *jmp)
{
int n = ARR_LEN(block->in) - 1;
} /* add_immBlock_pred */
/* changing the current block */
-void
-set_cur_block(ir_node *target)
+void set_cur_block(ir_node *target)
{
current_ir_graph->current_block = target;
} /* set_cur_block */
/* parameter administration */
/* get a value from the parameter array from the current block by its index */
-ir_node *
-get_d_value(dbg_info *db, int pos, ir_mode *mode)
+ir_node *get_d_value(dbg_info *db, int pos, ir_mode *mode)
{
ir_graph *irg = current_ir_graph;
assert(get_irg_phase_state(irg) == phase_building);
} /* get_d_value */
/* get a value from the parameter array from the current block by its index */
-ir_node *
-get_value(int pos, ir_mode *mode)
+ir_node *get_value(int pos, ir_mode *mode)
{
return get_d_value(NULL, pos, mode);
} /* get_value */
/* set a value at position pos in the parameter array from the current block */
-void
-set_value(int pos, ir_node *value)
+void set_value(int pos, ir_node *value)
{
ir_graph *irg = current_ir_graph;
assert(get_irg_phase_state(irg) == phase_building);
} /* set_value */
/* Find the value number for a node in the current block.*/
-int
-find_value(ir_node *value)
+int find_value(ir_node *value)
{
int i;
ir_node *bl = current_ir_graph->current_block;
} /* find_value */
/* get the current store */
-ir_node *
-get_store(void)
+ir_node *get_store(void)
{
ir_graph *irg = current_ir_graph;
} /* get_store */
/* set the current store: handles automatic Sync construction for Load nodes */
-void
-set_store(ir_node *store)
+void set_store(ir_node *store)
{
ir_node *load, *pload, *pred, *in[2];
current_ir_graph->current_block->attr.block.graph_arr[0] = store;
} /* set_store */
-void
-keep_alive(ir_node *ka)
+void keep_alive(ir_node *ka)
{
add_End_keepalive(get_irg_end(current_ir_graph), ka);
} /* keep_alive */
/* initialize */
/* call once for each run of the library */
-void
-firm_init_cons(uninitialized_local_variable_func_t *func)
+void firm_init_cons(uninitialized_local_variable_func_t *func)
{
default_initialize_local_variable = func;
} /* firm_init_cons */
-void
-irp_finalize_cons(void)
+void irp_finalize_cons(void)
{
int i;
for (i = get_irp_n_irgs() - 1; i >= 0; --i) {
/**
* Dump additional node attributes of some nodes to a file F.
*/
-static int
-dump_node_nodeattr(FILE *F, ir_node *n)
+static int dump_node_nodeattr(FILE *F, ir_node *n)
{
int bad = 0;
ir_node *pred;
}
/** dump the edge to the block this node belongs to */
-static void
-dump_ir_block_edge(FILE *F, ir_node *n)
+static void dump_ir_block_edge(FILE *F, ir_node *n)
{
if (get_opt_dump_const_local() && is_constlike_node(n)) return;
if (is_no_Block(n)) {
}
}
-static void
-print_data_edge_vcgattr(FILE *F, ir_node *from, int to)
+static void print_data_edge_vcgattr(FILE *F, ir_node *from, int to)
{
/*
* do not use get_nodes_block() here, will fail
fprintf(F, INTER_DATA_EDGE_ATTR);
}
-static void
-print_mem_edge_vcgattr(FILE *F, ir_node *from, int to)
+static void print_mem_edge_vcgattr(FILE *F, ir_node *from, int to)
{
/*
* do not use get_nodes_block() here, will fail
/**
* Dump the ir_edges
*/
-static void
-dump_ir_edges(FILE *F, ir_node *n)
+static void dump_ir_edges(FILE *F, ir_node *n)
{
const ir_edge_t *edge;
int i = 0;
/** dumps a graph block-wise. Expects all blockless nodes in arr in irgs link.
* The outermost nodes: blocks and nodes not op_pin_state_pinned, Bad, Unknown. */
-static void
-dump_block_graph(FILE *F, ir_graph *irg)
+static void dump_block_graph(FILE *F, ir_graph *irg)
{
int i;
ir_graph *rem = current_ir_graph;
/** dumps a graph extended block-wise. Expects all blockless nodes in arr in irgs link.
* The outermost nodes: blocks and nodes not op_pin_state_pinned, Bad, Unknown. */
-static void
-dump_extblock_graph(FILE *F, ir_graph *irg)
+static void dump_extblock_graph(FILE *F, ir_graph *irg)
{
int i;
ir_graph *rem = current_ir_graph;
* Dumps a class type node and a superclass edge.
* If env->dump_ent dumps entities of classes and overwrites edges.
*/
-static void
-dump_class_hierarchy_node(type_or_ent tore, void *ctx)
+static void dump_class_hierarchy_node(type_or_ent tore, void *ctx)
{
h_env_t *env = ctx;
FILE *F = env->f;
/*******************************************************************/
/* dump out edges */
-static void
-dump_out_edge(ir_node *n, void *env)
+static void dump_out_edge(ir_node *n, void *env)
{
FILE *F = env;
int i;
}
}
-static inline void
-dump_loop_label(FILE *F, ir_loop *loop)
+static inline void dump_loop_label(FILE *F, ir_loop *loop)
{
fprintf(F, "loop %d, %d sons, %d nodes",
get_loop_depth(loop), get_loop_n_sons(loop), get_loop_n_nodes(loop));
fprintf(F, "\"");
}
-static inline void
-dump_loop_node(FILE *F, ir_loop *loop)
+static inline void dump_loop_node(FILE *F, ir_loop *loop)
{
fprintf(F, "node: {title: \"");
PRINT_LOOPID(loop);
fprintf(F, "}\n");
}
-static inline void
-dump_loop_node_edge(FILE *F, ir_loop *loop, int i)
+static inline void dump_loop_node_edge(FILE *F, ir_loop *loop, int i)
{
assert(loop);
fprintf(F, "edge: {sourcename: \"");
fprintf(F, "}\n");
}
-static inline void
-dump_loop_son_edge(FILE *F, ir_loop *loop, int i)
+static inline void dump_loop_son_edge(FILE *F, ir_loop *loop, int i)
{
assert(loop);
fprintf(F, "edge: {sourcename: \"");
get_loop_element_pos(loop, get_loop_son(loop, i)));
}
-static
-void dump_loops(FILE *F, ir_loop *loop)
+static void dump_loops(FILE *F, ir_loop *loop)
{
int i;
/* dump this loop node */
}
}
-static inline
-void dump_loop_nodes_into_graph(FILE *F, ir_graph *irg)
+static inline void dump_loop_nodes_into_graph(FILE *F, ir_graph *irg)
{
ir_loop *loop = get_irg_loop(irg);
/* The following routines dump a control flow graph. */
/*---------------------------------------------------------------------*/
-static void
-dump_block_to_cfg(ir_node *block, void *env)
+static void dump_block_to_cfg(ir_node *block, void *env)
{
FILE *F = env;
int i, fl = 0;
/* the following routines dumps type information without any ir nodes. */
/*---------------------------------------------------------------------*/
-void
-dump_type_graph(ir_graph *irg, const char *suffix)
+void dump_type_graph(ir_graph *irg, const char *suffix)
{
FILE *f;
}
}
-void
-dump_all_types(const char *suffix)
+void dump_all_types(const char *suffix)
{
FILE *f = vcg_open_name("All_types", suffix);
if (f != NULL) {
}
}
-void
-dump_class_hierarchy(int entities, const char *suffix)
+void dump_class_hierarchy(int entities, const char *suffix)
{
FILE *f = vcg_open_name("class_hierarchy", suffix);
/**
* dump the name of a node n to the File F.
*/
-int
-dump_node_opcode(FILE *F, ir_node *n);
+int dump_node_opcode(FILE *F, ir_node *n);
int dump_node_label(FILE *F, ir_node *n);
#undef E_FLAG
#undef R_FLAG
-static inline int _get_optimize(void) {
+static inline int _get_optimize(void)
+{
return get_opt_optimize();
}
-static inline firm_verification_t
-get_node_verification_mode(void) {
+static inline firm_verification_t get_node_verification_mode(void)
+{
return opt_do_node_verification;
}
{attr type} get_irg_{attribute name} (ir_graph *irg);
void set_irg_{attr name} (ir_graph *irg, {attr type} {attr}); */
-int
-(is_ir_graph)(const void *thing) {
+int (is_ir_graph)(const void *thing)
+{
return _is_ir_graph(thing);
}
return _get_idx_irn(irg, idx);
}
-ir_node *
-(get_irg_start_block)(const ir_graph *irg) {
+ir_node *(get_irg_start_block)(const ir_graph *irg)
+{
return _get_irg_start_block(irg);
}
-void
-(set_irg_start_block)(ir_graph *irg, ir_node *node) {
+void (set_irg_start_block)(ir_graph *irg, ir_node *node)
+{
_set_irg_start_block(irg, node);
}
-ir_node *
-(get_irg_start)(const ir_graph *irg) {
+ir_node *(get_irg_start)(const ir_graph *irg)
+{
return _get_irg_start(irg);
}
-void
-(set_irg_start)(ir_graph *irg, ir_node *node) {
+void (set_irg_start)(ir_graph *irg, ir_node *node)
+{
_set_irg_start(irg, node);
}
-ir_node *
-(get_irg_end_block)(const ir_graph *irg) {
+ir_node *(get_irg_end_block)(const ir_graph *irg)
+{
return _get_irg_end_block(irg);
}
-void
-(set_irg_end_block)(ir_graph *irg, ir_node *node) {
+void (set_irg_end_block)(ir_graph *irg, ir_node *node)
+{
_set_irg_end_block(irg, node);
}
-ir_node *
-(get_irg_end)(const ir_graph *irg) {
+ir_node *(get_irg_end)(const ir_graph *irg)
+{
return _get_irg_end(irg);
}
-void
-(set_irg_end)(ir_graph *irg, ir_node *node) {
+void (set_irg_end)(ir_graph *irg, ir_node *node)
+{
_set_irg_end(irg, node);
}
-ir_node *
-(get_irg_end_reg)(const ir_graph *irg) {
+ir_node *(get_irg_end_reg)(const ir_graph *irg)
+{
return _get_irg_end_reg(irg);
}
-void
-(set_irg_end_reg)(ir_graph *irg, ir_node *node) {
+void (set_irg_end_reg)(ir_graph *irg, ir_node *node)
+{
_set_irg_end_reg(irg, node);
}
-ir_node *
-(get_irg_end_except)(const ir_graph *irg) {
+ir_node *(get_irg_end_except)(const ir_graph *irg)
+{
return _get_irg_end_except(irg);
}
-void
-(set_irg_end_except)(ir_graph *irg, ir_node *node) {
+void (set_irg_end_except)(ir_graph *irg, ir_node *node)
+{
assert(get_irn_op(node) == op_EndExcept || is_End(node));
_set_irg_end_except(irg, node);
}
-ir_node *
-(get_irg_initial_exec)(const ir_graph *irg) {
+ir_node *(get_irg_initial_exec)(const ir_graph *irg)
+{
return _get_irg_initial_exec(irg);
}
-void
-(set_irg_initial_exec)(ir_graph *irg, ir_node *node) {
+void (set_irg_initial_exec)(ir_graph *irg, ir_node *node)
+{
_set_irg_initial_exec(irg, node);
}
-ir_node *
-(get_irg_frame)(const ir_graph *irg) {
+ir_node *(get_irg_frame)(const ir_graph *irg)
+{
return _get_irg_frame(irg);
}
-void
-(set_irg_frame)(ir_graph *irg, ir_node *node) {
+void (set_irg_frame)(ir_graph *irg, ir_node *node)
+{
_set_irg_frame(irg, node);
}
-ir_node *
-(get_irg_tls)(const ir_graph *irg) {
+ir_node *(get_irg_tls)(const ir_graph *irg)
+{
return _get_irg_tls(irg);
}
-void
-(set_irg_tls)(ir_graph *irg, ir_node *node) {
+void (set_irg_tls)(ir_graph *irg, ir_node *node)
+{
_set_irg_tls(irg, node);
}
-ir_node *
-(get_irg_initial_mem)(const ir_graph *irg) {
+ir_node *(get_irg_initial_mem)(const ir_graph *irg)
+{
return _get_irg_initial_mem(irg);
}
-void
-(set_irg_initial_mem)(ir_graph *irg, ir_node *node) {
+void (set_irg_initial_mem)(ir_graph *irg, ir_node *node)
+{
_set_irg_initial_mem(irg, node);
}
-ir_node *
-(get_irg_args)(const ir_graph *irg) {
+ir_node *(get_irg_args)(const ir_graph *irg)
+{
return _get_irg_args(irg);
}
-void
-(set_irg_args)(ir_graph *irg, ir_node *node) {
+void (set_irg_args)(ir_graph *irg, ir_node *node)
+{
_set_irg_args(irg, node);
}
-ir_node *
-(get_irg_bad)(const ir_graph *irg) {
+ir_node *(get_irg_bad)(const ir_graph *irg)
+{
return _get_irg_bad(irg);
}
-void
-(set_irg_bad)(ir_graph *irg, ir_node *node) {
+void (set_irg_bad)(ir_graph *irg, ir_node *node)
+{
_set_irg_bad(irg, node);
}
-ir_node *
-(get_irg_no_mem)(const ir_graph *irg) {
+ir_node *(get_irg_no_mem)(const ir_graph *irg)
+{
return _get_irg_no_mem(irg);
}
-void
-(set_irg_no_mem)(ir_graph *irg, ir_node *node) {
+void (set_irg_no_mem)(ir_graph *irg, ir_node *node)
+{
_set_irg_no_mem(irg, node);
}
-ir_node *
-(get_irg_current_block)(const ir_graph *irg) {
+ir_node *(get_irg_current_block)(const ir_graph *irg)
+{
return _get_irg_current_block(irg);
}
-void
-(set_irg_current_block)(ir_graph *irg, ir_node *node) {
+void (set_irg_current_block)(ir_graph *irg, ir_node *node)
+{
_set_irg_current_block(irg, node);
}
-ir_entity *
-(get_irg_entity)(const ir_graph *irg) {
+ir_entity *(get_irg_entity)(const ir_graph *irg)
+{
return _get_irg_entity(irg);
}
-void
-(set_irg_entity)(ir_graph *irg, ir_entity *ent) {
+void (set_irg_entity)(ir_graph *irg, ir_entity *ent)
+{
_set_irg_entity(irg, ent);
}
-ir_type *
-(get_irg_frame_type)(ir_graph *irg) {
+ir_type *(get_irg_frame_type)(ir_graph *irg)
+{
return _get_irg_frame_type(irg);
}
-void
-(set_irg_frame_type)(ir_graph *irg, ir_type *ftp) {
+void (set_irg_frame_type)(ir_graph *irg, ir_type *ftp)
+{
_set_irg_frame_type(irg, ftp);
}
return get_method_value_param_type(mtp);
}
-int
-get_irg_n_locs(ir_graph *irg)
+int get_irg_n_locs(ir_graph *irg)
{
if (get_opt_precise_exc_context())
return irg->n_loc - 1 - 1;
return irg->n_loc - 1;
}
-void
-set_irg_n_loc(ir_graph *irg, int n_loc)
+void set_irg_n_loc(ir_graph *irg, int n_loc)
{
if (get_opt_precise_exc_context())
irg->n_loc = n_loc + 1 + 1;
return 0;
}
-irg_phase_state
-(get_irg_phase_state)(const ir_graph *irg) {
+irg_phase_state (get_irg_phase_state)(const ir_graph *irg)
+{
return _get_irg_phase_state(irg);
}
-void
-(set_irg_phase_state)(ir_graph *irg, irg_phase_state state) {
+void (set_irg_phase_state)(ir_graph *irg, irg_phase_state state)
+{
_set_irg_phase_state(irg, state);
}
-op_pin_state
-(get_irg_pinned)(const ir_graph *irg) {
+op_pin_state (get_irg_pinned)(const ir_graph *irg)
+{
return _get_irg_pinned(irg);
}
-irg_outs_state
-(get_irg_outs_state)(const ir_graph *irg) {
+irg_outs_state (get_irg_outs_state)(const ir_graph *irg)
+{
return _get_irg_outs_state(irg);
}
-void
-(set_irg_outs_inconsistent)(ir_graph *irg) {
+void (set_irg_outs_inconsistent)(ir_graph *irg)
+{
_set_irg_outs_inconsistent(irg);
}
-irg_extblk_state
-(get_irg_extblk_state)(const ir_graph *irg) {
+irg_extblk_state (get_irg_extblk_state)(const ir_graph *irg)
+{
return _get_irg_extblk_state(irg);
}
-void
-(set_irg_extblk_inconsistent)(ir_graph *irg) {
+void (set_irg_extblk_inconsistent)(ir_graph *irg)
+{
_set_irg_extblk_inconsistent(irg);
}
-irg_dom_state
-(get_irg_dom_state)(const ir_graph *irg) {
+irg_dom_state (get_irg_dom_state)(const ir_graph *irg)
+{
return _get_irg_dom_state(irg);
}
-irg_dom_state
-(get_irg_postdom_state)(const ir_graph *irg) {
+irg_dom_state (get_irg_postdom_state)(const ir_graph *irg)
+{
return _get_irg_postdom_state(irg);
}
-void
-(set_irg_doms_inconsistent)(ir_graph *irg) {
+void (set_irg_doms_inconsistent)(ir_graph *irg)
+{
_set_irg_doms_inconsistent(irg);
}
-irg_loopinfo_state
-(get_irg_loopinfo_state)(const ir_graph *irg) {
+irg_loopinfo_state (get_irg_loopinfo_state)(const ir_graph *irg)
+{
return _get_irg_loopinfo_state(irg);
}
-void
-(set_irg_loopinfo_state)(ir_graph *irg, irg_loopinfo_state s) {
+void (set_irg_loopinfo_state)(ir_graph *irg, irg_loopinfo_state s)
+{
_set_irg_loopinfo_state(irg, s);
}
-void
-(set_irg_loopinfo_inconsistent)(ir_graph *irg) {
+void (set_irg_loopinfo_inconsistent)(ir_graph *irg)
+{
_set_irg_loopinfo_inconsistent(irg);
}
-void
-(set_irg_pinned)(ir_graph *irg, op_pin_state p) {
+void (set_irg_pinned)(ir_graph *irg, op_pin_state p)
+{
_set_irg_pinned(irg, p);
}
-irg_callee_info_state
-(get_irg_callee_info_state)(const ir_graph *irg) {
+irg_callee_info_state (get_irg_callee_info_state)(const ir_graph *irg)
+{
return _get_irg_callee_info_state(irg);
}
-void
-(set_irg_callee_info_state)(ir_graph *irg, irg_callee_info_state s) {
+void (set_irg_callee_info_state)(ir_graph *irg, irg_callee_info_state s)
+{
_set_irg_callee_info_state(irg, s);
}
-irg_inline_property
-(get_irg_inline_property)(const ir_graph *irg) {
+irg_inline_property (get_irg_inline_property)(const ir_graph *irg)
+{
return _get_irg_inline_property(irg);
}
-void
-(set_irg_inline_property)(ir_graph *irg, irg_inline_property s) {
+void (set_irg_inline_property)(ir_graph *irg, irg_inline_property s)
+{
_set_irg_inline_property(irg, s);
}
-unsigned
-(get_irg_additional_properties)(const ir_graph *irg) {
+unsigned (get_irg_additional_properties)(const ir_graph *irg)
+{
return _get_irg_additional_properties(irg);
}
-void
-(set_irg_additional_properties)(ir_graph *irg, unsigned property_mask) {
+void (set_irg_additional_properties)(ir_graph *irg, unsigned property_mask)
+{
_set_irg_additional_properties(irg, property_mask);
}
-void
-(set_irg_additional_property)(ir_graph *irg, mtp_additional_property flag) {
+void (set_irg_additional_property)(ir_graph *irg, mtp_additional_property flag)
+{
_set_irg_additional_property(irg, flag);
}
-void
-(set_irg_link)(ir_graph *irg, void *thing) {
+void (set_irg_link)(ir_graph *irg, void *thing)
+{
_set_irg_link(irg, thing);
}
-void *
-(get_irg_link)(const ir_graph *irg) {
+void *(get_irg_link)(const ir_graph *irg)
+{
return _get_irg_link(irg);
}
-ir_visited_t
-(get_irg_visited)(const ir_graph *irg) {
+ir_visited_t (get_irg_visited)(const ir_graph *irg)
+{
return _get_irg_visited(irg);
}
return ++max_irg_visited;
}
-ir_visited_t
-(get_irg_block_visited)(const ir_graph *irg) {
+ir_visited_t (get_irg_block_visited)(const ir_graph *irg)
+{
return _get_irg_block_visited(irg);
}
-void
-(set_irg_block_visited)(ir_graph *irg, ir_visited_t visited) {
+void (set_irg_block_visited)(ir_graph *irg, ir_visited_t visited)
+{
_set_irg_block_visited(irg, visited);
}
-void
-(inc_irg_block_visited)(ir_graph *irg) {
+void (inc_irg_block_visited)(ir_graph *irg)
+{
_inc_irg_block_visited(irg);
}
/* inline functions for graphs */
/*-------------------------------------------------------------------*/
-static inline int
-_is_ir_graph(const void *thing) {
+static inline int _is_ir_graph(const void *thing)
+{
return (get_kind(thing) == k_ir_graph);
}
/** Returns the start block of a graph. */
-static inline ir_node *
-_get_irg_start_block(const ir_graph *irg) {
+static inline ir_node *_get_irg_start_block(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_start_block);
}
-static inline void
-_set_irg_start_block(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_start_block(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_start_block, node);
}
-static inline ir_node *
-_get_irg_start(const ir_graph *irg) {
+static inline ir_node *_get_irg_start(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_start);
}
-static inline void
-_set_irg_start(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_start(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_start, node);
}
-static inline ir_node *
-_get_irg_end_block(const ir_graph *irg) {
+static inline ir_node *_get_irg_end_block(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_end_block);
}
-static inline void
-_set_irg_end_block(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_end_block(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, -1, node);
set_irn_n(irg->anchor, anchor_end_block, node);
}
-static inline ir_node *
-_get_irg_end(const ir_graph *irg) {
+static inline ir_node *_get_irg_end(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_end);
}
-static inline void
-_set_irg_end(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_end(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_end, node);
}
-static inline ir_node *
-_get_irg_end_reg(const ir_graph *irg) {
+static inline ir_node *_get_irg_end_reg(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_end_reg);
}
-static inline void
-_set_irg_end_reg(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_end_reg(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_end_reg, node);
}
-static inline ir_node *
-_get_irg_end_except(const ir_graph *irg) {
+static inline ir_node *_get_irg_end_except(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_end_except);
}
-static inline void
-_set_irg_end_except(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_end_except(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_end_except, node);
}
-static inline ir_node *
-_get_irg_initial_exec(const ir_graph *irg) {
+static inline ir_node *_get_irg_initial_exec(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_initial_exec);
}
-static inline void
-_set_irg_initial_exec(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_initial_exec(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_initial_exec, node);
}
-static inline ir_node *
-_get_irg_frame(const ir_graph *irg) {
+static inline ir_node *_get_irg_frame(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_frame);
}
-static inline void
-_set_irg_frame(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_frame(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_frame, node);
}
-static inline ir_node *
-_get_irg_tls(const ir_graph *irg) {
+static inline ir_node *_get_irg_tls(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_tls);
}
-static inline void
-_set_irg_tls(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_tls(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_tls, node);
}
-static inline ir_node *
-_get_irg_initial_mem(const ir_graph *irg) {
+static inline ir_node *_get_irg_initial_mem(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_initial_mem);
}
-static inline void
-_set_irg_initial_mem(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_initial_mem(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_initial_mem, node);
}
-static inline ir_node *
-_get_irg_args(const ir_graph *irg) {
+static inline ir_node *_get_irg_args(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_args);
}
-static inline void
-_set_irg_args(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_args(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_args, node);
}
-static inline ir_node *
-_get_irg_bad(const ir_graph *irg) {
+static inline ir_node *_get_irg_bad(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_bad);
}
-static inline void
-_set_irg_bad(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_bad(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_bad, node);
}
-static inline ir_node *
-_get_irg_no_mem(const ir_graph *irg) {
+static inline ir_node * _get_irg_no_mem(const ir_graph *irg)
+{
return get_irn_intra_n(irg->anchor, anchor_no_mem);
}
-static inline void
-_set_irg_no_mem(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_no_mem(ir_graph *irg, ir_node *node)
+{
set_irn_n(irg->anchor, anchor_no_mem, node);
}
-static inline ir_node *
-_get_irg_current_block(const ir_graph *irg) {
+static inline ir_node *_get_irg_current_block(const ir_graph *irg)
+{
return irg->current_block;
}
-static inline void
-_set_irg_current_block(ir_graph *irg, ir_node *node) {
+static inline void _set_irg_current_block(ir_graph *irg, ir_node *node)
+{
irg->current_block = node;
}
-static inline ir_entity *
-_get_irg_entity(const ir_graph *irg) {
+static inline ir_entity *_get_irg_entity(const ir_graph *irg)
+{
assert(irg);
return irg->ent;
}
-static inline void
-_set_irg_entity(ir_graph *irg, ir_entity *ent) {
+static inline void _set_irg_entity(ir_graph *irg, ir_entity *ent)
+{
irg->ent = ent;
}
-static inline ir_type *
-_get_irg_frame_type(ir_graph *irg) {
+static inline ir_type *_get_irg_frame_type(ir_graph *irg)
+{
assert(irg->frame_type);
return irg->frame_type;
}
-static inline void
-_set_irg_frame_type(ir_graph *irg, ir_type *ftp) {
+static inline void _set_irg_frame_type(ir_graph *irg, ir_type *ftp)
+{
assert(is_frame_type(ftp));
irg->frame_type = ftp;
}
-static inline struct obstack *
-_get_irg_obstack(const ir_graph *irg) {
+static inline struct obstack *_get_irg_obstack(const ir_graph *irg)
+{
return irg->obst;
}
-static inline irg_phase_state
-_get_irg_phase_state(const ir_graph *irg) {
+static inline irg_phase_state _get_irg_phase_state(const ir_graph *irg)
+{
return irg->phase_state;
}
-static inline void
-_set_irg_phase_state(ir_graph *irg, irg_phase_state state) {
+static inline void _set_irg_phase_state(ir_graph *irg, irg_phase_state state)
+{
irg->phase_state = state;
}
-static inline op_pin_state
-_get_irg_pinned(const ir_graph *irg) {
+static inline op_pin_state _get_irg_pinned(const ir_graph *irg)
+{
return irg->irg_pinned_state;
}
-static inline irg_outs_state
-_get_irg_outs_state(const ir_graph *irg) {
+static inline irg_outs_state _get_irg_outs_state(const ir_graph *irg)
+{
return irg->outs_state;
}
-static inline void
-_set_irg_outs_inconsistent(ir_graph *irg) {
+static inline void _set_irg_outs_inconsistent(ir_graph *irg)
+{
if (irg->outs_state == outs_consistent)
irg->outs_state = outs_inconsistent;
}
-static inline irg_extblk_state
-_get_irg_extblk_state(const ir_graph *irg) {
+static inline irg_extblk_state _get_irg_extblk_state(const ir_graph *irg)
+{
return irg->extblk_state;
}
-static inline void
-_set_irg_extblk_inconsistent(ir_graph *irg) {
+static inline void _set_irg_extblk_inconsistent(ir_graph *irg)
+{
if (irg->extblk_state == extblk_valid)
irg->extblk_state = extblk_invalid;
}
-static inline irg_dom_state
-_get_irg_dom_state(const ir_graph *irg) {
+static inline irg_dom_state _get_irg_dom_state(const ir_graph *irg)
+{
return irg->dom_state;
}
-static inline irg_dom_state
-_get_irg_postdom_state(const ir_graph *irg) {
+static inline irg_dom_state _get_irg_postdom_state(const ir_graph *irg)
+{
return irg->pdom_state;
}
-static inline void
-_set_irg_doms_inconsistent(ir_graph *irg) {
+static inline void _set_irg_doms_inconsistent(ir_graph *irg)
+{
if (irg->dom_state != dom_none)
irg->dom_state = dom_inconsistent;
if (irg->pdom_state != dom_none)
irg->pdom_state = dom_inconsistent;
}
-static inline irg_loopinfo_state
-_get_irg_loopinfo_state(const ir_graph *irg) {
+static inline irg_loopinfo_state _get_irg_loopinfo_state(const ir_graph *irg)
+{
return irg->loopinfo_state;
}
-static inline void
-_set_irg_loopinfo_state(ir_graph *irg, irg_loopinfo_state s) {
+static inline void _set_irg_loopinfo_state(ir_graph *irg, irg_loopinfo_state s)
+{
irg->loopinfo_state = s;
}
-static inline void
-_set_irg_loopinfo_inconsistent(ir_graph *irg) {
+static inline void _set_irg_loopinfo_inconsistent(ir_graph *irg)
+{
irg->loopinfo_state &= ~loopinfo_valid;
}
-static inline void
-_set_irg_pinned(ir_graph *irg, op_pin_state p) {
+static inline void _set_irg_pinned(ir_graph *irg, op_pin_state p)
+{
irg->irg_pinned_state = p;
}
-static inline irg_callee_info_state
-_get_irg_callee_info_state(const ir_graph *irg) {
+static inline irg_callee_info_state _get_irg_callee_info_state(const ir_graph *irg)
+{
return irg->callee_info_state;
}
-static inline void
-_set_irg_callee_info_state(ir_graph *irg, irg_callee_info_state s) {
+static inline void _set_irg_callee_info_state(ir_graph *irg, irg_callee_info_state s)
+{
irg_callee_info_state irp_state = get_irp_callee_info_state();
irg->callee_info_state = s;
set_irp_callee_info_state(s);
}
-static inline irg_inline_property
-_get_irg_inline_property(const ir_graph *irg) {
+static inline irg_inline_property _get_irg_inline_property(const ir_graph *irg)
+{
return irg->inline_property;
}
-static inline void
-_set_irg_inline_property(ir_graph *irg, irg_inline_property s) {
+static inline void _set_irg_inline_property(ir_graph *irg, irg_inline_property s)
+{
irg->inline_property = s;
}
-static inline unsigned
-_get_irg_additional_properties(const ir_graph *irg) {
+static inline unsigned _get_irg_additional_properties(const ir_graph *irg)
+{
if (irg->additional_properties & mtp_property_inherited)
return get_method_additional_properties(get_entity_type(irg->ent));
return irg->additional_properties;
}
-static inline void
-_set_irg_additional_properties(ir_graph *irg, unsigned mask) {
+static inline void _set_irg_additional_properties(ir_graph *irg, unsigned mask)
+{
irg->additional_properties = mask & ~mtp_property_inherited;
}
-static inline void
-_set_irg_additional_property(ir_graph *irg, mtp_additional_property flag) {
+static inline void _set_irg_additional_property(ir_graph *irg, mtp_additional_property flag)
+{
unsigned prop = irg->additional_properties;
if (prop & mtp_property_inherited)
irg->additional_properties = prop | flag;
}
-static inline void
-_set_irg_link(ir_graph *irg, void *thing) {
+static inline void _set_irg_link(ir_graph *irg, void *thing)
+{
irg->link = thing;
}
-static inline void *
-_get_irg_link(const ir_graph *irg) {
+static inline void *_get_irg_link(const ir_graph *irg)
+{
return irg->link;
}
-static inline ir_visited_t
-_get_irg_visited(const ir_graph *irg) {
+static inline ir_visited_t _get_irg_visited(const ir_graph *irg)
+{
return irg->visited;
}
-static inline ir_visited_t
-_get_irg_block_visited(const ir_graph *irg) {
+static inline ir_visited_t _get_irg_block_visited(const ir_graph *irg)
+{
return irg->block_visited;
}
-static inline void
-_set_irg_block_visited(ir_graph *irg, ir_visited_t visited) {
+static inline void _set_irg_block_visited(ir_graph *irg, ir_visited_t visited)
+{
irg->block_visited = visited;
}
-static inline void
-_inc_irg_block_visited(ir_graph *irg) {
+static inline void _inc_irg_block_visited(ir_graph *irg)
+{
++irg->block_visited;
}
-static inline void
-_dec_irg_block_visited(ir_graph *irg) {
+static inline void _dec_irg_block_visited(ir_graph *irg)
+{
--irg->block_visited;
}
-static inline unsigned
-_get_irg_estimated_node_cnt(const ir_graph *irg) {
+static inline unsigned _get_irg_estimated_node_cnt(const ir_graph *irg)
+{
return irg->estimated_node_count;
}
/* Return the floating point model of this graph. */
-static inline unsigned
-_get_irg_fp_model(const ir_graph *irg) {
+static inline unsigned _get_irg_fp_model(const ir_graph *irg)
+{
return irg->fp_model;
}
* Kill a node from the irg. BEWARE: this kills
* all later created nodes.
*/
-static inline void
-irg_kill_node(ir_graph *irg, ir_node *n) {
+static inline void irg_kill_node(ir_graph *irg, ir_node *n)
+{
unsigned idx = get_irn_idx(n);
assert(idx + 1 == irg->last_node_idx);
* @return The node with that index or NULL, if there is no node with that index.
* @note The node you got might be dead.
*/
-static inline ir_node *
-_get_idx_irn(ir_graph *irg, unsigned idx) {
+static inline ir_node *_get_idx_irn(ir_graph *irg, unsigned idx)
+{
assert(idx < (unsigned) ARR_LEN(irg->idx_irn_map));
return irg->idx_irn_map[idx];
}
/**
* Return the number of anchors in this graph.
*/
-static inline int
-get_irg_n_anchors(const ir_graph *irg) {
+static inline int get_irg_n_anchors(const ir_graph *irg)
+{
return get_irn_arity(irg->anchor);
}
/**
* Return anchor for given index
*/
-static inline ir_node *
-get_irg_anchor(const ir_graph *irg, int idx) {
+static inline ir_node *get_irg_anchor(const ir_graph *irg, int idx)
+{
return get_irn_intra_n(irg->anchor, idx);
}
/**
* Set anchor for given index
*/
-static inline void
-set_irg_anchor(ir_graph *irg, int idx, ir_node *irn) {
+static inline void set_irg_anchor(ir_graph *irg, int idx, ir_node *irn)
+{
set_irn_n(irg->anchor, idx, irn);
}
#ifdef INTERPROCEDURAL_VIEW
extern int firm_interprocedural_view;
-static inline int
-_get_interprocedural_view(void) {
+static inline int _get_interprocedural_view(void)
+{
return firm_interprocedural_view;
}
*
* @return number of visited nodes
*/
-static unsigned
-irg_walk_2_pre(ir_node *node, irg_walk_func *pre, void * env)
+static unsigned irg_walk_2_pre(ir_node *node, irg_walk_func *pre, void * env)
{
int i;
unsigned cnt = 1;
*
* @return number of visited nodes
*/
-static unsigned
-irg_walk_2_post(ir_node *node, irg_walk_func *post, void * env)
+static unsigned irg_walk_2_post(ir_node *node, irg_walk_func *post, void * env)
{
int i;
unsigned cnt = 1;
*
* @return number of visited nodes
*/
-static unsigned
-irg_walk_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env)
+static unsigned irg_walk_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env)
{
int i;
unsigned cnt = 1;
*
* @return number of visited nodes
*/
-static unsigned
-irg_walk_in_or_dep_2_pre(ir_node *node, irg_walk_func *pre, void *env)
+static unsigned irg_walk_in_or_dep_2_pre(ir_node *node, irg_walk_func *pre, void *env)
{
int i;
unsigned cnt = 1;
*
* @return number of visited nodes
*/
-static unsigned
-irg_walk_in_or_dep_2_post(ir_node *node, irg_walk_func *post, void *env)
+static unsigned irg_walk_in_or_dep_2_post(ir_node *node, irg_walk_func *post, void *env)
{
int i;
unsigned cnt = 1;
*
* @return number of visited nodes
*/
-static unsigned
-irg_walk_in_or_dep_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
+static unsigned irg_walk_in_or_dep_2_both(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
{
int i;
unsigned cnt = 1;
*
* @return number of visited nodes
*/
-static unsigned
-irg_walk_in_or_dep_2(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
+static unsigned irg_walk_in_or_dep_2(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
{
if (node->visited < current_ir_graph->visited) {
if (! post) return irg_walk_in_or_dep_2_pre (node, pre, env);
* Returns current_ir_graph and sets it to the irg of predecessor index
* of node n.
*/
-static inline ir_graph *
-switch_irg(ir_node *n, int index)
+static inline ir_graph * switch_irg(ir_node *n, int index)
{
ir_graph *old_current = current_ir_graph;
}
#ifdef INTERPROCEDURAL_VIEW
-static void
-cg_walk_2(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env)
+static void cg_walk_2(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env)
{
int i;
ir_graph *rem = NULL;
/**
* Intraprozedural graph walker over blocks.
*/
-static void
-do_irg_walk_blk(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *env, unsigned follow_deps,
- void (*traverse)(blk_collect_data_t* blks, irg_walk_func *pre, irg_walk_func *post, void *env))
+static void do_irg_walk_blk(ir_graph *irg, irg_walk_func *pre,
+ irg_walk_func *post, void *env, unsigned follow_deps,
+ void (*traverse)(blk_collect_data_t* blks, irg_walk_func *pre, irg_walk_func *post, void *env))
{
ir_node *end_node = get_irg_end(irg);
ir_node *end_blk = get_irg_end_block(irg);
* Resize the hashset
* @internal
*/
-static
-void resize(HashSet *self, size_t new_size)
+static void resize(HashSet *self, size_t new_size)
{
HashSetEntry *old_entries = self->entries;
HashSetEntry *new_entries;
* Resize the hashset
* @internal
*/
-static
-void resize(HashSet *self, size_t new_size)
+static void resize(HashSet *self, size_t new_size)
{
HashSetEntry *old_entries = self->entries;
HashSetEntry *new_entries;
* ------------------------------- */
extern ir_mode *mode_P_code, *mode_P_data;
-static inline ir_mode *
-_get_modeP_code(void) { return mode_P_code; }
+static inline ir_mode *_get_modeP_code(void) { return mode_P_code; }
-static inline ir_mode *
-_get_modeP_data(void) { return mode_P_data; }
+static inline ir_mode *_get_modeP_data(void) { return mode_P_data; }
-static inline ident *
-_get_mode_ident(const ir_mode *mode) { return mode->name; }
+static inline ident *_get_mode_ident(const ir_mode *mode) { return mode->name; }
-static inline ir_mode_sort
-_get_mode_sort(const ir_mode *mode) { return mode->sort; }
+static inline ir_mode_sort _get_mode_sort(const ir_mode *mode) { return mode->sort; }
-static inline unsigned
-_get_mode_size_bits(const ir_mode *mode) { return mode->size; }
+static inline unsigned _get_mode_size_bits(const ir_mode *mode) { return mode->size; }
-static inline unsigned
-_get_mode_size_bytes(const ir_mode *mode) {
+static inline unsigned _get_mode_size_bytes(const ir_mode *mode)
+{
unsigned size = _get_mode_size_bits(mode);
if ((size & 7) != 0) return (unsigned) -1;
return size >> 3;
}
-static inline int
-_get_mode_sign(const ir_mode *mode) { return mode->sign; }
+static inline int _get_mode_sign(const ir_mode *mode) { return mode->sign; }
-static inline ir_mode_arithmetic
-_get_mode_arithmetic(const ir_mode *mode) { return mode->arithmetic; }
+static inline ir_mode_arithmetic _get_mode_arithmetic(const ir_mode *mode) { return mode->arithmetic; }
-static inline unsigned int
-_get_mode_modulo_shift(const ir_mode *mode) { return mode->modulo_shift; }
+static inline unsigned int _get_mode_modulo_shift(const ir_mode *mode) { return mode->modulo_shift; }
-static inline unsigned int
-_get_mode_vector_elems(const ir_mode *mode) { return mode->vector_elem; }
+static inline unsigned int _get_mode_vector_elems(const ir_mode *mode) { return mode->vector_elem; }
-static inline void *
-_get_mode_link(const ir_mode *mode) { return mode->link; }
+static inline void * _get_mode_link(const ir_mode *mode) { return mode->link; }
-static inline void
-_set_mode_link(ir_mode *mode, void *l) { mode->link = l; }
+static inline void _set_mode_link(ir_mode *mode, void *l) { mode->link = l; }
/* Functions to check, whether a mode is signed, float, int, num, data,
datab or dataM. For more exact definitions read the corresponding pages
= {data || irm_M}
*/
-static inline int
-_mode_is_signed(const ir_mode *mode) {
+static inline int _mode_is_signed(const ir_mode *mode)
+{
return mode->sign;
}
-static inline int
-_mode_is_float(const ir_mode *mode) {
+static inline int _mode_is_float(const ir_mode *mode)
+{
return (_get_mode_sort(mode) == irms_float_number);
}
-static inline int
-_mode_is_int(const ir_mode *mode) {
+static inline int _mode_is_int(const ir_mode *mode)
+{
return (_get_mode_sort(mode) == irms_int_number);
}
-static inline int
-_mode_is_reference(const ir_mode *mode) {
+static inline int _mode_is_reference(const ir_mode *mode)
+{
return (_get_mode_sort(mode) == irms_reference);
}
-static inline int
-_mode_is_num(const ir_mode *mode) {
+static inline int _mode_is_num(const ir_mode *mode)
+{
return (_get_mode_sort(mode) & irmsh_is_num);
}
-static inline int
-_mode_is_data(const ir_mode *mode) {
+static inline int _mode_is_data(const ir_mode *mode)
+{
return (_get_mode_sort(mode) & irmsh_is_data);
}
-static inline int
-_mode_is_datab(const ir_mode *mode) {
+static inline int _mode_is_datab(const ir_mode *mode)
+{
return (_get_mode_sort(mode) & irmsh_is_datab);
}
-static inline int
-_mode_is_dataM(const ir_mode *mode) {
+static inline int _mode_is_dataM(const ir_mode *mode)
+{
return (_get_mode_sort(mode) & irmsh_is_dataM);
}
-static inline int
-_mode_is_float_vector(const ir_mode *mode) {
+static inline int _mode_is_float_vector(const ir_mode *mode)
+{
return (_get_mode_sort(mode) == irms_float_number) && (_get_mode_vector_elems(mode) > 1);
}
-static inline int
-_mode_is_int_vector(const ir_mode *mode) {
+static inline int _mode_is_int_vector(const ir_mode *mode)
+{
return (_get_mode_sort(mode) == irms_int_number) && (_get_mode_vector_elems(mode) > 1);
}
* some incoming irnodes.
* If arity is negative, a node with a dynamic array is created.
*/
-ir_node *
-new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mode,
- int arity, ir_node **in)
+ir_node *new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op,
+ ir_mode *mode, int arity, ir_node **in)
{
ir_node *res;
size_t node_size = offsetof(ir_node, attr) + op->attr_size + firm_add_node_size;
set_irn_n(ijmp, 0, tgt);
}
-ir_node *
-get_Cond_selector(const ir_node *node)
+ir_node *get_Cond_selector(const ir_node *node)
{
assert(is_Cond(node));
return get_irn_n(node, 0);
}
-void
-set_Cond_selector(ir_node *node, ir_node *selector)
+void set_Cond_selector(ir_node *node, ir_node *selector)
{
assert(is_Cond(node));
set_irn_n(node, 0, selector);
}
-long
-get_Cond_default_proj(const ir_node *node)
+long get_Cond_default_proj(const ir_node *node)
{
assert(is_Cond(node));
return node->attr.cond.default_proj;
node->attr.cond.default_proj = defproj;
}
-ir_node *
-get_Return_mem(const ir_node *node)
+ir_node *get_Return_mem(const ir_node *node)
{
assert(is_Return(node));
return get_irn_n(node, 0);
}
-void
-set_Return_mem(ir_node *node, ir_node *mem)
+void set_Return_mem(ir_node *node, ir_node *mem)
{
assert(is_Return(node));
set_irn_n(node, 0, mem);
}
-int
-get_Return_n_ress(const ir_node *node)
+int get_Return_n_ress(const ir_node *node)
{
assert(is_Return(node));
return (get_irn_arity(node) - RETURN_RESULT_OFFSET);
}
-ir_node **
-get_Return_res_arr(ir_node *node)
+ir_node **get_Return_res_arr(ir_node *node)
{
assert(is_Return(node));
if (get_Return_n_ress(node) > 0)
}
/*
-void
-set_Return_n_res(ir_node *node, int results)
+void set_Return_n_res(ir_node *node, int results)
{
assert(is_Return(node));
}
*/
-ir_node *
-get_Return_res(const ir_node *node, int pos)
+ir_node *get_Return_res(const ir_node *node, int pos)
{
assert(is_Return(node));
assert(get_Return_n_ress(node) > pos);
return get_irn_n(node, pos + RETURN_RESULT_OFFSET);
}
-void
-set_Return_res(ir_node *node, int pos, ir_node *res)
+void set_Return_res(ir_node *node, int pos, ir_node *res)
{
assert(is_Return(node));
set_irn_n(node, pos + RETURN_RESULT_OFFSET, res);
return _get_Const_tarval(node);
}
-void
-set_Const_tarval(ir_node *node, tarval *con)
+void set_Const_tarval(ir_node *node, tarval *con)
{
assert(is_Const(node));
node->attr.con.tv = con;
/* The source language type. Must be an atomic type. Mode of type must
be mode of node. For tarvals from entities type must be pointer to
entity type. */
-ir_type *
-get_Const_type(ir_node *node)
+ir_type *get_Const_type(ir_node *node)
{
assert(is_Const(node));
return node->attr.con.tp;
}
-void
-set_Const_type(ir_node *node, ir_type *tp)
+void set_Const_type(ir_node *node, ir_type *tp)
{
assert(is_Const(node));
if (tp != firm_unknown_type) {
}
-symconst_kind
-get_SymConst_kind(const ir_node *node)
+symconst_kind get_SymConst_kind(const ir_node *node)
{
assert(is_SymConst(node));
return node->attr.symc.kind;
}
-void
-set_SymConst_kind(ir_node *node, symconst_kind kind)
+void set_SymConst_kind(ir_node *node, symconst_kind kind)
{
assert(is_SymConst(node));
node->attr.symc.kind = kind;
}
-ir_type *
-get_SymConst_type(const ir_node *node)
+ir_type *get_SymConst_type(const ir_node *node)
{
/* the cast here is annoying, but we have to compensate for
the skip_tip() */
return irn->attr.symc.sym.type_p;
}
-void
-set_SymConst_type(ir_node *node, ir_type *tp)
+void set_SymConst_type(ir_node *node, ir_type *tp)
{
assert(is_SymConst(node) &&
(SYMCONST_HAS_TYPE(get_SymConst_kind(node))));
node->attr.symc.sym.type_p = tp;
}
-ident *
-get_SymConst_name(const ir_node *node)
+ident *get_SymConst_name(const ir_node *node)
{
assert(is_SymConst(node) && SYMCONST_HAS_ID(get_SymConst_kind(node)));
return node->attr.symc.sym.ident_p;
}
-void
-set_SymConst_name(ir_node *node, ident *name)
+void set_SymConst_name(ir_node *node, ident *name)
{
assert(is_SymConst(node) && SYMCONST_HAS_ID(get_SymConst_kind(node)));
node->attr.symc.sym.ident_p = name;
return node->attr.symc.sym;
}
-void
-set_SymConst_symbol(ir_node *node, union symconst_symbol sym)
+void set_SymConst_symbol(ir_node *node, union symconst_symbol sym)
{
assert(is_SymConst(node));
node->attr.symc.sym = sym;
}
-ir_type *
-get_SymConst_value_type(ir_node *node)
+ir_type *get_SymConst_value_type(ir_node *node)
{
assert(is_SymConst(node));
return node->attr.symc.tp;
}
-void
-set_SymConst_value_type(ir_node *node, ir_type *tp)
+void set_SymConst_value_type(ir_node *node, ir_type *tp)
{
assert(is_SymConst(node));
node->attr.symc.tp = tp;
}
-ir_node *
-get_Sel_mem(const ir_node *node)
+ir_node *get_Sel_mem(const ir_node *node)
{
assert(is_Sel(node));
return get_irn_n(node, 0);
}
-void
-set_Sel_mem(ir_node *node, ir_node *mem)
+void set_Sel_mem(ir_node *node, ir_node *mem)
{
assert(is_Sel(node));
set_irn_n(node, 0, mem);
}
-ir_node *
-get_Sel_ptr(const ir_node *node)
+ir_node *get_Sel_ptr(const ir_node *node)
{
assert(is_Sel(node));
return get_irn_n(node, 1);
}
-void
-set_Sel_ptr(ir_node *node, ir_node *ptr)
+void set_Sel_ptr(ir_node *node, ir_node *ptr)
{
assert(is_Sel(node));
set_irn_n(node, 1, ptr);
}
-int
-get_Sel_n_indexs(const ir_node *node)
+int get_Sel_n_indexs(const ir_node *node)
{
assert(is_Sel(node));
return (get_irn_arity(node) - SEL_INDEX_OFFSET);
}
-ir_node **
-get_Sel_index_arr(ir_node *node)
+ir_node **get_Sel_index_arr(ir_node *node)
{
assert(is_Sel(node));
if (get_Sel_n_indexs(node) > 0)
return NULL;
}
-ir_node *
-get_Sel_index(const ir_node *node, int pos)
+ir_node *get_Sel_index(const ir_node *node, int pos)
{
assert(is_Sel(node));
return get_irn_n(node, pos + SEL_INDEX_OFFSET);
}
-void
-set_Sel_index(ir_node *node, int pos, ir_node *index)
+void set_Sel_index(ir_node *node, int pos, ir_node *index)
{
assert(is_Sel(node));
set_irn_n(node, pos + SEL_INDEX_OFFSET, index);
}
-ir_entity *
-get_Sel_entity(const ir_node *node)
+ir_entity *get_Sel_entity(const ir_node *node)
{
assert(is_Sel(node));
return node->attr.sel.entity;
return get_Sel_entity(node);
}
-void
-set_Sel_entity(ir_node *node, ir_entity *ent)
+void set_Sel_entity(ir_node *node, ir_entity *ent)
{
assert(is_Sel(node));
node->attr.sel.entity = ent;
Shr, Shrs, Rotate, Cmp */
-ir_node *
-get_Call_mem(const ir_node *node)
+ir_node *get_Call_mem(const ir_node *node)
{
assert(is_Call(node));
return get_irn_n(node, 0);
}
-void
-set_Call_mem(ir_node *node, ir_node *mem)
+void set_Call_mem(ir_node *node, ir_node *mem)
{
assert(is_Call(node));
set_irn_n(node, 0, mem);
}
-ir_node *
-get_Call_ptr(const ir_node *node)
+ir_node *get_Call_ptr(const ir_node *node)
{
assert(is_Call(node));
return get_irn_n(node, 1);
}
-void
-set_Call_ptr(ir_node *node, ir_node *ptr)
+void set_Call_ptr(ir_node *node, ir_node *ptr)
{
assert(is_Call(node));
set_irn_n(node, 1, ptr);
}
-ir_node **
-get_Call_param_arr(ir_node *node)
+ir_node **get_Call_param_arr(ir_node *node)
{
assert(is_Call(node));
return &get_irn_in(node)[CALL_PARAM_OFFSET + 1];
}
-int
-get_Call_n_params(const ir_node *node)
+int get_Call_n_params(const ir_node *node)
{
assert(is_Call(node));
return (get_irn_arity(node) - CALL_PARAM_OFFSET);
}
-ir_node *
-get_Call_param(const ir_node *node, int pos)
+ir_node *get_Call_param(const ir_node *node, int pos)
{
assert(is_Call(node));
return get_irn_n(node, pos + CALL_PARAM_OFFSET);
}
-void
-set_Call_param(ir_node *node, int pos, ir_node *param)
+void set_Call_param(ir_node *node, int pos, ir_node *param)
{
assert(is_Call(node));
set_irn_n(node, pos + CALL_PARAM_OFFSET, param);
}
-ir_type *
-get_Call_type(ir_node *node)
+ir_type *get_Call_type(ir_node *node)
{
assert(is_Call(node));
return node->attr.call.type;
}
-void
-set_Call_type(ir_node *node, ir_type *tp)
+void set_Call_type(ir_node *node, ir_type *tp)
{
assert(is_Call(node));
assert((get_unknown_type() == tp) || is_Method_type(tp));
node->attr.call.type = tp;
}
-unsigned
-get_Call_tail_call(const ir_node *node)
+unsigned get_Call_tail_call(const ir_node *node)
{
assert(is_Call(node));
return node->attr.call.tail_call;
}
-void
-set_Call_tail_call(ir_node *node, unsigned tail_call)
+void set_Call_tail_call(ir_node *node, unsigned tail_call)
{
assert(is_Call(node));
node->attr.call.tail_call = tail_call != 0;
}
-ir_node *
-get_Builtin_mem(const ir_node *node)
+ir_node *get_Builtin_mem(const ir_node *node)
{
assert(is_Builtin(node));
return get_irn_n(node, 0);
}
-void
-set_Builin_mem(ir_node *node, ir_node *mem)
+void set_Builin_mem(ir_node *node, ir_node *mem)
{
assert(is_Builtin(node));
set_irn_n(node, 0, mem);
}
-ir_builtin_kind
-get_Builtin_kind(const ir_node *node)
+ir_builtin_kind get_Builtin_kind(const ir_node *node)
{
assert(is_Builtin(node));
return node->attr.builtin.kind;
}
-void
-set_Builtin_kind(ir_node *node, ir_builtin_kind kind)
+void set_Builtin_kind(ir_node *node, ir_builtin_kind kind)
{
assert(is_Builtin(node));
node->attr.builtin.kind = kind;
}
-ir_node **
-get_Builtin_param_arr(ir_node *node)
+ir_node **get_Builtin_param_arr(ir_node *node)
{
assert(is_Builtin(node));
return &get_irn_in(node)[BUILDIN_PARAM_OFFSET + 1];
}
-int
-get_Builtin_n_params(const ir_node *node)
+int get_Builtin_n_params(const ir_node *node)
{
assert(is_Builtin(node));
return (get_irn_arity(node) - BUILDIN_PARAM_OFFSET);
}
-ir_node *
-get_Builtin_param(const ir_node *node, int pos)
+ir_node *get_Builtin_param(const ir_node *node, int pos)
{
assert(is_Builtin(node));
return get_irn_n(node, pos + BUILDIN_PARAM_OFFSET);
}
-void
-set_Builtin_param(ir_node *node, int pos, ir_node *param)
+void set_Builtin_param(ir_node *node, int pos, ir_node *param)
{
assert(is_Builtin(node));
set_irn_n(node, pos + BUILDIN_PARAM_OFFSET, param);
}
-ir_type *
-get_Builtin_type(ir_node *node)
+ir_type *get_Builtin_type(ir_node *node)
{
assert(is_Builtin(node));
return node->attr.builtin.type;
}
-void
-set_Builtin_type(ir_node *node, ir_type *tp)
+void set_Builtin_type(ir_node *node, ir_type *tp)
{
assert(is_Builtin(node));
assert((get_unknown_type() == tp) || is_Method_type(tp));
node->attr.conv.strict = (char)strict_flag;
}
-ir_type *
-get_Cast_type(ir_node *node)
+ir_type *get_Cast_type(ir_node *node)
{
assert(is_Cast(node));
return node->attr.cast.type;
}
-void
-set_Cast_type(ir_node *node, ir_type *to_tp)
+void set_Cast_type(ir_node *node, ir_type *to_tp)
{
assert(is_Cast(node));
node->attr.cast.type = to_tp;
return is_SubClass_of(totype, fromtype);
}
-int
-(is_unop)(const ir_node *node) {
+int (is_unop)(const ir_node *node)
+{
return _is_unop(node);
}
-ir_node *
-get_unop_op(const ir_node *node)
+ir_node *get_unop_op(const ir_node *node)
{
if (node->op->opar == oparity_unary)
return get_irn_n(node, node->op->op_index);
return NULL;
}
-void
-set_unop_op(ir_node *node, ir_node *op)
+void set_unop_op(ir_node *node, ir_node *op)
{
if (node->op->opar == oparity_unary)
set_irn_n(node, node->op->op_index, op);
assert(node->op->opar == oparity_unary);
}
-int
-(is_binop)(const ir_node *node) {
+int (is_binop)(const ir_node *node)
+{
return _is_binop(node);
}
-ir_node *
-get_binop_left(const ir_node *node)
+ir_node *get_binop_left(const ir_node *node)
{
assert(node->op->opar == oparity_binary);
return get_irn_n(node, node->op->op_index);
}
-void
-set_binop_left(ir_node *node, ir_node *left)
+void set_binop_left(ir_node *node, ir_node *left)
{
assert(node->op->opar == oparity_binary);
set_irn_n(node, node->op->op_index, left);
}
-ir_node *
-get_binop_right(const ir_node *node)
+ir_node *get_binop_right(const ir_node *node)
{
assert(node->op->opar == oparity_binary);
return get_irn_n(node, node->op->op_index + 1);
}
-void
-set_binop_right(ir_node *node, ir_node *right)
+void set_binop_right(ir_node *node, ir_node *right)
{
assert(node->op->opar == oparity_binary);
set_irn_n(node, node->op->op_index + 1, right);
(get_irg_phase_state(get_irn_irg(n)) == phase_building));
}
-ir_node **
-get_Phi_preds_arr(ir_node *node)
+ir_node **get_Phi_preds_arr(ir_node *node)
{
assert(node->op == op_Phi);
return (ir_node **)&(get_irn_in(node)[1]);
}
-int
-get_Phi_n_preds(const ir_node *node)
+int get_Phi_n_preds(const ir_node *node)
{
assert(is_Phi(node) || is_Phi0(node));
return (get_irn_arity(node));
}
*/
-ir_node *
-get_Phi_pred(const ir_node *node, int pos)
+ir_node *get_Phi_pred(const ir_node *node, int pos)
{
assert(is_Phi(node) || is_Phi0(node));
return get_irn_n(node, pos);
}
-void
-set_Phi_pred(ir_node *node, int pos, ir_node *pred)
+void set_Phi_pred(ir_node *node, int pos, ir_node *pred)
{
assert(is_Phi(node) || is_Phi0(node));
set_irn_n(node, pos, pred);
set_irn_n(node, 1, ptr);
}
-ir_node *
-get_Load_mem(const ir_node *node)
+ir_node *get_Load_mem(const ir_node *node)
{
assert(is_Load(node));
return get_irn_n(node, 0);
}
-void
-set_Load_mem(ir_node *node, ir_node *mem)
+void set_Load_mem(ir_node *node, ir_node *mem)
{
assert(is_Load(node));
set_irn_n(node, 0, mem);
}
-ir_node *
-get_Load_ptr(const ir_node *node)
+ir_node *get_Load_ptr(const ir_node *node)
{
assert(is_Load(node));
return get_irn_n(node, 1);
}
-void
-set_Load_ptr(ir_node *node, ir_node *ptr)
+void set_Load_ptr(ir_node *node, ir_node *ptr)
{
assert(is_Load(node));
set_irn_n(node, 1, ptr);
}
-ir_mode *
-get_Load_mode(const ir_node *node)
+ir_mode *get_Load_mode(const ir_node *node)
{
assert(is_Load(node));
return node->attr.load.mode;
}
-void
-set_Load_mode(ir_node *node, ir_mode *mode)
+void set_Load_mode(ir_node *node, ir_mode *mode)
{
assert(is_Load(node));
node->attr.load.mode = mode;
}
-ir_volatility
-get_Load_volatility(const ir_node *node)
+ir_volatility get_Load_volatility(const ir_node *node)
{
assert(is_Load(node));
return node->attr.load.volatility;
}
-void
-set_Load_volatility(ir_node *node, ir_volatility volatility)
+void set_Load_volatility(ir_node *node, ir_volatility volatility)
{
assert(is_Load(node));
node->attr.load.volatility = volatility;
}
-ir_align
-get_Load_align(const ir_node *node)
+ir_align get_Load_align(const ir_node *node)
{
assert(is_Load(node));
return node->attr.load.aligned;
}
-void
-set_Load_align(ir_node *node, ir_align align)
+void set_Load_align(ir_node *node, ir_align align)
{
assert(is_Load(node));
node->attr.load.aligned = align;
}
-ir_node *
-get_Store_mem(const ir_node *node)
+ir_node *get_Store_mem(const ir_node *node)
{
assert(is_Store(node));
return get_irn_n(node, 0);
}
-void
-set_Store_mem(ir_node *node, ir_node *mem)
+void set_Store_mem(ir_node *node, ir_node *mem)
{
assert(is_Store(node));
set_irn_n(node, 0, mem);
}
-ir_node *
-get_Store_ptr(const ir_node *node)
+ir_node *get_Store_ptr(const ir_node *node)
{
assert(is_Store(node));
return get_irn_n(node, 1);
}
-void
-set_Store_ptr(ir_node *node, ir_node *ptr)
+void set_Store_ptr(ir_node *node, ir_node *ptr)
{
assert(is_Store(node));
set_irn_n(node, 1, ptr);
}
-ir_node *
-get_Store_value(const ir_node *node)
+ir_node *get_Store_value(const ir_node *node)
{
assert(is_Store(node));
return get_irn_n(node, 2);
}
-void
-set_Store_value(ir_node *node, ir_node *value)
+void set_Store_value(ir_node *node, ir_node *value)
{
assert(is_Store(node));
set_irn_n(node, 2, value);
}
-ir_volatility
-get_Store_volatility(const ir_node *node)
+ir_volatility get_Store_volatility(const ir_node *node)
{
assert(is_Store(node));
return node->attr.store.volatility;
}
-void
-set_Store_volatility(ir_node *node, ir_volatility volatility)
+void set_Store_volatility(ir_node *node, ir_volatility volatility)
{
assert(is_Store(node));
node->attr.store.volatility = volatility;
}
-ir_align
-get_Store_align(const ir_node *node)
+ir_align get_Store_align(const ir_node *node)
{
assert(is_Store(node));
return node->attr.store.aligned;
}
-void
-set_Store_align(ir_node *node, ir_align align)
+void set_Store_align(ir_node *node, ir_align align)
{
assert(is_Store(node));
node->attr.store.aligned = align;
}
-ir_node *
-get_Alloc_mem(const ir_node *node)
+ir_node *get_Alloc_mem(const ir_node *node)
{
assert(is_Alloc(node));
return get_irn_n(node, 0);
}
-void
-set_Alloc_mem(ir_node *node, ir_node *mem)
+void set_Alloc_mem(ir_node *node, ir_node *mem)
{
assert(is_Alloc(node));
set_irn_n(node, 0, mem);
}
-ir_node *
-get_Alloc_size(const ir_node *node)
+ir_node *get_Alloc_size(const ir_node *node)
{
assert(is_Alloc(node));
return get_irn_n(node, 1);
}
-void
-set_Alloc_size(ir_node *node, ir_node *size)
+void set_Alloc_size(ir_node *node, ir_node *size)
{
assert(is_Alloc(node));
set_irn_n(node, 1, size);
}
-ir_type *
-get_Alloc_type(ir_node *node)
+ir_type *get_Alloc_type(ir_node *node)
{
assert(is_Alloc(node));
return node->attr.alloc.type;
}
-void
-set_Alloc_type(ir_node *node, ir_type *tp)
+void set_Alloc_type(ir_node *node, ir_type *tp)
{
assert(is_Alloc(node));
node->attr.alloc.type = tp;
}
-ir_where_alloc
-get_Alloc_where(const ir_node *node)
+ir_where_alloc get_Alloc_where(const ir_node *node)
{
assert(is_Alloc(node));
return node->attr.alloc.where;
}
-void
-set_Alloc_where(ir_node *node, ir_where_alloc where)
+void set_Alloc_where(ir_node *node, ir_where_alloc where)
{
assert(is_Alloc(node));
node->attr.alloc.where = where;
}
-ir_node *
-get_Free_mem(const ir_node *node)
+ir_node *get_Free_mem(const ir_node *node)
{
assert(is_Free(node));
return get_irn_n(node, 0);
}
-void
-set_Free_mem(ir_node *node, ir_node *mem)
+void set_Free_mem(ir_node *node, ir_node *mem)
{
assert(is_Free(node));
set_irn_n(node, 0, mem);
}
-ir_node *
-get_Free_ptr(const ir_node *node)
+ir_node *get_Free_ptr(const ir_node *node)
{
assert(is_Free(node));
return get_irn_n(node, 1);
}
-void
-set_Free_ptr(ir_node *node, ir_node *ptr)
+void set_Free_ptr(ir_node *node, ir_node *ptr)
{
assert(is_Free(node));
set_irn_n(node, 1, ptr);
}
-ir_node *
-get_Free_size(const ir_node *node)
+ir_node *get_Free_size(const ir_node *node)
{
assert(is_Free(node));
return get_irn_n(node, 2);
}
-void
-set_Free_size(ir_node *node, ir_node *size)
+void set_Free_size(ir_node *node, ir_node *size)
{
assert(is_Free(node));
set_irn_n(node, 2, size);
}
-ir_type *
-get_Free_type(ir_node *node)
+ir_type *get_Free_type(ir_node *node)
{
assert(is_Free(node));
return node->attr.free.type;
}
-void
-set_Free_type(ir_node *node, ir_type *tp)
+void set_Free_type(ir_node *node, ir_type *tp)
{
assert(is_Free(node));
node->attr.free.type = tp;
}
-ir_where_alloc
-get_Free_where(const ir_node *node)
+ir_where_alloc get_Free_where(const ir_node *node)
{
assert(is_Free(node));
return node->attr.free.where;
}
-void
-set_Free_where(ir_node *node, ir_where_alloc where)
+void set_Free_where(ir_node *node, ir_where_alloc where)
{
assert(is_Free(node));
node->attr.free.where = where;
return tp;
}
-ir_node *
-get_Proj_pred(const ir_node *node)
+ir_node *get_Proj_pred(const ir_node *node)
{
assert(is_Proj(node));
return get_irn_n(node, 0);
}
-void
-set_Proj_pred(ir_node *node, ir_node *pred)
+void set_Proj_pred(ir_node *node, ir_node *pred)
{
assert(is_Proj(node));
set_irn_n(node, 0, pred);
}
-long
-get_Proj_proj(const ir_node *node)
+long get_Proj_proj(const ir_node *node)
{
#ifdef INTERPROCEDURAL_VIEW
ir_opcode code = get_irn_opcode(node);
#endif /* INTERPROCEDURAL_VIEW */
}
-void
-set_Proj_proj(ir_node *node, long proj)
+void set_Proj_proj(ir_node *node, long proj)
{
#ifdef INTERPROCEDURAL_VIEW
ir_opcode code = get_irn_opcode(node);
return _is_arg_Proj(node);
}
-ir_node **
-get_Tuple_preds_arr(ir_node *node)
+ir_node **get_Tuple_preds_arr(ir_node *node)
{
assert(is_Tuple(node));
return (ir_node **)&(get_irn_in(node)[1]);
}
-int
-get_Tuple_n_preds(const ir_node *node)
+int get_Tuple_n_preds(const ir_node *node)
{
assert(is_Tuple(node));
return get_irn_arity(node);
}
/*
-void
-set_Tuple_n_preds(ir_node *node, int n_preds)
+void set_Tuple_n_preds(ir_node *node, int n_preds)
{
assert(is_Tuple(node));
}
*/
-ir_node *
-get_Tuple_pred(const ir_node *node, int pos)
+ir_node *get_Tuple_pred(const ir_node *node, int pos)
{
assert(is_Tuple(node));
return get_irn_n(node, pos);
}
-void
-set_Tuple_pred(ir_node *node, int pos, ir_node *pred)
+void set_Tuple_pred(ir_node *node, int pos, ir_node *pred)
{
assert(is_Tuple(node));
set_irn_n(node, pos, pred);
}
-ir_node *
-get_Id_pred(const ir_node *node)
+ir_node *get_Id_pred(const ir_node *node)
{
assert(is_Id(node));
return get_irn_n(node, 0);
}
-void
-set_Id_pred(ir_node *node, ir_node *pred)
+void set_Id_pred(ir_node *node, ir_node *pred)
{
assert(is_Id(node));
set_irn_n(node, 0, pred);
node->attr.confirm.cmp = cmp;
}
-ir_node *
-get_Filter_pred(ir_node *node)
+ir_node *get_Filter_pred(ir_node *node)
{
assert(is_Filter(node));
return node->in[1];
}
-void
-set_Filter_pred(ir_node *node, ir_node *pred)
+void set_Filter_pred(ir_node *node, ir_node *pred)
{
assert(is_Filter(node));
node->in[1] = pred;
}
-long
-get_Filter_proj(ir_node *node)
+long get_Filter_proj(ir_node *node)
{
assert(is_Filter(node));
return node->attr.filter.proj;
}
-void
-set_Filter_proj(ir_node *node, long proj)
+void set_Filter_proj(ir_node *node, long proj)
{
assert(is_Filter(node));
node->attr.filter.proj = proj;
}
-ir_type *
-get_InstOf_type(ir_node *node)
+ir_type *get_InstOf_type(ir_node *node)
{
assert(node->op == op_InstOf);
return node->attr.instof.type;
}
-void
-set_InstOf_type(ir_node *node, ir_type *type)
+void set_InstOf_type(ir_node *node, ir_type *type)
{
assert(node->op == op_InstOf);
node->attr.instof.type = type;
}
-ir_node *
-get_InstOf_store(const ir_node *node)
+ir_node *get_InstOf_store(const ir_node *node)
{
assert(node->op == op_InstOf);
return get_irn_n(node, 0);
}
-void
-set_InstOf_store(ir_node *node, ir_node *obj)
+void set_InstOf_store(ir_node *node, ir_node *obj)
{
assert(node->op == op_InstOf);
set_irn_n(node, 0, obj);
}
-ir_node *
-get_InstOf_obj(const ir_node *node)
+ir_node *get_InstOf_obj(const ir_node *node)
{
assert(node->op == op_InstOf);
return get_irn_n(node, 1);
}
-void
-set_InstOf_obj(ir_node *node, ir_node *obj)
+void set_InstOf_obj(ir_node *node, ir_node *obj)
{
assert(node->op == op_InstOf);
set_irn_n(node, 1, obj);
}
/* Returns the memory input of a Raise operation. */
-ir_node *
-get_Raise_mem(const ir_node *node)
+ir_node *get_Raise_mem(const ir_node *node)
{
assert(is_Raise(node));
return get_irn_n(node, 0);
}
-void
-set_Raise_mem(ir_node *node, ir_node *mem)
+void set_Raise_mem(ir_node *node, ir_node *mem)
{
assert(is_Raise(node));
set_irn_n(node, 0, mem);
}
-ir_node *
-get_Raise_exo_ptr(const ir_node *node)
+ir_node *get_Raise_exo_ptr(const ir_node *node)
{
assert(is_Raise(node));
return get_irn_n(node, 1);
}
-void
-set_Raise_exo_ptr(ir_node *node, ir_node *exo_ptr)
+void set_Raise_exo_ptr(ir_node *node, ir_node *exo_ptr)
{
assert(is_Raise(node));
set_irn_n(node, 1, exo_ptr);
}
/* returns the graph of a node */
-ir_graph *
-get_irn_irg(const ir_node *node)
+ir_graph *get_irn_irg(const ir_node *node)
{
/*
* Do not use get_nodes_Block() here, because this
/* Auxiliary routines */
/*----------------------------------------------------------------*/
-ir_node *
-skip_Proj(ir_node *node)
+ir_node *skip_Proj(ir_node *node)
{
/* don't assert node !!! */
if (node == NULL)
return node;
}
-ir_node *
-skip_Tuple(ir_node *node)
+ir_node *skip_Tuple(ir_node *node)
{
ir_node *pred;
ir_op *op;
*
* Moreover, it CANNOT be switched off using get_opt_normalize() ...
*/
-ir_node *
-skip_Id(ir_node *node)
+ir_node *skip_Id(ir_node *node)
{
ir_node *pred;
/* don't assert node !!! */
*node = skip_Id(n);
}
-int
-(is_strictConv)(const ir_node *node) {
+int (is_strictConv)(const ir_node *node)
+{
return _is_strictConv(node);
}
-int
-(is_no_Block)(const ir_node *node) {
+int (is_no_Block)(const ir_node *node)
+{
return _is_no_Block(node);
}
/* Returns true if node is a SymConst node with kind symconst_addr_ent. */
-int
-(is_SymConst_addr_ent)(const ir_node *node) {
+int (is_SymConst_addr_ent)(const ir_node *node)
+{
return _is_SymConst_addr_ent(node);
}
/* Returns true if the operation can change the control flow because
of an exception. */
-int
-is_fragile_op(const ir_node *node)
+int is_fragile_op(const ir_node *node)
{
return is_op_fragile(get_irn_op(node));
}
* Checks whether a pointer points to a ir node.
* Intern version for libFirm.
*/
-static inline int
-_is_ir_node(const void *thing) {
+static inline int _is_ir_node(const void *thing)
+{
return (get_kind(thing) == k_ir_node);
}
* Gets the op of a node.
* Intern version for libFirm.
*/
-static inline ir_op *
-_get_irn_op(const ir_node *node) {
+static inline ir_op *_get_irn_op(const ir_node *node)
+{
assert(node);
return node->op;
}
-static inline void
-_set_irn_op(ir_node *node, ir_op *op) {
+static inline void _set_irn_op(ir_node *node, ir_op *op)
+{
assert(node);
node->op = op;
}
/** Copies all attributes stored in the old node to the new node.
Assumes both have the same opcode and sufficient size. */
-static inline void
-_copy_node_attr(const ir_node *old_node, ir_node *new_node) {
+static inline void _copy_node_attr(const ir_node *old_node, ir_node *new_node)
+{
ir_op *op = _get_irn_op(old_node);
/* must always exist */
* Gets the opcode of a node.
* Intern version for libFirm.
*/
-static inline unsigned
-_get_irn_opcode(const ir_node *node) {
+static inline unsigned _get_irn_opcode(const ir_node *node)
+{
assert(k_ir_node == get_kind(node));
assert(node->op);
return node->op->code;
* Returns the number of predecessors without the block predecessor.
* Intern version for libFirm.
*/
-static inline int
-_get_irn_intra_arity(const ir_node *node) {
+static inline int _get_irn_intra_arity(const ir_node *node)
+{
assert(node);
return ARR_LEN(node->in) - 1;
}
* Returns the number of predecessors without the block predecessor.
* Intern version for libFirm.
*/
-static inline int
-_get_irn_inter_arity(const ir_node *node) {
+static inline int _get_irn_inter_arity(const ir_node *node)
+{
assert(node);
if (_get_irn_op(node) == op_Filter) {
assert(node->attr.filter.in_cg);
/**
* Intern version for libFirm.
*/
-static inline ir_node *
-_get_irn_intra_n(const ir_node *node, int n) {
+static inline ir_node *_get_irn_intra_n(const ir_node *node, int n)
+{
ir_node *nn;
assert(node);
/**
* Intern version for libFirm.
*/
-static inline ir_node*
-_get_irn_inter_n(const ir_node *node, int n) {
+static inline ir_node *_get_irn_inter_n(const ir_node *node, int n)
+{
assert(node); assert(-1 <= n && n < _get_irn_inter_arity(node));
/* handle Filter and Block specially */
return node->deps[pos];
}
-static inline void
-_set_irn_dep(ir_node *node, int pos, ir_node *dep) {
+static inline void _set_irn_dep(ir_node *node, int pos, ir_node *dep)
+{
ir_node *old;
assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
}
-static inline int
-_get_irn_ins_or_deps(const ir_node *irn) {
+static inline int _get_irn_ins_or_deps(const ir_node *irn)
+{
return _get_irn_deps(irn) + _get_irn_arity(irn);
}
-static inline ir_node *
-_get_irn_in_or_dep(const ir_node *irn, int pos) {
+static inline ir_node *_get_irn_in_or_dep(const ir_node *irn, int pos)
+{
int n_in = get_irn_arity(irn);
return pos < n_in ? get_irn_n(irn, pos) : get_irn_dep(irn, pos - n_in);
}
* Gets the mode of a node.
* Intern version for libFirm.
*/
-static inline ir_mode *
-_get_irn_mode(const ir_node *node) {
+static inline ir_mode *_get_irn_mode(const ir_node *node)
+{
assert(node);
return node->mode;
}
* Sets the mode of a node.
* Intern version of libFirm.
*/
-static inline void
-_set_irn_mode(ir_node *node, ir_mode *mode) {
+static inline void _set_irn_mode(ir_node *node, ir_mode *mode)
+{
assert(node);
node->mode = mode;
}
* Gets the visited counter of a node.
* Intern version for libFirm.
*/
-static inline ir_visited_t
-_get_irn_visited(const ir_node *node) {
+static inline ir_visited_t _get_irn_visited(const ir_node *node)
+{
assert(node);
return node->visited;
}
* Sets the visited counter of a node.
* Intern version for libFirm.
*/
-static inline void
-_set_irn_visited(ir_node *node, ir_visited_t visited) {
+static inline void _set_irn_visited(ir_node *node, ir_visited_t visited)
+{
assert(node);
node->visited = visited;
}
* Mark a node as visited in a graph.
* Intern version for libFirm.
*/
-static inline void
-_mark_irn_visited(ir_node *node) {
+static inline void _mark_irn_visited(ir_node *node)
+{
assert(node);
node->visited = current_ir_graph->visited;
}
* Returns non-zero if a node of was visited.
* Intern version for libFirm.
*/
-static inline int
-_irn_visited(const ir_node *node) {
+static inline int _irn_visited(const ir_node *node)
+{
assert(node);
return (node->visited >= current_ir_graph->visited);
}
-static inline int
-_irn_visited_else_mark(ir_node *node) {
+static inline int _irn_visited_else_mark(ir_node *node)
+{
if (_irn_visited(node))
return 1;
_mark_irn_visited(node);
* Sets the link of a node.
* Intern version of libFirm.
*/
-static inline void
-_set_irn_link(ir_node *node, void *link) {
+static inline void _set_irn_link(ir_node *node, void *link)
+{
assert(node);
node->link = link;
}
* Returns the link of a node.
* Intern version of libFirm.
*/
-static inline void *
-_get_irn_link(const ir_node *node) {
+static inline void *_get_irn_link(const ir_node *node)
+{
assert(node && _is_ir_node(node));
return node->link;
}
*
* Intern version of libFirm.
*/
-static inline op_pin_state
-_get_irn_pinned(const ir_node *node) {
+static inline op_pin_state _get_irn_pinned(const ir_node *node)
+{
op_pin_state state;
assert(node && _is_ir_node(node));
/* Check opcode */
return state;
}
-static inline op_pin_state
-_is_irn_pinned_in_irg(const ir_node *node) {
+static inline op_pin_state _is_irn_pinned_in_irg(const ir_node *node)
+{
if (get_irg_pinned(get_irn_irg(node)) == op_pin_state_floats)
return get_irn_pinned(node);
return op_pin_state_pinned;
/* include generated code */
#include "gen_irnode.h"
-static inline int
-_is_unop(const ir_node *node) {
+static inline int _is_unop(const ir_node *node)
+{
assert(node && _is_ir_node(node));
return (node->op->opar == oparity_unary);
}
-static inline int
-_is_binop(const ir_node *node) {
+static inline int _is_binop(const ir_node *node)
+{
assert(node && _is_ir_node(node));
return (node->op->opar == oparity_binary);
}
-static inline int
-_is_Phi(const ir_node *node) {
+static inline int _is_Phi(const ir_node *node)
+{
ir_op *op;
assert(node);
return (op == op_Phi);
}
-static inline int
-_is_Proj(const ir_node *node) {
+static inline int _is_Proj(const ir_node *node)
+{
ir_op *op;
assert(node);
return (op == op_Proj);
}
-static inline int
-_is_strictConv(const ir_node *node) {
+static inline int _is_strictConv(const ir_node *node)
+{
return _is_Conv(node) && get_Conv_strict(node);
}
-static inline int
-_is_SymConst_addr_ent(const ir_node *node) {
+static inline int _is_SymConst_addr_ent(const ir_node *node)
+{
return is_SymConst(node) && get_SymConst_kind(node) == symconst_addr_ent;
}
-static inline int
-_is_no_Block(const ir_node *node) {
+static inline int _is_no_Block(const ir_node *node)
+{
assert(node && _is_ir_node(node));
return (_get_irn_op(node) != op_Block);
}
-static inline int
-_get_Block_n_cfgpreds(const ir_node *node) {
+static inline int _get_Block_n_cfgpreds(const ir_node *node)
+{
assert(_is_Block(node));
return _get_irn_arity(node);
}
-static inline ir_node *
-_get_Block_cfgpred(const ir_node *node, int pos) {
+static inline ir_node *_get_Block_cfgpred(const ir_node *node, int pos)
+{
assert(0 <= pos && pos < get_irn_arity(node));
assert(_is_Block(node));
return _get_irn_n(node, pos);
* - If we encounter the Bad node, this function does not return
* the Start block, but the Bad node.
*/
-static inline ir_node *
-_get_Block_cfgpred_block(const ir_node *node, int pos) {
+static inline ir_node *_get_Block_cfgpred_block(const ir_node *node, int pos)
+{
ir_node *res = skip_Proj(get_Block_cfgpred(node, pos));
if (!is_Bad(res))
res = get_nodes_block(res);
return res;
}
-static inline ir_visited_t
-_get_Block_block_visited(const ir_node *node) {
+static inline ir_visited_t _get_Block_block_visited(const ir_node *node)
+{
assert(node->op == op_Block);
return node->attr.block.block_visited;
}
-static inline void
-_set_Block_block_visited(ir_node *node, ir_visited_t visit) {
+static inline void _set_Block_block_visited(ir_node *node, ir_visited_t visit)
+{
assert(node->op == op_Block);
node->attr.block.block_visited = visit;
}
/* For this current_ir_graph must be set. */
-static inline void
-_mark_Block_block_visited(ir_node *node) {
+static inline void _mark_Block_block_visited(ir_node *node)
+{
assert(node->op == op_Block);
node->attr.block.block_visited = get_irg_block_visited(current_ir_graph);
}
-static inline int
-_Block_block_visited(const ir_node *node) {
+static inline int _Block_block_visited(const ir_node *node)
+{
assert(node->op == op_Block);
return (node->attr.block.block_visited >= get_irg_block_visited(current_ir_graph));
}
-static inline ir_node *
-_set_Block_dead(ir_node *block) {
+static inline ir_node *_set_Block_dead(ir_node *block)
+{
assert(_get_irn_op(block) == op_Block);
block->attr.block.dom.dom_depth = -1;
block->attr.block.is_dead = 1;
return block;
}
-static inline int
-_is_Block_dead(const ir_node *block) {
+static inline int _is_Block_dead(const ir_node *block)
+{
ir_op *op = _get_irn_op(block);
if (op == op_Bad)
}
}
-static inline ir_graph *
-_get_Block_irg(const ir_node *block) {
+static inline ir_graph *_get_Block_irg(const ir_node *block)
+{
assert(is_Block(block) || is_Bad(block));
return block->attr.irg.irg;
}
/**
* Sets the Phi list of a block.
*/
-static inline void
-_set_Block_phis(ir_node *block, ir_node *phi) {
+static inline void _set_Block_phis(ir_node *block, ir_node *phi)
+{
assert(_is_Block(block));
assert(phi == NULL || _is_Phi(phi));
block->attr.block.phis = phi;
* Returns the link of a node.
* Intern version of libFirm.
*/
-static inline ir_node *
-_get_Block_phis(const ir_node *block) {
+static inline ir_node *_get_Block_phis(const ir_node *block)
+{
assert(_is_Block(block));
return block->attr.block.phis;
}
/**
* Sets the next link of a Phi.
*/
-static inline void
-_set_Phi_next(ir_node *phi, ir_node *next) {
+static inline void _set_Phi_next(ir_node *phi, ir_node *next)
+{
assert(_is_Phi(phi));
phi->attr.phi.next = next;
}
* Returns the link of a node.
* Intern version of libFirm.
*/
-static inline ir_node *
-_get_Phi_next(const ir_node *phi) {
+static inline ir_node *_get_Phi_next(const ir_node *phi)
+{
assert(_is_Phi(phi));
return phi->attr.phi.next;
}
/** Add a Phi node to the list of Block Phi's. */
-static inline void
-_add_Block_phi(ir_node *block, ir_node *phi) {
+static inline void _add_Block_phi(ir_node *block, ir_node *phi)
+{
_set_Phi_next(phi, _get_Block_phis(block));
_set_Block_phis(block, phi);
}
/** Get the Block mark (single bit). */
-static inline unsigned
-_get_Block_mark(const ir_node *block) {
+static inline unsigned _get_Block_mark(const ir_node *block)
+{
assert(_is_Block(block));
return block->attr.block.marked;
}
/** Set the Block mark (single bit). */
-static inline void
-_set_Block_mark(ir_node *block, unsigned mark) {
+static inline void _set_Block_mark(ir_node *block, unsigned mark)
+{
assert(_is_Block(block));
block->attr.block.marked = mark;
}
/** Returns non-zero if a node is a routine parameter. */
-static inline int
-_is_arg_Proj(const ir_node *node) {
+static inline int _is_arg_Proj(const ir_node *node)
+{
if (! is_Proj(node))
return 0;
node = get_Proj_pred(node);
/**
* Copies all Call attributes stored in the old node to the new node.
*/
-static void
-call_copy_attr(const ir_node *old_node, ir_node *new_node)
+static void call_copy_attr(const ir_node *old_node, ir_node *new_node)
{
default_copy_attr(old_node, new_node);
remove_Call_callee_arr(new_node);
/**
* Copies all Block attributes stored in the old node to the new node.
*/
-static void
-block_copy_attr(const ir_node *old_node, ir_node *new_node)
+static void block_copy_attr(const ir_node *old_node, ir_node *new_node)
{
ir_graph *irg = current_ir_graph;
/**
* Copies all phi attributes stored in old node to the new node
*/
-static void
-phi_copy_attr(const ir_node *old_node, ir_node *new_node)
+static void phi_copy_attr(const ir_node *old_node, ir_node *new_node)
{
ir_graph *irg = current_ir_graph;
/**
* Copies all filter attributes stored in old node to the new node
*/
-static void
-filter_copy_attr(const ir_node *old_node, ir_node *new_node)
+static void filter_copy_attr(const ir_node *old_node, ir_node *new_node)
{
ir_graph *irg = current_ir_graph;
/**
* Copies all ASM attributes stored in old node to the new node
*/
-static void
-ASM_copy_attr(const ir_node *old_node, ir_node *new_node)
+static void ASM_copy_attr(const ir_node *old_node, ir_node *new_node)
{
ir_graph *irg = current_ir_graph;
} /* firm_set_default_copy_attr */
/* Creates a new ir operation. */
-ir_op *
-new_ir_op(unsigned code, const char *name, op_pin_state p,
- unsigned flags, op_arity opar, int op_index, size_t attr_size,
- const ir_op_ops *ops)
+ir_op *new_ir_op(unsigned code, const char *name, op_pin_state p,
+ unsigned flags, op_arity opar, int op_index, size_t attr_size,
+ const ir_op_ops *ops)
{
ir_op *res = XMALLOCZ(ir_op);
/**
* Returns the associated tarval of a node.
*/
-static inline tarval *
-value_of(const ir_node *n) {
+static inline tarval *value_of(const ir_node *n)
+{
return value_of_ptr(n);
}
/**
* Instrument a block with code needed for profiling
*/
-static void
-instrument_block(ir_node *bb, ir_node *address, unsigned int id)
+static void instrument_block(ir_node *bb, ir_node *address, unsigned int id)
{
ir_graph *irg = get_irn_irg(bb);
ir_node *load, *store, *offset, *add, *projm, *proji, *unknown;
/**
* SSA Construction for instrumentation code memory
*/
-static void
-fix_ssa(ir_node * bb, void * data)
+static void fix_ssa(ir_node *bb, void *data)
{
fix_env *env = data;
ir_node *mem;
* Pseudocode:
* void __firmprof_initializer(void) { __init_firmprof(ent_filename, bblock_id, bblock_counts, n_blocks); }
*/
-static ir_graph *
-gen_initializer_irg(ir_entity *ent_filename, ir_entity *bblock_id, ir_entity *bblock_counts, int n_blocks)
+static ir_graph *gen_initializer_irg(ir_entity *ent_filename, ir_entity *bblock_id, ir_entity *bblock_counts, int n_blocks)
{
ir_node *ins[4];
ident *name = new_id_from_str("__firmprof_initializer");
* Walker: assigns an ID to every block.
* Builds the string table
*/
-static void
-block_id_walker(ir_node * bb, void * data)
+static void block_id_walker(ir_node *bb, void *data)
{
block_id_walker_data_t *wd = data;
#define IDENT(x) new_id_from_chars(x, sizeof(x) - 1)
-ir_graph *
-ir_profile_instrument(const char *filename, unsigned flags)
+ir_graph *ir_profile_instrument(const char *filename, unsigned flags)
{
int n, i;
int n_blocks = 0;
return gen_initializer_irg(ent_filename, bblock_id, bblock_counts, n_blocks);
}
-static void
-profile_node_info(void *ctx, FILE *f, const ir_node *irn)
+static void profile_node_info(void *ctx, FILE *f, const ir_node *irn)
{
(void) ctx;
if (is_Block(irn)) {
}
}
-static void
-register_vcg_hook(void)
+static void register_vcg_hook(void)
{
memset(&hook, 0, sizeof(hook));
hook.hook._hook_node_info = profile_node_info;
register_hook(hook_node_info, &hook);
}
-static void
-unregister_vcg_hook(void)
+static void unregister_vcg_hook(void)
{
unregister_hook(hook_node_info, &hook);
}
* Reads the corresponding profile info file if it exists and returns a
* profile info struct
*/
-void
-ir_profile_read(const char *filename)
+void ir_profile_read(const char *filename)
{
FILE *f;
char buf[8];
/**
* Frees the profile info
*/
-void
-ir_profile_free(void)
+void ir_profile_free(void)
{
if (profile) {
unregister_vcg_hook();
/**
* Tells whether profile module has acquired data
*/
-int
-ir_profile_has_data(void)
+int ir_profile_has_data(void)
{
return (profile != NULL);
}
void add_irp_mode(ir_mode *mode);
/* inline functions */
-static inline ir_type *
-_get_segment_type(ir_segment_t segment)
+static inline ir_type *_get_segment_type(ir_segment_t segment)
{
assert(segment <= IR_SEGMENT_LAST);
return irp->segment_types[segment];
}
-static inline ir_type *
-_get_glob_type(void) {
+static inline ir_type *_get_glob_type(void)
+{
return _get_segment_type(IR_SEGMENT_GLOBAL);
}
-static inline ir_type *
-_get_tls_type(void) {
+static inline ir_type *_get_tls_type(void)
+{
return _get_segment_type(IR_SEGMENT_THREAD_LOCAL);
}
-static inline int
-_get_irp_n_irgs(void) {
+static inline int _get_irp_n_irgs(void)
+{
assert(irp && irp->graphs);
if (get_visit_pseudo_irgs()) return get_irp_n_allirgs();
return ARR_LEN(irp->graphs);
}
-static inline ir_graph *
-_get_irp_irg(int pos){
+static inline ir_graph *_get_irp_irg(int pos)
+{
if (get_visit_pseudo_irgs()) return get_irp_allirg(pos);
assert(0 <= pos && pos <= ARR_LEN(irp->graphs));
return irp->graphs[pos];
}
-static inline int
-_get_irp_n_types(void) {
+static inline int _get_irp_n_types(void)
+{
assert(irp && irp->types);
return ARR_LEN(irp->types);
}
-static inline ir_type *
-_get_irp_type(int pos) {
+static inline ir_type *_get_irp_type(int pos)
+{
assert(irp->types);
/* Don't set the skip_tid result so that no double entries are generated. */
return irp->types[pos];
}
-static inline int
-_get_irp_n_modes(void) {
+static inline int _get_irp_n_modes(void)
+{
assert(irp->modes);
return ARR_LEN(irp->modes);
}
-static inline ir_mode *
-_get_irp_mode(int pos) {
+static inline ir_mode *_get_irp_mode(int pos)
+{
assert(irp && irp->modes);
return irp->modes[pos];
}
-static inline int
-_get_irp_n_opcodes(void) {
+static inline int _get_irp_n_opcodes(void)
+{
assert(irp && irp->opcodes);
return ARR_LEN(irp->opcodes);
}
-static inline ir_op *
-_get_irp_opcode(int pos) {
+static inline ir_op *_get_irp_opcode(int pos)
+{
assert(irp && irp->opcodes);
return irp->opcodes[pos];
}
/** Returns a new, unique number to number nodes or the like. */
-static inline long
-get_irp_new_node_nr(void) {
+static inline long get_irp_new_node_nr(void)
+{
assert(irp);
return irp->max_node_nr++;
}
-static inline int
-get_irp_new_irg_idx(void) {
+static inline int get_irp_new_irg_idx(void)
+{
assert(irp);
return irp->max_irg_idx++;
}
-static inline ir_graph *
-_get_const_code_irg(void) {
+static inline ir_graph *_get_const_code_irg(void)
+{
return irp->const_code_irg;
}
/** Returns a new, unique exception region number. */
-static inline ir_exc_region_t
-_get_irp_next_region_nr(void) {
+static inline ir_exc_region_t _get_irp_next_region_nr(void)
+{
assert(irp);
return ++irp->last_region_nr;
}
/** Returns a new, unique label number. */
-static inline ir_label_t
-_get_irp_next_label_nr(void) {
+static inline ir_label_t _get_irp_next_label_nr(void)
+{
assert(irp);
return ++irp->last_label_nr;
}
/**
* verify a Proj node
*/
-static int
-verify_node_Proj(ir_node *p, ir_graph *irg)
+static int verify_node_Proj(ir_node *p, ir_graph *irg)
{
ir_node *pred;
ir_op *op;
* The pseudo representation can only be used for analyses. It may not be
* optimized. Pseudo graphs are kept in a separate graph list in irprog.
*/
-ir_graph *
-new_pseudo_ir_graph(ir_entity *ent, int n_loc)
+ir_graph *new_pseudo_ir_graph(ir_entity *ent, int n_loc)
{
ir_graph *res = new_r_ir_graph(ent, n_loc);
add_irp_pseudo_irg(res); /* remember this graph global. */
* Resize the hashset
* @internal
*/
-static
-void resize(HashSet *self, size_t new_size)
+static void resize(HashSet *self, size_t new_size)
{
HashSetEntry *old_entries = self->entries;
HashSetEntry *new_entries;
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int i)
+static int YYID(int i)
#else
-static int
-YYID (i)
+static int YYID(i)
int i;
#endif
{
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+static void yy_symbol_value_print(yyoutput, yytype, yyvaluep)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
+static void yy_symbol_print(yyoutput, yytype, yyvaluep)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+static void yy_stack_print(yytype_int16 *bottom, yytype_int16 *top)
#else
-static void
-yy_stack_print (bottom, top)
+static void yy_stack_print(bottom, top)
yytype_int16 *bottom;
yytype_int16 *top;
#endif
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+static void yy_reduce_print(YYSTYPE *yyvsp, int yyrule)
#else
-static void
-yy_reduce_print (yyvsp, yyrule)
+static void yy_reduce_print(yyvsp, yyrule)
YYSTYPE *yyvsp;
int yyrule;
#endif
/* Return the length of YYSTR. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
+static YYSIZE_T yystrlen(const char *yystr)
#else
-static YYSIZE_T
-yystrlen (yystr)
+static YYSIZE_T yystrlen(yystr)
const char *yystr;
#endif
{
YYDEST. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
+static char *yystpcpy(char *yydest, const char *yysrc)
#else
-static char *
-yystpcpy (yydest, yysrc)
+static char *yystpcpy(yydest, yysrc)
char *yydest;
const char *yysrc;
#endif
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
+static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
{
if (*yystr == '"')
{
copied. As a special case, return 0 if an ordinary "syntax error"
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
+static YYSIZE_T yysyntax_error(char *yyresult, int yystate, int yychar)
{
int yyn = yypact[yystate];
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
+static void yydestruct(yymsg, yytype, yyvaluep)
const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
+int yyparse (void *YYPARSE_PARAM)
#else
-int
-yyparse (YYPARSE_PARAM)
+int yyparse (YYPARSE_PARAM)
void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
+int yyparse (void)
#else
-int
-yyparse ()
+int yyparse ()
#endif
#endif
Return nonzero if successful, calls obstack_alloc_failed_handler if
allocation fails. */
-int
-_obstack_begin (struct obstack *h,
- int size, int alignment,
- void *(*chunkfun) (long),
- void (*freefun) (void *))
+int _obstack_begin(struct obstack *h, int size, int alignment,
+ void *(*chunkfun)(long), void (*freefun)(void *))
{
register struct _obstack_chunk *chunk; /* points to new chunk */
return 1;
}
-int
-_obstack_begin_1 (struct obstack *h, int size, int alignment,
- void *(*chunkfun) (void *, long),
- void (*freefun) (void *, void *),
- void *arg)
+int _obstack_begin_1(struct obstack *h, int size, int alignment,
+ void *(*chunkfun) (void *, long),
+ void (*freefun) (void *, void *), void *arg)
{
register struct _obstack_chunk *chunk; /* points to new chunk */
Copies any partial object from the end of the old chunk
to the beginning of the new one. */
-void
-_obstack_newchunk (struct obstack *h, int length)
+void _obstack_newchunk(struct obstack *h, int length)
{
register struct _obstack_chunk *old_chunk = h->chunk;
register struct _obstack_chunk *new_chunk;
obstack.h because it is just for debugging. */
int _obstack_allocated_p (struct obstack *h, void *obj);
-int
-_obstack_allocated_p (struct obstack *h, void *obj)
+int _obstack_allocated_p(struct obstack *h, void *obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
# undef obstack_free
-void
-obstack_free (struct obstack *h, void *obj)
+void obstack_free(struct obstack *h, void *obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
abort ();
}
-int
-_obstack_memory_used (struct obstack *h)
+int _obstack_memory_used(struct obstack *h)
{
register struct _obstack_chunk* lp;
register int nbytes = 0;
return nbytes;
}
-static void
-__attribute__ ((noreturn))
-print_and_abort (void)
+static void __attribute__((noreturn)) print_and_abort(void)
{
/* Don't change any of these strings. Yes, it would be possible to add
the newline to the string and use fputs or so. But this must not
To recover from an out of memory error,
free up some memory, then call this again. */
-int
-_obstack_begin (h, size, alignment, chunkfun, freefun)
+int _obstack_begin(h, size, alignment, chunkfun, freefun)
struct obstack *h;
int size;
int alignment;
return 1;
}
-int
-_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
+int _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
struct obstack *h;
int size;
int alignment;
Copies any partial object from the end of the old chunk
to the beginning of the new one. */
-void
-_obstack_newchunk (h, length)
+void _obstack_newchunk (h, length)
struct obstack *h;
int length;
{
int _obstack_allocated_p (struct obstack *h, POINTER obj);
#endif
-int
-_obstack_allocated_p (h, obj)
+int _obstack_allocated_p (h, obj)
struct obstack *h;
POINTER obj;
{
/* This function has two names with identical definitions.
This is the first one, called from non-ANSI code. */
-void
-_obstack_free (h, obj)
+void _obstack_free (h, obj)
struct obstack *h;
POINTER obj;
{
/* This function is used from ANSI code. */
-void
-obstack_free (h, obj)
+void obstack_free (h, obj)
struct obstack *h;
POINTER obj;
{
abort ();
}
-int
-_obstack_memory_used (h)
+int _obstack_memory_used (h)
struct obstack *h;
{
register struct _obstack_chunk* lp;
# endif
#endif
-static void
-print_and_abort ()
+static void print_and_abort(void)
{
fputs (_("memory exhausted\n"), stderr);
exit (obstack_exit_failure);
* accesses. This function is called for all Phi and Block nodes
* in a Block.
*/
-static inline int
-compute_new_arity(ir_node *b)
+static inline int compute_new_arity(ir_node *b)
{
int i, res, irn_arity;
int irg_v, block_v;
*
* @param copy_node_nr If non-zero, the node number will be copied
*/
-static void
-copy_graph_env(int copy_node_nr)
+static void copy_graph_env(int copy_node_nr)
{
ir_graph *irg = current_ir_graph;
ir_node *old_end, *new_anchor;
*
* @return the new created entity
*/
-static inline ir_entity *
-new_rd_entity(dbg_info *db, ir_type *owner, ident *name, ir_type *type)
+static inline ir_entity *new_rd_entity(dbg_info *db, ir_type *owner,
+ ident *name, ir_type *type)
{
ir_entity *res;
ir_graph *rem;
return res;
} /* new_rd_entity */
-ir_entity *
-new_d_entity(ir_type *owner, ident *name, ir_type *type, dbg_info *db)
+ir_entity *new_d_entity(ir_type *owner, ident *name, ir_type *type, dbg_info *db)
{
ir_entity *res;
return res;
} /* new_d_entity */
-ir_entity *
-new_entity(ir_type *owner, ident *name, ir_type *type)
+ir_entity *new_entity(ir_type *owner, ident *name, ir_type *type)
{
return new_d_entity(owner, name, type, NULL);
} /* new_entity */
* Copies the entity if the new_owner is different from the
* owner of the old entity, else returns the old entity.
*/
-ir_entity *
-copy_entity_own(ir_entity *old, ir_type *new_owner)
+ir_entity *copy_entity_own(ir_entity *old, ir_type *new_owner)
{
ir_entity *newe;
assert(is_entity(old));
return newe;
} /* copy_entity_own */
-ir_entity *
-copy_entity_name(ir_entity *old, ident *new_name)
+ir_entity *copy_entity_name(ir_entity *old, ident *new_name)
{
ir_entity *newe;
assert(old && old->kind == k_entity);
return newe;
} /* copy_entity_name */
-void
-free_entity(ir_entity *ent)
+void free_entity(ir_entity *ent)
{
assert(ent && ent->kind == k_entity);
free_entity_attrs(ent);
} /* free_entity */
/* Outputs a unique number for this node */
-long
-get_entity_nr(const ir_entity *ent)
+long get_entity_nr(const ir_entity *ent)
{
assert(ent && ent->kind == k_entity);
#ifdef DEBUG_libfirm
#endif
} /* get_entity_nr */
-const char *
-(get_entity_name)(const ir_entity *ent) {
+const char *(get_entity_name)(const ir_entity *ent)
+{
return _get_entity_name(ent);
}
-ident *
-(get_entity_ident)(const ir_entity *ent) {
+ident *(get_entity_ident)(const ir_entity *ent)
+{
return _get_entity_ident(ent);
}
-void
-(set_entity_ident)(ir_entity *ent, ident *id) {
+void (set_entity_ident)(ir_entity *ent, ident *id)
+{
_set_entity_ident(ent, id);
}
-ir_type *
-(get_entity_owner)(const ir_entity *ent) {
+ir_type *(get_entity_owner)(const ir_entity *ent)
+{
return _get_entity_owner(ent);
}
-void
-set_entity_owner(ir_entity *ent, ir_type *owner)
+void set_entity_owner(ir_entity *ent, ir_type *owner)
{
assert(is_entity(ent));
assert(is_compound_type(owner));
return _get_entity_ld_ident(ent);
}
-void
-(set_entity_ld_ident)(ir_entity *ent, ident *ld_ident) {
+void (set_entity_ld_ident)(ir_entity *ent, ident *ld_ident)
+{
_set_entity_ld_ident(ent, ld_ident);
}
return _get_entity_ld_name(ent);
}
-ir_type *
-(get_entity_type)(const ir_entity *ent) {
+ir_type *(get_entity_type)(const ir_entity *ent)
+{
return _get_entity_type(ent);
}
-void
-(set_entity_type)(ir_entity *ent, ir_type *type) {
+void (set_entity_type)(ir_entity *ent, ir_type *type)
+{
_set_entity_type(ent, type);
}
-ir_volatility
-(get_entity_volatility)(const ir_entity *ent) {
+ir_volatility (get_entity_volatility)(const ir_entity *ent)
+{
return _get_entity_volatility(ent);
}
-void
-(set_entity_volatility)(ir_entity *ent, ir_volatility vol) {
+void (set_entity_volatility)(ir_entity *ent, ir_volatility vol)
+{
_set_entity_volatility(ent, vol);
}
#undef X
} /* get_volatility_name */
-ir_align
-(get_entity_aligned)(const ir_entity *ent) {
+ir_align (get_entity_aligned)(const ir_entity *ent)
+{
return _get_entity_aligned(ent);
}
-void
-(set_entity_aligned)(ir_entity *ent, ir_align a) {
+void (set_entity_aligned)(ir_entity *ent, ir_align a)
+{
_set_entity_aligned(ent, a);
}
-unsigned
-(get_entity_alignment)(const ir_entity *ent) {
+unsigned (get_entity_alignment)(const ir_entity *ent)
+{
return _get_entity_alignment(ent);
}
-void
-(set_entity_alignment)(ir_entity *ent, unsigned alignment) {
+void (set_entity_alignment)(ir_entity *ent, unsigned alignment)
+{
_set_entity_alignment(ent, alignment);
}
#undef X
} /* get_align_name */
-void
-set_entity_label(ir_entity *ent, ir_label_t label)
+void set_entity_label(ir_entity *ent, ir_label_t label)
{
ent->attr.code_attr.label = label;
}
void firm_init_entity(void);
/* ----------------------- inline functions ------------------------ */
-static inline int
-_is_entity(const void *thing) {
+static inline int _is_entity(const void *thing)
+{
return get_kind(thing) == k_entity;
}
-static inline const char *
-_get_entity_name(const ir_entity *ent) {
+static inline const char *_get_entity_name(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return get_id_str(get_entity_ident(ent));
}
-static inline ident *
-_get_entity_ident(const ir_entity *ent) {
+static inline ident *_get_entity_ident(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->name;
}
-static inline void
-_set_entity_ident(ir_entity *ent, ident *id) {
+static inline void _set_entity_ident(ir_entity *ent, ident *id)
+{
assert(ent && ent->kind == k_entity);
ent->name = id;
}
-static inline ir_type *
-_get_entity_owner(const ir_entity *ent) {
+static inline ir_type *_get_entity_owner(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->owner;
}
-static inline ident *
-_get_entity_ld_ident(const ir_entity *ent)
+static inline ident *_get_entity_ld_ident(const ir_entity *ent)
{
assert(ent && ent->kind == k_entity);
if (ent->ld_name == NULL)
return ent->ld_name;
}
-static inline void
-_set_entity_ld_ident(ir_entity *ent, ident *ld_ident) {
+static inline void _set_entity_ld_ident(ir_entity *ent, ident *ld_ident)
+{
assert(ent && ent->kind == k_entity);
ent->ld_name = ld_ident;
}
-static inline const char *
-_get_entity_ld_name(const ir_entity *ent) {
+static inline const char *_get_entity_ld_name(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return get_id_str(get_entity_ld_ident(ent));
}
-static inline ir_type *
-_get_entity_type(const ir_entity *ent) {
+static inline ir_type *_get_entity_type(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->type;
}
-static inline void
-_set_entity_type(ir_entity *ent, ir_type *type) {
+static inline void _set_entity_type(ir_entity *ent, ir_type *type)
+{
assert(ent && ent->kind == k_entity);
ent->type = type;
}
-static inline ir_linkage
-_get_entity_linkage(const ir_entity *ent) {
+static inline ir_linkage _get_entity_linkage(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->linkage;
}
-static inline ir_volatility
-_get_entity_volatility(const ir_entity *ent) {
+static inline ir_volatility _get_entity_volatility(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->volatility;
}
-static inline void
-_set_entity_volatility(ir_entity *ent, ir_volatility vol) {
+static inline void _set_entity_volatility(ir_entity *ent, ir_volatility vol)
+{
assert(ent && ent->kind == k_entity);
ent->volatility = vol;
}
-static inline unsigned
-_get_entity_alignment(const ir_entity *ent) {
+static inline unsigned _get_entity_alignment(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->alignment;
}
-static inline void
-_set_entity_alignment(ir_entity *ent, unsigned alignment) {
+static inline void _set_entity_alignment(ir_entity *ent, unsigned alignment)
+{
assert(ent && ent->kind == k_entity);
ent->alignment = alignment;
}
-static inline ir_align
-_get_entity_aligned(const ir_entity *ent) {
+static inline ir_align _get_entity_aligned(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->aligned;
}
-static inline void
-_set_entity_aligned(ir_entity *ent, ir_align a) {
+static inline void _set_entity_aligned(ir_entity *ent, ir_align a)
+{
assert(ent && ent->kind == k_entity);
ent->aligned = a;
}
-static inline int
-_is_entity_compiler_generated(const ir_entity *ent) {
+static inline int _is_entity_compiler_generated(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->compiler_gen;
}
-static inline void
-_set_entity_compiler_generated(ir_entity *ent, int flag) {
+static inline void _set_entity_compiler_generated(ir_entity *ent, int flag)
+{
assert(ent && ent->kind == k_entity);
ent->compiler_gen = flag ? 1 : 0;
}
-static inline ir_entity_usage
-_get_entity_usage(const ir_entity *ent) {
+static inline ir_entity_usage _get_entity_usage(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->usage;
}
-static inline void
-_set_entity_usage(ir_entity *ent, ir_entity_usage state) {
+static inline void _set_entity_usage(ir_entity *ent, ir_entity_usage state)
+{
assert(ent && ent->kind == k_entity);
ent->usage = state;
}
-static inline int
-_get_entity_offset(const ir_entity *ent) {
+static inline int _get_entity_offset(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->offset;
}
-static inline void
-_set_entity_offset(ir_entity *ent, int offset) {
+static inline void _set_entity_offset(ir_entity *ent, int offset)
+{
assert(ent && ent->kind == k_entity);
ent->offset = offset;
}
-static inline unsigned char
-_get_entity_offset_bits_remainder(const ir_entity *ent) {
+static inline unsigned char _get_entity_offset_bits_remainder(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->offset_bit_remainder;
}
-static inline void
-_set_entity_offset_bits_remainder(ir_entity *ent, unsigned char offset) {
+static inline void _set_entity_offset_bits_remainder(ir_entity *ent, unsigned char offset)
+{
assert(ent && ent->kind == k_entity);
ent->offset_bit_remainder = offset;
}
-static inline void *
-_get_entity_link(const ir_entity *ent) {
+static inline void *_get_entity_link(const ir_entity *ent)
+{
assert(ent && ent->kind == k_entity);
return ent->link;
}
-static inline void
-_set_entity_link(ir_entity *ent, void *l) {
+static inline void _set_entity_link(ir_entity *ent, void *l)
+{
assert(ent && ent->kind == k_entity);
ent->link = l;
}
-static inline ir_graph *
-_get_entity_irg(const ir_entity *ent) {
+static inline ir_graph *_get_entity_irg(const ir_entity *ent)
+{
ir_graph *irg;
assert(ent && ent->kind == k_entity);
if (!is_Method_type(ent->type) || ent == unknown_entity) {
return res;
}
-void
-free_tpop(const tp_op *tpop)
+void free_tpop(const tp_op *tpop)
{
xfree((void *)tpop);
}
* inline functions *
* -----------------*/
-static inline tp_opcode
-_get_tpop_code(const tp_op *op) {
+static inline tp_opcode _get_tpop_code(const tp_op *op)
+{
return op->code;
}
-static inline ident *
-_get_tpop_ident(const tp_op *op){
+static inline ident *_get_tpop_ident(const tp_op *op)
+{
return op->name;
}
-static inline size_t
-_get_tpop_attr_size(const tp_op *op) {
+static inline size_t _get_tpop_attr_size(const tp_op *op)
+{
return op->attr_size;
}
* @return A new type of the given type. The remaining private attributes are not
* initialized. The type is in state layout_undefined.
*/
-ir_type *
-new_type(const tp_op *type_op, ir_mode *mode, type_dbg_info *db);
+ir_type *new_type(const tp_op *type_op, ir_mode *mode, type_dbg_info *db);
void free_type_attrs(ir_type *tp);
void free_class_entities (ir_type *clss);
static inline ir_visited_t _get_master_type_visited(void) { return firm_type_visited; }
static inline void _inc_master_type_visited(void) { ++firm_type_visited; }
-static inline void *
-_get_type_link(const ir_type *tp) {
+static inline void *_get_type_link(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return(tp -> link);
}
-static inline void
-_set_type_link(ir_type *tp, void *l) {
+static inline void _set_type_link(ir_type *tp, void *l)
+{
assert(tp && tp->kind == k_type);
tp -> link = l;
}
-static inline const tp_op*
-_get_type_tpop(const ir_type *tp) {
+static inline const tp_op *_get_type_tpop(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return tp->type_op;
}
-static inline ident*
-_get_type_tpop_nameid(const ir_type *tp) {
+static inline ident *_get_type_tpop_nameid(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return get_tpop_ident(tp->type_op);
}
-static inline tp_opcode
-_get_type_tpop_code(const ir_type *tp) {
+static inline tp_opcode _get_type_tpop_code(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return get_tpop_code(tp->type_op);
}
-static inline ir_mode *
-_get_type_mode(const ir_type *tp) {
+static inline ir_mode *_get_type_mode(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return tp->mode;
}
-static inline unsigned
-_get_type_size_bytes(const ir_type *tp) {
+static inline unsigned _get_type_size_bytes(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return tp->size;
}
-static inline ir_type_state
-_get_type_state(const ir_type *tp) {
+static inline ir_type_state _get_type_state(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return tp->flags & tf_layout_fixed ? layout_fixed : layout_undefined;
}
-static inline ir_visited_t
-_get_type_visited(const ir_type *tp) {
+static inline ir_visited_t _get_type_visited(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return tp->visit;
}
-static inline void
-_set_type_visited(ir_type *tp, ir_visited_t num) {
+static inline void _set_type_visited(ir_type *tp, ir_visited_t num)
+{
assert(tp && tp->kind == k_type);
tp->visit = num;
}
-static inline void
-_mark_type_visited(ir_type *tp) {
+static inline void _mark_type_visited(ir_type *tp)
+{
assert(tp && tp->kind == k_type);
assert(tp->visit < firm_type_visited);
tp->visit = firm_type_visited;
}
-static inline int
-_type_visited(const ir_type *tp) {
+static inline int _type_visited(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return tp->visit >= firm_type_visited;
}
-static inline int
-_type_not_visited(const ir_type *tp) {
+static inline int _type_not_visited(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return tp->visit < firm_type_visited;
}
-static inline type_dbg_info *
-_get_type_dbg_info(const ir_type *tp) {
+static inline type_dbg_info *_get_type_dbg_info(const ir_type *tp)
+{
return tp->dbi;
}
-static inline void
-_set_type_dbg_info(ir_type *tp, type_dbg_info *db) {
+static inline void _set_type_dbg_info(ir_type *tp, type_dbg_info *db)
+{
tp->dbi = db;
}
-static inline int
-_is_type(const void *thing) {
+static inline int _is_type(const void *thing)
+{
return (get_kind(thing) == k_type);
}
-static inline int
-_is_class_type(const ir_type *clss) {
+static inline int _is_class_type(const ir_type *clss)
+{
assert(clss);
return (clss->type_op == type_class);
}
-static inline int
-_get_class_n_members (const ir_type *clss) {
+static inline int _get_class_n_members (const ir_type *clss)
+{
assert(clss && (clss->type_op == type_class));
return (ARR_LEN (clss->attr.ca.members));
}
-static inline ir_entity *
-_get_class_member (const ir_type *clss, int pos) {
+static inline ir_entity *_get_class_member(const ir_type *clss, int pos)
+{
assert(clss && (clss->type_op == type_class));
assert(pos >= 0 && pos < _get_class_n_members(clss));
return clss->attr.ca.members[pos];
}
-static inline unsigned
-_get_class_vtable_size(const ir_type *clss) {
+static inline unsigned _get_class_vtable_size(const ir_type *clss)
+{
assert(clss && (clss->type_op == type_class));
return clss->attr.ca.vtable_size;
}
-static inline void
-_set_class_vtable_size(ir_type *clss, unsigned vtable_size) {
+static inline void _set_class_vtable_size(ir_type *clss, unsigned vtable_size)
+{
assert(clss && (clss->type_op == type_class));
clss->attr.ca.vtable_size = vtable_size;
}
-static inline int
-_is_class_final(const ir_type *clss) {
+static inline int _is_class_final(const ir_type *clss)
+{
assert(clss && (clss->type_op == type_class));
return clss->attr.ca.clss_flags & cf_final_class;
}
-static inline void
-_set_class_final(ir_type *clss, int final) {
+static inline void _set_class_final(ir_type *clss, int final)
+{
assert(clss && (clss->type_op == type_class));
if (final)
clss->attr.ca.clss_flags |= cf_final_class;
clss->attr.ca.clss_flags &= ~cf_final_class;
}
-static inline int
-_is_class_interface(const ir_type *clss) {
+static inline int _is_class_interface(const ir_type *clss)
+{
assert(clss && (clss->type_op == type_class));
return clss->attr.ca.clss_flags & cf_interface_class;
}
-static inline void
-_set_class_interface(ir_type *clss, int final) {
+static inline void _set_class_interface(ir_type *clss, int final)
+{
assert(clss && (clss->type_op == type_class));
if (final)
clss->attr.ca.clss_flags |= cf_interface_class;
clss->attr.ca.clss_flags &= ~cf_interface_class;
}
-static inline int
-_is_class_abstract(const ir_type *clss) {
+static inline int _is_class_abstract(const ir_type *clss)
+{
assert(clss && (clss->type_op == type_class));
return clss->attr.ca.clss_flags & cf_absctract_class;
- }
+}
-static inline void
-_set_class_abstract(ir_type *clss, int final) {
+static inline void _set_class_abstract(ir_type *clss, int final)
+{
assert(clss && (clss->type_op == type_class));
if (final)
clss->attr.ca.clss_flags |= cf_absctract_class;
clss->attr.ca.clss_flags &= ~cf_absctract_class;
}
-static inline int
-_is_struct_type(const ir_type *strct) {
+static inline int _is_struct_type(const ir_type *strct)
+{
assert(strct);
return (strct->type_op == type_struct);
}
-static inline int
-_is_method_type(const ir_type *method) {
+static inline int _is_method_type(const ir_type *method)
+{
assert(method);
return (method->type_op == type_method);
}
-static inline int
-_is_union_type(const ir_type *uni) {
+static inline int _is_union_type(const ir_type *uni)
+{
assert(uni);
return (uni->type_op == type_union);
}
-static inline int
-_is_array_type(const ir_type *array) {
+static inline int _is_array_type(const ir_type *array)
+{
assert(array);
return (array->type_op == type_array);
}
-static inline int
-_is_enumeration_type(const ir_type *enumeration) {
+static inline int _is_enumeration_type(const ir_type *enumeration)
+{
assert(enumeration);
return (enumeration->type_op == type_enumeration);
}
-static inline int
-_is_pointer_type(const ir_type *pointer) {
+static inline int _is_pointer_type(const ir_type *pointer)
+{
assert(pointer);
return (pointer->type_op == type_pointer);
}
/** Returns true if a type is a primitive type. */
-static inline int
-_is_primitive_type(const ir_type *primitive) {
+static inline int _is_primitive_type(const ir_type *primitive)
+{
assert(primitive && primitive->kind == k_type);
return (primitive->type_op == type_primitive);
}
-static inline int
-_is_atomic_type(const ir_type *tp) {
+static inline int _is_atomic_type(const ir_type *tp)
+{
assert(tp && tp->kind == k_type);
return (_is_primitive_type(tp) || _is_pointer_type(tp) ||
_is_enumeration_type(tp));
}
-static inline int
-_get_method_n_params(const ir_type *method) {
+static inline int _get_method_n_params(const ir_type *method)
+{
assert(method && (method->type_op == type_method));
return method->attr.ma.n_params;
}
-static inline int
-_get_method_n_ress(const ir_type *method) {
+static inline int _get_method_n_ress(const ir_type *method)
+{
assert(method && (method->type_op == type_method));
return method->attr.ma.n_res;
}
-static inline unsigned
-_get_method_additional_properties(const ir_type *method) {
+static inline unsigned _get_method_additional_properties(const ir_type *method)
+{
assert(method && (method->type_op == type_method));
return method->attr.ma.additional_properties;
}
-static inline void
-_set_method_additional_properties(ir_type *method, unsigned mask) {
+static inline void _set_method_additional_properties(ir_type *method, unsigned mask)
+{
assert(method && (method->type_op == type_method));
/* do not allow to set the mtp_property_inherited flag or
method->attr.ma.additional_properties = mask & ~mtp_property_inherited;
}
-static inline void
-_set_method_additional_property(ir_type *method, mtp_additional_property flag) {
+static inline void _set_method_additional_property(ir_type *method, mtp_additional_property flag)
+{
assert(method && (method->type_op == type_method));
/* do not allow to set the mtp_property_inherited flag or
method->attr.ma.additional_properties |= flag & ~mtp_property_inherited;
}
-static inline unsigned
-_get_method_calling_convention(const ir_type *method) {
+static inline unsigned _get_method_calling_convention(const ir_type *method)
+{
assert(method && (method->type_op == type_method));
return method->attr.ma.irg_calling_conv;
}
-static inline void
-_set_method_calling_convention(ir_type *method, unsigned cc_mask) {
+static inline void _set_method_calling_convention(ir_type *method, unsigned cc_mask)
+{
assert(method && (method->type_op == type_method));
method->attr.ma.irg_calling_conv = cc_mask;
}
/*****************************************************************************/
-static void
-type_walk_super_2(type_or_ent tore,
- type_walk_func *pre,
- type_walk_func *post,
- void *env) {
+static void type_walk_super_2(type_or_ent tore, type_walk_func *pre,
+ type_walk_func *post, void *env)
+{
type_or_ent cont;
int i, n;
/*****************************************************************************/
-static void
-class_walk_s2s_2(ir_type *tp,
- class_walk_func *pre,
- class_walk_func *post,
- void *env)
+static void class_walk_s2s_2(ir_type *tp, class_walk_func *pre,
+ class_walk_func *post, void *env)
{
int i, n;
/*
* Access routines for tarval fields ========================================
*/
-static inline ir_mode *
-_get_tarval_mode(const tarval *tv) {
+static inline ir_mode *_get_tarval_mode(const tarval *tv)
+{
assert(tv);
return tv->mode;
}
-static inline tarval *
-_get_tarval_bad(void) {
+static inline tarval *_get_tarval_bad(void)
+{
return tarval_bad;
}
-static inline tarval *
-_get_tarval_undefined(void) {
+static inline tarval *_get_tarval_undefined(void)
+{
return tarval_undefined;
}
-static inline tarval *
-_get_tarval_b_false(void) {
+static inline tarval *_get_tarval_b_false(void)
+{
return tarval_b_false;
}
-static inline tarval *
-_get_tarval_b_true(void) {
+static inline tarval *_get_tarval_b_true(void)
+{
return tarval_b_true;
}
-static inline tarval *
-_get_tarval_reachable(void) {
+static inline tarval *_get_tarval_reachable(void)
+{
return tarval_reachable;
}
-static inline tarval *
-_get_tarval_unreachable(void) {
+static inline tarval *_get_tarval_unreachable(void)
+{
return tarval_unreachable;
}
-static inline int
-_is_tarval(const void *thing) {
+static inline int _is_tarval(const void *thing)
+{
return get_kind(thing) == k_tarval;
}
static Py_ssize_t escaped_chars_delta_len[ESCAPED_CHARS_TABLE_SIZE];
static Py_UNICODE *escaped_chars_repl[ESCAPED_CHARS_TABLE_SIZE];
-static int
-init_constants(void)
+static int init_constants(void)
{
PyObject *module;
/* happing of characters to replace */
return 1;
}
-static PyObject*
-escape_unicode(PyUnicodeObject *in)
+static PyObject *escape_unicode(PyUnicodeObject *in)
{
PyUnicodeObject *out;
Py_UNICODE *inp = in->str;
}
-static PyObject*
-escape(PyObject *self, PyObject *text)
+static PyObject *escape(PyObject *self, PyObject *text)
{
PyObject *s = NULL, *rv = NULL, *html;
}
-static PyObject*
-soft_unicode(PyObject *self, PyObject *s)
+static PyObject *soft_unicode(PyObject *self, PyObject *s)
{
if (!PyUnicode_Check(s))
return PyObject_Unicode(s);
}
-static PyObject*
-tb_set_next(PyObject *self, PyObject *args)
+static PyObject *tb_set_next(PyObject *self, PyObject *args)
{
PyTracebackObject *tb, *old;
PyObject *next;