X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Fircgcons.c;h=ca32dea81287e988790a9aa071817bfe4fcad0a5;hb=79b409329e8b6e9f43ac71df6599372fa0dbe497;hp=f6596d66105e460cc0f6a4e841bb9919399b583f;hpb=4b1138a9eee25ce11adbb7d7162eaa49421e8b51;p=libfirm diff --git a/ir/ir/ircgcons.c b/ir/ir/ircgcons.c index f6596d661..ca32dea81 100644 --- a/ir/ir/ircgcons.c +++ b/ir/ir/ircgcons.c @@ -25,9 +25,7 @@ * @date 09.06.2002 * @version $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif +#include "config.h" #ifdef INTERPROCEDURAL_VIEW @@ -69,10 +67,9 @@ typedef struct { ir_node * except, * except_mem; /* EndExcept and Mem for exception return */ } irg_data_t; -static irg_data_t * irg_data_create(void) { - irg_data_t *data = xmalloc(sizeof(*data)); - memset(data, 0, sizeof(*data)); /* init */ - return data; +static irg_data_t * irg_data_create(void) +{ + return XMALLOCZ(irg_data_t); } /** Count the number of callers of each method and mark open methods. @@ -114,7 +111,7 @@ static void caller_init(int arr_length, ir_entity ** free_methods) { } /* -static INLINE ir_node * tail(ir_node * node) { +static inline ir_node * tail(ir_node * node) { ir_node * link; for (; (link = get_irn_link(node)); node = link) ; return node; @@ -206,6 +203,7 @@ static ir_node * create_Block(int n, ir_node ** in) { ir_node * block; set_optimize(0); block = new_Block(n, in); + set_cur_block(block); set_optimize(rem_opt); return block; } @@ -219,7 +217,7 @@ static void prepare_irg_end_except(ir_graph * irg, irg_data_t * data); * cause cycles we don't want to see, as Unknwon is in the Start Block * of the procedure. Use unknown of outermost irg where the start * block has no predecessors. */ -static INLINE ir_node *get_cg_Unknown(ir_mode *m) { +static inline ir_node *get_cg_Unknown(ir_mode *m) { assert((get_Block_n_cfgpreds(get_irg_start_block(get_irp_main_irg())) == 1) && (get_nodes_block(get_Block_cfgpred(get_irg_start_block(get_irp_main_irg()), 0)) == get_irg_start_block(get_irp_main_irg())));