* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+
#include <stdbool.h>
#include "ircgcons.h"
* Aufrufrelation bestimmt.
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include "ircgopt.h"
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
+#endif
+
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
#endif
# include "irgraph_t.h"
# include "iropt_t.h"
# include "irgmod.h"
# include "array.h"
-/* memset belongs to string.h */
-# include "string.h"
# include "irbackedge_t.h"
# include "irflag_t.h"
* Copyright: (c) 1998-2003 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
-
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
#include <stdarg.h>
#include "firm_common_t.h"
/*
* Project: libFIRM
- * File name: ir/ir/irdump.c
+ * File name: ir/ir/irdumptxt.c
* Purpose: Write vcg representation of firm to file.
* Author: Martin Trapp, Christian Schaefer
* Modified by: Goetz Lindenmaier, Hubert Schmidt
* Copyright: (c) 1998-2003 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
+#ifdef HAVE_STDLIB_H
#include <stdlib.h>
+#endif
+
#include <stdarg.h>
#include "irdump_t.h"
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include "firm_common.h"
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
# include "irvrfy.h"
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include <assert.h>
-#include <stdbool.h>
#include "irnode_t.h"
#include "irgraph_t.h"
#include "pset.h"
#include "eset.h"
#include "pdeq.h" /* Fuer code placement */
+#include "xmalloc.h"
#include "irouts.h"
#include "irloop_t.h"
arity = get_irn_arity(end_bl); /* arity = n_exc + n_ret */
n_res = get_method_n_ress(get_Call_type(call));
- res_pred = (ir_node **) malloc (n_res * sizeof (ir_node *));
- cf_pred = (ir_node **) malloc (arity * sizeof (ir_node *));
+ res_pred = (ir_node **) xmalloc (n_res * sizeof (ir_node *));
+ cf_pred = (ir_node **) xmalloc (arity * sizeof (ir_node *));
set_irg_current_block(current_ir_graph, post_bl); /* just to make sure */
}
main_end_bl = get_irg_end_block(current_ir_graph);
main_end_bl_arity = get_irn_arity(main_end_bl);
- end_preds = (ir_node **) malloc ((n_exc + main_end_bl_arity) * sizeof (ir_node *));
+ end_preds = (ir_node **) xmalloc ((n_exc + main_end_bl_arity) * sizeof (ir_node *));
for (i = 0; i < main_end_bl_arity; ++i)
end_preds[i] = get_irn_n(main_end_bl, i);
if (i < get_Block_n_cfgpreds(end_bl)) {
bl = get_nodes_block(cf_op);
arity = get_Block_n_cfgpreds(end_bl) + get_Block_n_cfgpreds(bl) - 1;
- cf_pred = (ir_node **) malloc (arity * sizeof (ir_node *));
+ cf_pred = (ir_node **) xmalloc (arity * sizeof (ir_node *));
for (j = 0; j < i; j++)
cf_pred[j] = get_Block_cfgpred(end_bl, j);
for (j = j; j < i + get_Block_n_cfgpreds(bl); j++)
} inline_irg_env;
static inline_irg_env *new_inline_irg_env(void) {
- inline_irg_env *env = malloc(sizeof(inline_irg_env));
+ inline_irg_env *env = xmalloc(sizeof(inline_irg_env));
env->n_nodes = -2; /* uncount Start, End */
env->n_nodes_orig = -2; /* uncount Start, End */
env->call_nodes = eset_create();
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
+#ifdef HAVE_STRING_H
# include <string.h>
+#endif
+# include "xmalloc.h"
# include "ircons.h"
# include "irgraph_t.h"
# include "irprog_t.h"
ir_node *first_block;
ir_node *projX;
- res = (ir_graph *) malloc (sizeof (ir_graph));
+ res = (ir_graph *) xmalloc (sizeof (ir_graph));
memset(res, 0, sizeof (ir_graph));
res->kind = k_ir_graph;
ir_graph *res;
ir_node *projX;
- res = (ir_graph *) malloc (sizeof(*res));
+ res = (ir_graph *) xmalloc (sizeof(*res));
memset(res, 0, sizeof(*res));
/* inform statistics here, as blocks will be already build on this graph */
*/
/**
-* traverse an ir graph
-* - execute the pre function before recursion
-* - execute the post function after recursion
-*/
+ * @file irgwalk.c
+ *
+ * traverse an ir graph
+ * - execute the pre function before recursion
+ * - execute the post function after recursion
+ */
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
-#include <stdlib.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
#include "irnode_t.h"
#include "irgraph_t.h" /* visited flag */
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include "irnode_t.h"
* Copyright: (c) 1998-2003 Universität Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
-
-
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
-# include <stddef.h>
+#endif
+#ifdef HAVE_STRING_H
# include <string.h>
-# include <stdbool.h>
+#endif
+
+# include <stddef.h>
# include "irmode_t.h"
# include "ident.h"
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
+#endif
+
+#ifdef HAVE_STRING_H
+# include <string.h>
#endif
-#include <string.h>
#include "ident.h"
#include "irnode_t.h"
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
+#ifdef HAVE_STRING_H
# include <string.h>
+#endif
# include "irop_t.h"
# include "irnode_t.h"
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
+#endif
+
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
#endif
# include "irnode_t.h"
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <stdio.h>
#include <stdarg.h>
-#include <string.h>
+
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
#include "ident.h"
#include "irmode_t.h"
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
+#ifdef HAVE_STRING_H
# include <string.h>
+#endif
# include "irprog_t.h"
# include "irgraph_t.h"
ir_prog *new_ir_prog (void) {
ir_prog *res;
- res = (ir_prog *) malloc (sizeof(ir_prog));
+ res = (ir_prog *) xmalloc (sizeof(ir_prog));
memset(res, 0, sizeof(res));
irp = res;
/* res->obst = (struct obstack *) xmalloc (sizeof (struct obstack)); */
*
* $Id$
*/
-
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free
*/
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
# include "irprog.h"