#include <stdlib.h>
-#ifdef WIN32
-#include <malloc.h>
-#else
-#include <alloca.h>
+#ifdef HAVE_MALLOC_H
+ #include <malloc.h>
+#endif
+#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
#endif
#include "hashptr.h"
dom_front_info_t *be_compute_dominance_frontiers(ir_graph *irg)
{
- dom_front_info_t *info = malloc(sizeof(*info));
+ dom_front_info_t *info = xmalloc(sizeof(*info));
edges_assure(irg);
info->df_map = pmap_create();
ir_node **ins = xmalloc(n_preds * sizeof(ins[0]));
for(i = 0; i < n_preds; ++i)
- ins[i] = new_r_Unknown(irg, mode);
+ ins[i] = new_r_Bad(irg);
phi = new_r_Phi(irg, curr_bl, n_preds, ins, mode);
DBG((dbg, LEVEL_2, "\tcreating phi %+F in %+F\n", phi, curr_bl));
if(n == 0)
return NULL;
- nodes = malloc(n * sizeof(nodes[0]));
+ nodes = xmalloc(n * sizeof(nodes[0]));
DBG((dbg, LEVEL_1, "live:\n"));
for(irn = pset_first(live), i = 0; irn; irn = pset_next(live), i++) {