X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeifg_pointer.c;h=9d39d3cbd3f3e68a3c708a0c9c99d01674539b59;hb=0378ccc621a98322785250f96d85d3b32dc0cad1;hp=5f0b0e9baf61d8188cbd140f72b4d137dd7a968c;hpb=9e56dbf066d3698df877e2a9f78caeca29ea5a03;p=libfirm diff --git a/ir/be/beifg_pointer.c b/ir/be/beifg_pointer.c index 5f0b0e9ba..9d39d3cbd 100644 --- a/ir/be/beifg_pointer.c +++ b/ir/be/beifg_pointer.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -24,9 +24,7 @@ * @date 18.11.2005 * @version $Id$ */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif #include @@ -85,7 +83,7 @@ typedef struct _ptr_iter_t { /* PRIVATE FUNCTIONS */ -static void *ptr_irn_data_init(ir_phase *ph, ir_node *irn, void *data) +static void *ptr_irn_data_init(ir_phase *ph, const ir_node *irn, void *data) { ptr_head_t *head = phase_alloc(ph, sizeof(*head)); (void) irn; @@ -96,14 +94,13 @@ static void *ptr_irn_data_init(ir_phase *ph, ir_node *irn, void *data) static ptr_element_t *ptr_get_new_element(ifg_pointer_t *ifg) { - ptr_element_t *new_element = obstack_alloc(&ifg->obst, sizeof(ptr_element_t)); - memset(new_element, 0, sizeof(*new_element)); + ptr_element_t *new_element = OALLOCZ(&ifg->obst, ptr_element_t); return new_element; } static ptr_head_t *ptr_get_new_head(ifg_pointer_t *ifg) { - ptr_head_t *new_element = obstack_alloc(&ifg->obst, sizeof(*new_element)); + ptr_head_t *new_element = OALLOC(&ifg->obst, ptr_head_t); INIT_LIST_HEAD(&new_element->list); return new_element; } @@ -614,8 +611,6 @@ static void ifg_pointer_neighbours_break(const void *self, void *iter) (void) self; bitset_free(it->visited_neighbours); - - return; } static ir_node *ifg_pointer_nodes_begin(const void *self, void *iter) @@ -672,7 +667,7 @@ static const be_ifg_impl_t ifg_pointer_impl = { be_ifg_t *be_ifg_pointer_new(const be_chordal_env_t *env) { - ifg_pointer_t *ifg = xmalloc(sizeof(*ifg)); + ifg_pointer_t *ifg = XMALLOC(ifg_pointer_t); ifg->impl = &ifg_pointer_impl; ifg->env = env;