From: Matthias Braun Date: Mon, 12 Dec 2011 17:28:35 +0000 (+0100) Subject: remove more pointless end-brace comments X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=91941f564a3ce68ba7c62a601236ccd4bffde586;p=libfirm remove more pointless end-brace comments --- diff --git a/ir/debug/debugger.c b/ir/debug/debugger.c index 36cc742bd..b64ad3502 100644 --- a/ir/debug/debugger.c +++ b/ir/debug/debugger.c @@ -190,7 +190,7 @@ static const char __attribute__((used)) firm_debug_info_string[] = int firm_debug_active(void) { return is_active; -} /* firm_debug_active */ +} /** * Reset the debug text buffer. @@ -198,18 +198,18 @@ int firm_debug_active(void) static void reset_dbg_buf(void) { firm_dbg_msg_buf[0] = '\0'; -} /* reset_dbg_buf */ +} static void add_to_dbg_buf(const char *buf) { strncat(firm_dbg_msg_buf, buf, sizeof(firm_dbg_msg_buf)); -} /* add_to_dbg_buf */ +} const char *firm_debug_text(void) { firm_dbg_msg_buf[sizeof(firm_dbg_msg_buf) - 1] = '\0'; return firm_dbg_msg_buf; -} /* firm_debug_text */ +} /** * debug output @@ -233,7 +233,7 @@ static void dbg_printf(const char *fmt, ...) add_to_dbg_buf(buf); else puts(buf); -} /* dbg_printf */ +} /** * A new node is created. @@ -256,7 +256,7 @@ static void dbg_new_node(void *ctx, ir_graph *irg, ir_node *node) dbg_printf("Firm BP %u reached, %+F created\n", elem->bp.bpnr, node); firm_debug_break(); } -} /* dbg_new_node */ +} /** * A node is replaced. @@ -278,7 +278,7 @@ static void dbg_replace(void *ctx, ir_node *old, ir_node *nw) dbg_printf("Firm BP %u reached, %+F will be replaced by %+F\n", elem->bp.bpnr, old, nw); firm_debug_break(); } -} /* dbg_replace */ +} /** * A new node is lowered. @@ -299,7 +299,7 @@ static void dbg_lower(void *ctx, ir_node *node) dbg_printf("Firm BP %u reached, %+F will be lowered\n", elem->bp.bpnr, node); firm_debug_break(); } -} /* dbg_lower */ +} /** * A graph will be deleted. @@ -337,7 +337,7 @@ static void dbg_free_graph(void *ctx, ir_graph *irg) firm_debug_break(); } } -} /* dbg_free_graph */ +} /** * An entity was created. @@ -372,7 +372,7 @@ static void dbg_new_entity(void *ctx, ir_entity *ent) firm_debug_break(); } } -} /* dbg_new_entity */ +} /** * A type was created. @@ -395,7 +395,7 @@ static void dbg_new_type(void *ctx, ir_type *tp) firm_debug_break(); } } -} /* dbg_new_type */ +} /** * Return the reason string. @@ -412,7 +412,7 @@ static const char *reason_str(bp_reasons_t reason) case BP_MAX_REASON: break; } panic("unsupported reason"); -} /* reason_str */ +} /** * Compare two number breakpoints. @@ -424,7 +424,7 @@ static int cmp_nr_bp(const void *elt, const void *key, size_t size) (void) size; return (e1->nr - e2->nr) | (e1->bp.reason - e2->bp.reason); -} /* cmp_nr_bp */ +} /** * Compare two ident breakpoints. @@ -436,7 +436,7 @@ static int cmp_ident_bp(const void *elt, const void *key, size_t size) (void) size; return (e1->id != e2->id) | (e1->bp.reason - e2->bp.reason); -} /* cmp_ident_bp */ +} /** * Update the hooks. @@ -479,7 +479,7 @@ static void update_hooks(breakpoint *bp) } #undef CASE_ON #undef CASE_OFF -} /* update_hooks */ +} /** * Break if nr is reached. @@ -506,7 +506,7 @@ static void break_on_nr(long nr, bp_reasons_t reason) update_hooks(&elem->bp); } -} /* break_on_nr */ +} /** * Break if ident name is reached. @@ -533,7 +533,7 @@ static void break_on_ident(const char *name, bp_reasons_t reason) update_hooks(&elem->bp); } -} /* break_on_ident */ +} /** * Sets/resets the active flag of breakpoint bp. @@ -554,7 +554,7 @@ static void bp_activate(unsigned bp, int active) } } dbg_printf("Error: Firm BP %u not exists.\n", bp); -} /* bp_activate */ +} /** @@ -582,7 +582,7 @@ static void show_commands(void) "irgldname ldname prints address and graph number of a method given by its ldname\n" "help list all commands\n" ); -} /* show_commands */ +} /** * Shows all Firm breakpoints. @@ -614,7 +614,7 @@ static void show_bp(void) dbg_printf(p->active ? "+enabled" : "+disabled"); } dbg_printf(have_one ? "+\n" : "+ NONE\n"); -} /* show_bp */ +} /** * firm_dbg_register() expects that the name is stored persistent. @@ -625,7 +625,7 @@ static firm_dbg_module_t *dbg_register(const char *name) ident *id = new_id_from_str(name); return firm_dbg_register(get_id_str(id)); -} /* dbg_register */ +} /** * Sets the debug mask of module name to lvl @@ -639,7 +639,7 @@ static void set_dbg_level(const char *name, unsigned lvl) dbg_printf("Setting debug mask of module %s to %u\n", name, lvl); } -} /* set_dbg_level */ +} /** * Redirects the debug output of module name to fname @@ -656,7 +656,7 @@ static void set_dbg_outfile(const char *name, const char *fname) firm_dbg_set_file(module, f); dbg_printf("Redirecting debug output of module %s to file %s\n", name, fname); -} /* set_dbg_outfile */ +} /** * Show info about a firm thing. @@ -693,7 +693,7 @@ static void show_firm_object(void *firm_thing) default: fprintf(f, "Cannot identify thing at (%p).\n", firm_thing); } -} /* show_firm_object */ +} /** * Find a firm type by its number. @@ -712,7 +712,7 @@ static ir_type *find_type_nr(long nr) if (get_type_nr(tp) == nr) return tp; return NULL; -} /* find_type_nr */ +} /** * Find a firm type by its name. @@ -734,7 +734,7 @@ static ir_type *find_type_name(const char *name) if (strcmp(get_compound_name(tp), name) == 0) return tp; return NULL; -} /* find_type_name */ +} /** The environment for the entity search functions. */ typedef struct find_env { @@ -757,7 +757,7 @@ static void check_ent_nr(type_or_ent tore, void *ctx) env->res = tore.ent; } } -} /* check_ent_nr */ +} /** * Type-walker: Find an entity with given name. @@ -770,7 +770,7 @@ static void check_ent_name(type_or_ent tore, void *ctx) if (strcmp(get_entity_name(tore.ent), env->u.name) == 0) { env->res = tore.ent; } -} /* check_ent_name */ +} /** * Find a firm entity by its number. @@ -783,7 +783,7 @@ static ir_entity *find_entity_nr(long nr) env.res = NULL; type_walk(check_ent_nr, NULL, &env); return env.res; -} /* find_entity_nr */ +} /** * Find a firm entity by its name. @@ -796,7 +796,7 @@ static ir_entity *find_entity_name(const char *name) env.res = NULL; type_walk(check_ent_name, NULL, &env); return env.res; -} /* find_entity_name */ +} /** * Search methods for a name. @@ -825,7 +825,7 @@ static void show_by_name(type_or_ent tore, void *env) } } } -} /* show_by_name */ +} /** * Search methods for a ldname. @@ -854,7 +854,7 @@ static void show_by_ldname(type_or_ent tore, void *env) } } } -} /* show_by_ldname */ +} /** * prints the address and graph number of all irgs with given name @@ -864,7 +864,7 @@ static void irg_name(const char *name) ident *id = new_id_from_str(name); type_walk(show_by_name, NULL, (void *)id); -} /* irg_name */ +} /** * prints the address and graph number of all irgs with given ld_name @@ -874,7 +874,7 @@ static void irg_ld_name(const char *name) ident *id = new_id_from_str(name); type_walk(show_by_ldname, NULL, (void *)id); -} /* irg_ld_name */ +} enum tokens { tok_create = 256, @@ -945,7 +945,7 @@ static void init_lexer(const char *input) lexer.has_token = 0; lexer.curr_pos = input; lexer.end_pos = input + strlen(input); -} /* init_lexer */ +} /** @@ -956,7 +956,7 @@ static char next_char(void) if (lexer.curr_pos >= lexer.end_pos) return '\0'; return *lexer.curr_pos++; -} /* next_char */ +} #define unput() if (lexer.curr_pos < lexer.end_pos) --lexer.curr_pos @@ -1044,7 +1044,7 @@ static unsigned get_token(void) else if (c == '\0') return tok_eof; return c; -} /* get_token */ +} void firm_debug(const char *cmd) { @@ -1260,7 +1260,7 @@ error: } leave: ; -} /* firm_debug */ +} void firm_init_debugger(void) { @@ -1278,7 +1278,7 @@ void firm_init_debugger(void) if (break_on_init) firm_debug_break(); -} /* firm_init_debugger */ +} /** * A gdb helper function to print firm objects. diff --git a/ir/lower/lower_hl.c b/ir/lower/lower_hl.c index 292921ca6..d767d17b3 100644 --- a/ir/lower/lower_hl.c +++ b/ir/lower/lower_hl.c @@ -268,7 +268,7 @@ static void lower_symconst(ir_node *symc) assert(!"unknown SymConst kind"); break; } -} /* lower_symconst */ +} /** * Checks, whether a size is an integral size @@ -282,7 +282,7 @@ static int is_integral_size(int size) return 0; /* must be at least byte size */ return size >= 8; -} /* is_integral_size */ +} /** * lower bitfield load access. @@ -372,7 +372,7 @@ static void lower_bitfields_loads(ir_node *proj, ir_node *load) } exchange(proj, res); -} /* lower_bitfields_loads */ +} /** * lower bitfield store access. @@ -456,7 +456,7 @@ static void lower_bitfields_stores(ir_node *store) set_Store_mem(store, mem); set_Store_value(store, value); set_Store_ptr(store, ptr); -} /* lower_bitfields_stores */ +} /** * lowers IR-nodes, called from walker @@ -534,7 +534,7 @@ static int lower_highlevel_graph_wrapper(ir_graph *irg, void *context) lower_highlevel_graph(irg); return 0; -} /* lower_highlevel_graph_wrapper */ +} ir_graph_pass_t *lower_highlevel_graph_pass(const char *name) { @@ -542,7 +542,7 @@ ir_graph_pass_t *lower_highlevel_graph_pass(const char *name) return def_graph_pass_constructor( &pass->pass, name ? name : "lower_hl", lower_highlevel_graph_wrapper); -} /* lower_highlevel_graph_pass */ +} /* * does the same as lower_highlevel() for all nodes on the const code irg @@ -550,7 +550,7 @@ ir_graph_pass_t *lower_highlevel_graph_pass(const char *name) void lower_const_code(void) { walk_const_code(NULL, lower_irnode, NULL); -} /* lower_const_code */ +} ir_prog_pass_t *lower_const_code_pass(const char *name) { @@ -572,4 +572,4 @@ void lower_highlevel() lower_highlevel_graph(irg); } lower_const_code(); -} /* lower_highlevel */ +} diff --git a/ir/lower/lower_intrinsics.c b/ir/lower/lower_intrinsics.c index e8b677b25..45b3791c5 100644 --- a/ir/lower/lower_intrinsics.c +++ b/ir/lower/lower_intrinsics.c @@ -89,7 +89,7 @@ static void call_mapper(ir_node *node, void *env) } } } -} /* call_mapper */ +} /* Go through all graphs and map calls to intrinsic functions. */ size_t lower_intrinsics(i_record *list, size_t length, int part_block_used) @@ -153,7 +153,7 @@ size_t lower_intrinsics(i_record *list, size_t length, int part_block_used) pmap_destroy(c_map); return nr_of_intrinsics; -} /* lower_intrinsics */ +} typedef struct pass_t { ir_prog_pass_t pass; @@ -194,7 +194,7 @@ ir_prog_pass_t *lower_intrinsics_pass( return def_prog_pass_constructor( &pass->pass, name ? name : "lower_intrinsics", pass_wrapper); -} /* lower_intrinsics_pass*/ +} /** * Helper function, replace the call by the given node. @@ -259,7 +259,7 @@ int i_mapper_abs(ir_node *call, void *ctx) DBG_OPT_ALGSIM0(call, mux, FS_OPT_RTS_ABS); replace_call(mux, call, mem, NULL, NULL); return 1; -} /* i_mapper_abs */ +} /* A mapper for the integer bswap. */ int i_mapper_bswap(ir_node *call, void *ctx) @@ -277,7 +277,7 @@ int i_mapper_bswap(ir_node *call, void *ctx) irn = new_r_Proj(irn, get_irn_mode(op), pn_Builtin_max+1); replace_call(irn, call, mem, NULL, NULL); return 1; -} /* i_mapper_bswap */ +} /* A mapper for the alloca() function. */ int i_mapper_alloca(ir_node *call, void *ctx) @@ -313,7 +313,7 @@ int i_mapper_alloca(ir_node *call, void *ctx) DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_ALLOCA); replace_call(irn, call, mem, no_exc, exc); return 1; -} /* i_mapper_alloca */ +} /* A mapper for the floating point sqrt. */ int i_mapper_sqrt(ir_node *call, void *ctx) @@ -336,7 +336,7 @@ int i_mapper_sqrt(ir_node *call, void *ctx) DBG_OPT_ALGSIM0(call, op, FS_OPT_RTS_SQRT); replace_call(op, call, mem, NULL, NULL); return 1; -} /* i_mapper_sqrt */ +} /* A mapper for the floating point cbrt. */ int i_mapper_cbrt(ir_node *call, void *ctx) @@ -359,7 +359,7 @@ int i_mapper_cbrt(ir_node *call, void *ctx) DBG_OPT_ALGSIM0(call, op, FS_OPT_RTS_CBRT); replace_call(op, call, mem, NULL, NULL); return 1; -} /* i_mapper_cbrt */ +} /* A mapper for the floating point pow. */ int i_mapper_pow(ir_node *call, void *ctx) @@ -416,7 +416,7 @@ int i_mapper_pow(ir_node *call, void *ctx) DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_POW); replace_call(irn, call, mem, reg_jmp, exc_jmp); return 1; -} /* i_mapper_pow */ +} /* A mapper for the floating point exp. */ int i_mapper_exp(ir_node *call, void *ctx) @@ -435,7 +435,7 @@ int i_mapper_exp(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_exp */ +} /** * A mapper for mapping f(0.0) to 0.0. @@ -453,7 +453,7 @@ static int i_mapper_zero_to_zero(ir_node *call, void *ctx, int reason) return 1; } return 0; -} /* i_mapper_zero_to_zero */ +} /** * A mapper for mapping f(1.0) to 0.0. @@ -474,7 +474,7 @@ static int i_mapper_one_to_zero(ir_node *call, void *ctx, int reason) return 1; } return 0; -} /* i_mapper_one_to_zero */ +} /** * A mapper for mapping a functions with the following characteristics: @@ -524,77 +524,77 @@ static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason) changed = 1; } return changed; -} /* i_mapper_symmetric_zero_to_one */ +} /* A mapper for the floating point log. */ int i_mapper_log(ir_node *call, void *ctx) { /* log(1.0) = 0.0 */ return i_mapper_one_to_zero(call, ctx, FS_OPT_RTS_LOG); -} /* i_mapper_log */ +} /* A mapper for the floating point sin. */ int i_mapper_sin(ir_node *call, void *ctx) { /* sin(0.0) = 0.0 */ return i_mapper_zero_to_zero(call, ctx, FS_OPT_RTS_SIN); -} /* i_mapper_sin */ +} /* A mapper for the floating point cos. */ int i_mapper_cos(ir_node *call, void *ctx) { /* cos(0.0) = 1.0, cos(-x) = x */ return i_mapper_symmetric_zero_to_one(call, ctx, FS_OPT_RTS_COS); -} /* i_mapper_cos */ +} /* A mapper for the floating point tan. */ int i_mapper_tan(ir_node *call, void *ctx) { /* tan(0.0) = 0.0 */ return i_mapper_zero_to_zero(call, ctx, FS_OPT_RTS_TAN); -} /* i_mapper_tan */ +} /* A mapper for the floating point asin. */ int i_mapper_asin(ir_node *call, void *ctx) { /* asin(0.0) = 0.0 */ return i_mapper_zero_to_zero(call, ctx, FS_OPT_RTS_ASIN); -} /* i_mapper_asin */ +} /* A mapper for the floating point acos. */ int i_mapper_acos(ir_node *call, void *ctx) { /* acos(1.0) = 0.0 */ return i_mapper_one_to_zero(call, ctx, FS_OPT_RTS_ACOS); -} /* i_mapper_acos */ +} /* A mapper for the floating point atan. */ int i_mapper_atan(ir_node *call, void *ctx) { /* atan(0.0) = 0.0 */ return i_mapper_zero_to_zero(call, ctx, FS_OPT_RTS_ATAN); -} /* i_mapper_atan */ +} /* A mapper for the floating point sinh. */ int i_mapper_sinh(ir_node *call, void *ctx) { /* sinh(0.0) = 0.0 */ return i_mapper_zero_to_zero(call, ctx, FS_OPT_RTS_SINH); -} /* i_mapper_sinh */ +} /* A mapper for the floating point cosh. */ int i_mapper_cosh(ir_node *call, void *ctx) { /* cosh(0.0) = 1.0, cosh(-x) = x */ return i_mapper_symmetric_zero_to_one(call, ctx, FS_OPT_RTS_COSH); -} /* i_mapper_cosh */ +} /* A mapper for the floating point tanh. */ int i_mapper_tanh(ir_node *call, void *ctx) { /* tanh(0.0) = 0.0 */ return i_mapper_zero_to_zero(call, ctx, FS_OPT_RTS_TANH); -} /* i_mapper_tanh */ +} /** * Return the const entity that is accessed through the pointer ptr or @@ -613,7 +613,7 @@ static ir_entity *get_const_entity(ir_node *ptr) } } return NULL; -} /* get_const_entity */ +} static bool initializer_val_is_null(ir_initializer_t *init) { @@ -697,7 +697,7 @@ static ir_node *eval_strlen(ir_graph *irg, ir_entity *ent, ir_type *res_tp) } return NULL; -} /* eval_strlen */ +} /* A mapper for strlen */ int i_mapper_strlen(ir_node *call, void *ctx) @@ -724,7 +724,7 @@ int i_mapper_strlen(ir_node *call, void *ctx) } } return 0; -} /* i_mapper_strlen */ +} /** * Calculate the value of strlen if possible. @@ -817,7 +817,7 @@ static ir_node *eval_strcmp(ir_graph *irg, ir_entity *left, ir_entity *right, /* TODO */ return NULL; -} /* eval_strcmp */ +} /** * Checks if an entity represents the empty string. @@ -864,7 +864,7 @@ static int is_empty_string(ir_entity *ent) init0 = get_initializer_compound_value(initializer, 0); return initializer_val_is_null(init0); -} /* is_empty_string */ +} /* A mapper for strcmp */ int i_mapper_strcmp(ir_node *call, void *ctx) @@ -961,7 +961,7 @@ replace_by_call: } return 0; -} /* i_mapper_strcmp */ +} /* A mapper for strncmp */ int i_mapper_strncmp(ir_node *call, void *ctx) @@ -989,7 +989,7 @@ int i_mapper_strncmp(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_strncmp */ +} /* A mapper for strcpy */ int i_mapper_strcpy(ir_node *call, void *ctx) @@ -1008,7 +1008,7 @@ int i_mapper_strcpy(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_strcpy */ +} /* A mapper for memcpy */ int i_mapper_memcpy(ir_node *call, void *ctx) @@ -1028,7 +1028,7 @@ int i_mapper_memcpy(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_memcpy */ +} /* A mapper for mempcpy */ int i_mapper_mempcpy(ir_node *call, void *ctx) @@ -1052,7 +1052,7 @@ int i_mapper_mempcpy(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_mempcpy */ +} /* A mapper for memmove */ int i_mapper_memmove(ir_node *call, void *ctx) @@ -1072,7 +1072,7 @@ int i_mapper_memmove(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_memmove */ +} /* A mapper for memset */ int i_mapper_memset(ir_node *call, void *ctx) @@ -1090,7 +1090,7 @@ int i_mapper_memset(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_memset */ +} /* A mapper for memcmp */ int i_mapper_memcmp(ir_node *call, void *ctx) @@ -1118,7 +1118,7 @@ int i_mapper_memcmp(ir_node *call, void *ctx) return 1; } return 0; -} /* i_mapper_memcmp */ +} /** * Returns the result mode of a node. @@ -1131,7 +1131,7 @@ static ir_mode *get_irn_res_mode(ir_node *node) case iro_Mod: return get_Mod_resmode(node); default: return NULL; } -} /* get_irn_res_mode */ +} #define LMAX(a, b) ((a) > (b) ? (a) : (b)) @@ -1264,4 +1264,4 @@ int i_mapper_RuntimeCall(ir_node *node, runtime_rt *rt) } /* should not happen */ return 0; -} /* i_mapper_RuntimeCall */ +} diff --git a/ir/opt/critical_edges.c b/ir/opt/critical_edges.c index bffa731d1..11b282d55 100644 --- a/ir/opt/critical_edges.c +++ b/ir/opt/critical_edges.c @@ -89,9 +89,9 @@ insert: /* set successor of new block */ set_irn_n(n, i, jmp); cenv->changed = 1; - } /* predecessor has multiple successors */ - } /* for all predecessors */ - } /* n is a multi-entry block */ + } + } + } } void remove_critical_cf_edges_ex(ir_graph *irg, int ignore_exception_edges) diff --git a/ir/stat/pattern.c b/ir/stat/pattern.c index a112561af..ddca8da01 100644 --- a/ir/stat/pattern.c +++ b/ir/stat/pattern.c @@ -183,7 +183,7 @@ static inline void put_byte(CODE_BUFFER *buf, BYTE byte) buf->hash = (buf->hash * 9) ^ byte; } else { buf->overrun = 1; - } /* if */ + } } /* put_byte */ /**