* @date 18.11.2005
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include <stdlib.h>
#include "irgraph_t.h"
#include "irgwalk.h"
-#include "bearch_t.h"
+#include "bearch.h"
#include "be_t.h"
#include "bera.h"
#include "beifg_t.h"
adj_head = ifg->adj_heads[irn->node_idx];
if (!adj_head)
{
- adj_head = obstack_alloc(&ifg->obst, sizeof(*adj_head));
+ adj_head = OALLOC(&ifg->obst, adj_head_t);
adj_head->irn = irn;
adj_head->first_adj_element = NULL;
adj_head->degree = 0;
{
adj_element_t *element = NULL;
- element = obstack_alloc(&ifg->obst, sizeof(*element));
+ element = OALLOC(&ifg->obst, adj_element_t);
element->next_adj_element = NULL;
element->neighbour = irn;
be_ifg_t *be_ifg_list_new(const be_chordal_env_t *env)
{
- ifg_list_t *ifg = xmalloc(sizeof(*ifg));
- adj_head_t **adj_heads_array = xmalloc(env->irg->last_node_idx * sizeof(adj_heads_array[0]));
+ ifg_list_t *ifg = XMALLOC(ifg_list_t);
+ adj_head_t **adj_heads_array = XMALLOCNZ(adj_head_t*, env->irg->last_node_idx);
ifg->impl = &ifg_list_impl;
ifg->env = env;
- memset(adj_heads_array, 0, env->irg->last_node_idx * sizeof(adj_heads_array[0]));
ifg->adj_heads = adj_heads_array;
obstack_init(&ifg->obst);