* Start block misses control dead blocks.
*/
static void init_tmp_dom_info(ir_node *bl, tmp_dom_info *parent,
- tmp_dom_info *tdi_list, int *used, int n_blocks) {
+ tmp_dom_info *tdi_list, int *used, int n_blocks)
+{
tmp_dom_info *tdi;
int i;
* End block misses blocks in endless loops.
*/
static void init_tmp_pdom_info(ir_node *bl, tmp_dom_info *parent,
- tmp_dom_info *tdi_list, int* used, int n_blocks) {
+ tmp_dom_info *tdi_list, int* used, int n_blocks)
+{
tmp_dom_info *tdi;
int i;
}
static void irg_out_walk_2(ir_node *node, irg_walk_func *pre,
- irg_walk_func *post, void *env) {
+ irg_walk_func *post, void *env)
+{
int i, n;
ir_node *succ;
if (post) post(node, env);
}
-void irg_out_walk(ir_node *node,
- irg_walk_func *pre, irg_walk_func *post,
- void *env) {
+void irg_out_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post,
+ void *env)
+{
assert(node);
if (get_irg_outs_state(current_ir_graph) != outs_none) {
inc_irg_visited (current_ir_graph);
}
}
-static void irg_out_block_walk2(ir_node *bl,
- irg_walk_func *pre, irg_walk_func *post,
- void *env) {
+static void irg_out_block_walk2(ir_node *bl, irg_walk_func *pre,
+ irg_walk_func *post, void *env)
+{
int i, n;
if (!Block_block_visited(bl)) {
/* Walks only over Block nodes in the graph. Has it's own visited
flag, so that it can be interleaved with the other walker. */
-void irg_out_block_walk(ir_node *node,
- irg_walk_func *pre, irg_walk_func *post,
- void *env) {
+void irg_out_block_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post,
+ void *env)
+{
assert(is_Block(node) || (get_irn_mode(node) == mode_X));
* Create a new Switch/case region.
*/
static ir_region *new_SwitchCase(struct obstack *obst, ir_region_kind type, ir_region *head, ir_region *exit,
- ir_region *cases, int cases_len) {
+ ir_region *cases, int cases_len)
+{
ir_region *reg, *c, *n;
int i;
int add = 1;
* @return The loop analysis object.
*/
be_loopana_t *be_new_loop_pressure_cls(be_irg_t *birg,
- const arch_register_class_t *cls) {
+ const arch_register_class_t *cls)
+{
ir_graph *irg = be_get_birg_irg(birg);
be_loopana_t *loop_ana = XMALLOC(be_loopana_t);
void be_assure_state(be_irg_t *birg, const arch_register_t *reg, void *func_env,
create_spill_func create_spill,
- create_reload_func create_reload) {
+ create_reload_func create_reload)
+{
minibelady_env_t env;
ir_graph *irg = be_get_birg_irg(birg);
spill_info_t *info;
* Start a walk over the irg and check the register pressure.
*/
int be_verify_register_pressure(const be_irg_t *birg,
- const arch_register_class_t *cls,
- ir_graph *irg) {
+ const arch_register_class_t *cls, ir_graph *irg)
+{
be_verify_register_pressure_env_t env;
env.lv = be_liveness(irg);
void init_ppc32_attributes(ir_node *node, int flags,
const arch_register_req_t **in_reqs,
const be_execution_unit_t ***execution_units,
- int n_res) {
+ int n_res)
+{
ir_graph *irg = get_irn_irg(node);
struct obstack *obst = get_irg_obstack(irg);
ppc32_attr_t *attr = get_ppc32_attr(node);
ir_node *new_rd_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) {
+ int n_clobber, ident *clobber[], ident *asm_text)
+{
ir_node *res;
ir_graph *rem = current_ir_graph;
{
return new_rd_Const_type(NULL, irg, con, tp);
}
-ir_node *new_r_SymConst(ir_graph *irg, ir_mode *mode,
- symconst_symbol value, symconst_kind symkind) {
+ir_node *new_r_SymConst(ir_graph *irg, ir_mode *mode, symconst_symbol value,
+ symconst_kind symkind)
+{
return new_rd_SymConst(NULL, irg, mode, value, symkind);
}
-ir_node *new_r_simpleSel(ir_node *block, ir_node *store,
- ir_node *objptr, ir_entity *ent) {
+ir_node *new_r_simpleSel(ir_node *block, ir_node *store, ir_node *objptr,
+ ir_entity *ent)
+{
return new_rd_Sel(NULL, block, store, objptr, 0, NULL, ent);
}
ir_node *new_r_Phi(ir_node *block, int arity, ir_node **in, ir_mode *mode)
ir_node *new_r_ASM(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) {
+ int n_clobber, ident *clobber[], ident *asm_text)
+{
return new_rd_ASM(NULL, block, arity, in, inputs, n_outs, outputs, n_clobber, clobber, asm_text);
}
}
ir_node *new_ASM(int arity, ir_node *in[], ir_asm_constraint *inputs,
int n_outs, ir_asm_constraint *outputs,
- int n_clobber, ident *clobber[], ident *asm_text) {
+ int n_clobber, ident *clobber[], ident *asm_text)
+{
return new_d_ASM(NULL, arity, in, inputs, n_outs, outputs, n_clobber, clobber, asm_text);
}
return 0;
}
-ir_prog_pass_t *dump_all_ir_graph_pass(
- const char *name, dump_graph_func *dump_graph, const char *suffix) {
+ir_prog_pass_t *dump_all_ir_graph_pass(const char *name,
+ dump_graph_func *dump_graph,
+ const char *suffix)
+{
size_t len = strlen(suffix);
struct pass_t *pass = xmalloc(sizeof(*pass) + len);
ir_prog_pass_t *res = def_prog_pass_constructor(
static void dump_node_list(FILE *F, firm_kind *k, char *prefix,
int (*get_entity_n_nodes)(firm_kind *ent),
ir_node *(*get_entity_node)(firm_kind *ent, int pos),
- char *name) {
+ char *name)
+{
int i, n_nodes = get_entity_n_nodes(k);
char *comma = "";
static void dump_type_list(FILE *F, ir_type *tp, char *prefix,
int (*get_n_types)(const ir_type *tp),
ir_type *(*get_type)(const ir_type *tp, int pos),
- const char *name) {
+ const char *name)
+{
int i, n_nodes = get_n_types(tp);
char *comma = "";
* Dump initializers.
*/
static void dump_ir_initializers_to_file(FILE *F, const char *prefix,
- const ir_initializer_t *initializer, ir_type *type) {
+ const ir_initializer_t *initializer, ir_type *type)
+{
tarval *tv;
ir_node *value;
}
}
-static void irg_block_edges_walk2(ir_node *bl,
- irg_walk_func *pre, irg_walk_func *post,
- void *env) {
+static void irg_block_edges_walk2(ir_node *bl, irg_walk_func *pre,
+ irg_walk_func *post, void *env)
+{
const ir_edge_t *edge, *next;
if (!Block_block_visited(bl)) {
}
}
-void irg_block_edges_walk(ir_node *node,
- irg_walk_func *pre, irg_walk_func *post,
- void *env) {
-
+void irg_block_edges_walk(ir_node *node, irg_walk_func *pre,
+ irg_walk_func *post, void *env)
+{
assert(edges_activated(current_ir_graph));
assert(is_Block(node));
* walk over a graph block wise
*/
void irg_block_walk_graph(ir_graph *irg, irg_walk_func *pre,
- irg_walk_func *post, void *env) {
+ irg_walk_func *post, void *env)
+{
ir_graph * rem = current_ir_graph;
current_ir_graph = irg;
irg_block_walk(get_irg_end(irg), pre, post, env);
* @param nodemap Pointer to the nodemap
*/
void ir_lnk_nodemap_iterator_init(ir_lnk_nodemap_iterator_t *iterator,
- const ir_lnk_nodemap_t *nodemap) {
+ const ir_lnk_nodemap_t *nodemap)
+{
iterator->iter = nodemap->elem_list.next;
iterator->nodemap = nodemap;
}
* @param iterator Pointer to the nodemap iterator.
*/
void ir_lnk_nodemap_remove_iterator(ir_lnk_nodemap_t *nodemap,
- ir_lnk_nodemap_iterator_t *iterator) {
+ ir_lnk_nodemap_iterator_t *iterator)
+{
ir_lnk_nodemap_entry_t *rem = list_entry(iterator->iter->prev, ir_lnk_nodemap_entry_t, list);
ir_lnk_nodemap_remove(nodemap, rem->node);
* @param nodeset Pointer to the nodeset
*/
void ir_lnk_nodeset_iterator_init(ir_lnk_nodeset_iterator_t *iterator,
- const ir_lnk_nodeset_t *nodeset) {
+ const ir_lnk_nodeset_t *nodeset)
+{
iterator->iter = nodeset->elem_list.next;
iterator->nodeset = nodeset;
}
* @param iterator Pointer to the nodeset iterator.
*/
void ir_lnk_nodeset_remove_iterator(ir_lnk_nodeset_t *nodeset,
- ir_lnk_nodeset_iterator_t *iterator) {
+ ir_lnk_nodeset_iterator_t *iterator)
+{
ir_lnk_nodeset_entry_t *rem = list_entry(iterator->iter->prev, ir_lnk_nodeset_entry_t, list);
ir_lnk_nodeset_remove(nodeset, rem->node);
}
void ir_valueset_iterator_init(ir_valueset_iterator_t *iterator,
- const ir_valueset_t *valueset) {
+ const ir_valueset_t *valueset)
+{
iterator->iter = valueset->elem_list.next;
iterator->valueset = valueset;
}
*/
static ir_node *get_intrinsic_address(ir_type *method, ir_op *op,
ir_mode *imode, ir_mode *omode,
- lower_env_t *env) {
+ lower_env_t *env)
+{
symconst_symbol sym;
ir_entity *ent;
op_mode_entry_t key, *entry;
* @return *P
*/
static partition_t *split_by_what(partition_t *X, what_func What,
- partition_t **P, environment_t *env) {
+ partition_t **P, environment_t *env)
+{
node_t *x, *S;
listmap_t map;
listmap_entry_t *iter;
* delta value for the loop depth
*/
static call_entry *duplicate_call_entry(const call_entry *entry,
- ir_node *new_call, int loop_depth_delta) {
+ ir_node *new_call, int loop_depth_delta)
+{
call_entry *nentry = OALLOC(&temp_obst, call_entry);
nentry->call = new_call;
nentry->callee = entry->callee;
/* create a pass for inline_leave_functions() */
ir_prog_pass_t *inline_leave_functions_pass(
const char *name, unsigned maxsize, unsigned leavesize,
- unsigned size, int ignore_runtime) {
+ unsigned size, int ignore_runtime)
+{
struct inline_leave_functions_pass_t *pass =
XMALLOCZ(struct inline_leave_functions_pass_t);
/* create a ir_prog pass for inline_functions */
ir_prog_pass_t *inline_functions_pass(
const char *name, unsigned maxsize, int inline_threshold,
- opt_ptr after_inline_opt) {
+ opt_ptr after_inline_opt)
+{
struct inline_functions_pass_t *pass =
XMALLOCZ(struct inline_functions_pass_t);
/* create an ir_pog pass */
ir_prog_pass_t *stat_dump_snapshot_pass(
- const char *name, const char *fname, const char *phase) {
+ const char *name, const char *fname, const char *phase)
+{
struct pass_t *pass = XMALLOCZ(struct pass_t);
def_prog_pass_constructor(
}
}
-void type_walk_super(type_walk_func *pre,
- type_walk_func *post,
- void *env) {
+void type_walk_super(type_walk_func *pre, type_walk_func *post, void *env)
+{
int i, n_types = get_irp_n_types();
type_or_ent cont;
* Find the longest chain of a pset
*/
static HRESULT find_longest_pset_chain(DEBUGHELPER *pHelper, pset *set,
- int *chains, int *lenght, size_t *size) {
+ int *chains, int *lenght, size_t *size)
+{
unsigned i, j;
pset_Segment *seg, *curr;
pset_Element elem;
* Find the longest chain of a set
*/
static HRESULT find_longest_set_chain(DEBUGHELPER *pHelper, set *set,
- int *chains, int *lenght, size_t *size) {
+ int *chains, int *lenght, size_t *size)
+{
unsigned i, j;
set_Segment *seg, *curr;
set_Element elem;