We now conform to iso-c99
authorTill Riedel <till@ipd.info.uni-karlsruhe.de>
Thu, 26 Jun 2003 11:24:03 +0000 (11:24 +0000)
committerTill Riedel <till@ipd.info.uni-karlsruhe.de>
Thu, 26 Jun 2003 11:24:03 +0000 (11:24 +0000)
[r1407]

14 files changed:
MakeRules.in
configure
configure.in
ir/ana/irscc.c
ir/common/misc.h
ir/ir/irdump.c
ir/ir/irmode.c
ir/ir/irprog.c
testprograms/Makefile.in
testprograms/call_str_example.c
testprograms/empty.c
testprograms/global_var_example.c
testprograms/irr_cf_example.c
testprograms/irr_loop_example.c

index e5e7eb4..3550994 100644 (file)
@@ -10,7 +10,7 @@ VPATH = $(srcdir)
 LIBFIRM_VERSION = @PACKAGE_VERSION@
 
 CC = @CC@
-CFLAGS := -Wall -Wstrict-prototypes @CFLAGS@
+CFLAGS := -std=c99 -pedantic-errors -Wall -Wstrict-prototypes @CFLAGS@
 CPPFLAGS := -I. -I$(topdir) -I$(srcdir) -I$(top_srcdir) @CPPFLAGS@
 prefix?=@prefix@
 exec_prefix?=@exec_prefix@
index e97bccc..5fc0199 100755 (executable)
--- a/configure
+++ b/configure
@@ -835,6 +835,7 @@ Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-includedir=add colon seperated list of directories to include search path
+  --with-libdir=add colon seperated list of directories to linker search path
 
 Some influential environment variables:
   CC          C compiler command
@@ -1225,6 +1226,16 @@ else
 fi;
 
 
+# Check whether --with-libdir or --without-libdir was given.
+if test "${with_libdir+set}" = set; then
+  withval="$with_libdir"
+  LDFLAGS=$LDFLAGS" -L"`echo $withval|sed 's;\:; -L;g'`
+else
+  T_FLAG=""
+fi;
+
+
+
 # Check whether --enable-debug or --disable-debug was given.
 if test "${enable_debug+set}" = set; then
   enableval="$enable_debug"
index 417e807..2d9bb4a 100644 (file)
@@ -27,6 +27,10 @@ dnl check for additional include dirs
 AC_ARG_WITH(includedir, [  --with-includedir=add colon seperated list of directories to include search path],
     CPPFLAGS=$CPPFLAGS" -I"`echo $withval|sed 's;\:; -I;g'`, T_FLAG="")
 
+AC_ARG_WITH(libdir, [  --with-libdir=add colon seperated list of directories to linker search path],
+    LDFLAGS=$LDFLAGS" -L"`echo $withval|sed 's;\:; -L;g'`, T_FLAG="")
+
+
 dnl Package options
 dnl ===============
 
index af8cc61..39423a4 100644 (file)
@@ -301,9 +301,11 @@ ir_loop *get_loop_son (ir_loop *loop, int pos) {
 
 static INLINE void
 add_loop_son(ir_loop *loop, ir_loop *son) {
+  loop_element lson;
+  lson.son = son;
   assert(loop && loop->kind == k_ir_loop);
   assert(get_kind(son) == k_ir_loop);
-  ARR_APP1 (loop_element, loop->children, (loop_element) son);
+  ARR_APP1 (loop_element, loop->children, lson);
   loop -> n_sons++;
 }
 
@@ -338,9 +340,11 @@ ir_node *get_loop_node (ir_loop *loop, int pos) {
 
 static INLINE void
 add_loop_node(ir_loop *loop, ir_node *n) {
+  loop_element ln;
+  ln.node=n;
   assert(loop && loop->kind == k_ir_loop);
   assert(get_kind(n) == k_ir_node);
-  ARR_APP1 (loop_element, loop->children, (loop_element) n);
+  ARR_APP1 (loop_element, loop->children, ln);
   loop->n_nodes++;
 }
 
index 327f7cb..55e5f61 100644 (file)
@@ -19,7 +19,7 @@
 # else
 #   if defined(_AIX) && !defined(C_ALLOCA)
       /* if your version of AIX chokes on this, use gcc @@@ or alloca.o */
-#pragma alloca
+    #pragma alloca
 #   else
 #     ifndef alloca /* predefined by HP cc +Olibcalls */
 void *alloca ();
index 2728f72..91f0de6 100644 (file)
@@ -41,8 +41,8 @@
 
 /* Attributes of nodes */
 #define PRINT_DEFAULT_NODE_ATTR
-#define DEFAULT_NODE_ATTR ""
-#define DEFAULT_TYPE_ATTRIBUTE ""
+#define DEFAULT_NODE_ATTR " "
+#define DEFAULT_TYPE_ATTRIBUTE " "
 
 /* Attributes of edges between Firm nodes */
 #define BLOCK_EDGE_ATTR "class: 2 priority: 2 linestyle: dotted"
 
 
 #if DEBUG_libfirm && NODEID_AS_LABEL
-#define PRINT_NODEID(X) fprintf(F, "n%ld", get_irn_node_nr(X))
-#define PRINT_TYPEID(X) fprintf(F, "t%ld", get_type_nr(X))
-#define PRINT_ENTID(X) fprintf(F, "e%ld", get_entity_nr(X))
-#define PRINT_IRGID(X) fprintf(F,"g%ld", get_irg_graph_nr(X))
+#define PRINT_NODEID(X) fprintf(F, "\"n%ld\"", get_irn_node_nr(X))
+#define PRINT_TYPEID(X) fprintf(F, "\"t%ld\"", get_type_nr(X))
+#define PRINT_ENTID(X)  fprintf(F, "\"e%ld\"", get_entity_nr(X))
+#define PRINT_IRGID(X)  fprintf(F, "g%ld", get_irg_graph_nr(X))
+#define PRINT_CONSTID(X,Y) fprintf(F, "\"n%ldn%ld\"", get_irn_node_nr(X),get_irn_node_nr(Y))
+
 #else
-#define PRINT_NODEID(X) fprintf(F, "%p", X)
-#define PRINT_TYPEID(X) fprintf(F, "%p", X)
-#define PRINT_ENTID(X) fprintf(F, "%p", X)
-#define PRINT_IRGID(X) fprintf(F,"%p",X)
+#define PRINT_NODEID(X) fprintf(F, "\"n%p\"", (void*) X)
+#define PRINT_TYPEID(X) fprintf(F, "\"t%p\"", (void *) X)
+#define PRINT_ENTID(X) fprintf(F, "\"e%p\"", (void*) X)
+#define PRINT_IRGID(X) fprintf(F,"g%p",void(*)X)
+#define PRINT_CONSTID(X,Y) fprintf(F, "\"%p%p\"", (void*) X, (void*) Y)
 #endif
 
-#define PRINT_TYPE_TYPE_EDGE(S,T,ATR,...) {fprintf (F, "edge: { sourcename:\""); PRINT_TYPEID(S); fprintf (F, "\" targetname: \""); PRINT_TYPEID(T);  fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
-#define PRINT_TYPE_ENT_EDGE(S,T,ATR,...)  {fprintf (F, "edge: { sourcename:\""); PRINT_TYPEID(S); fprintf (F, "\" targetname: \""); PRINT_ENTID(T);  fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
-#define PRINT_ENT_ENT_EDGE(S,T,ATR,...)   {fprintf (F, "edge: { sourcename:\""); PRINT_ENTID(S); fprintf (F, "\" targetname: \""); PRINT_ENTID(T);  fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
-#define PRINT_ENT_TYPE_EDGE(S,T,ATR,...)  {fprintf (F, "edge: { sourcename:\""); PRINT_ENTID(S); fprintf (F, "\" targetname: \""); PRINT_TYPEID(T);  fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
-#define PRINT_NODE_TYPE_EDGE(S,T,ATR,...)  {fprintf (F, "edge: { sourcename:\""); PRINT_NODEID(S); fprintf (F, "\" targetname: \""); PRINT_TYPEID(T);  fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
-#define PRINT_NODE_ENT_EDGE(S,T,ATR,...)   {fprintf (F, "edge: { sourcename:\""); PRINT_NODEID(S); fprintf (F, "\" targetname: \""); PRINT_ENTID(T);  fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
-#define PRINT_ENT_NODE_EDGE(S,T,ATR,...)   {fprintf (F, "edge: { sourcename:\""); PRINT_ENTID(S); fprintf (F, "\" targetname: \""); PRINT_NODEID(T);  fprintf (F,"\" " ATR "}\n",##__VA_ARGS__);}
+#define PRINT_TYPE_TYPE_EDGE(S,T,...){fprintf (F, "edge: { sourcename: "); PRINT_TYPEID(S); fprintf (F, " targetname: "); PRINT_TYPEID(T); fprintf (F, ##__VA_ARGS__); fprintf(F,"}\n"); }
+#define PRINT_TYPE_ENT_EDGE(S,T,...) {fprintf (F, "edge: { sourcename: "); PRINT_TYPEID(S); fprintf (F, " targetname: "); PRINT_ENTID(T);  fprintf (F, ##__VA_ARGS__); fprintf(F,"}\n"); }
+#define PRINT_ENT_ENT_EDGE(S,T,...)  {fprintf (F, "edge: { sourcename: "); PRINT_ENTID(S);  fprintf (F, " targetname: "); PRINT_ENTID(T);  fprintf (F, ##__VA_ARGS__); fprintf(F,"}\n"); }
+#define PRINT_ENT_TYPE_EDGE(S,T,...) {fprintf (F, "edge: { sourcename: "); PRINT_ENTID(S);  fprintf (F, " targetname: "); PRINT_TYPEID(T); fprintf (F, ##__VA_ARGS__); fprintf(F,"}\n"); }
+#define PRINT_NODE_TYPE_EDGE(S,T,...){fprintf (F, "edge: { sourcename: "); PRINT_NODEID(S); fprintf (F, " targetname: "); PRINT_TYPEID(T); fprintf (F, ##__VA_ARGS__); fprintf(F,"}\n"); }
+#define PRINT_NODE_ENT_EDGE(S,T,...) {fprintf (F, "edge: { sourcename: "); PRINT_NODEID(S); fprintf (F, " targetname: "); PRINT_ENTID(T);  fprintf (F, ##__VA_ARGS__); fprintf(F,"}\n"); }
+#define PRINT_ENT_NODE_EDGE(S,T,...) {fprintf (F, "edge: { sourcename: "); PRINT_ENTID(S);  fprintf (F, " targetname: "); PRINT_NODEID(T); fprintf (F, ##__VA_ARGS__); fprintf(F,"}\n"); }
 
 
 /* A suffix to manipulate the file name. */
@@ -296,8 +299,8 @@ static void dump_const_node_local(ir_node *n, pmap *irgmap) {
       mark_irn_visited(con);
       /* Generate a new name for the node by appending the names of
         n and const. */
-      fprintf (F, "node: {title: \""); PRINT_NODEID(n); PRINT_NODEID(con);
-      fprintf(F, "\" label: \"");
+      fprintf (F, "node: {title: "); PRINT_CONSTID(n,con);
+      fprintf(F, " label: \"");
       dump_node_opcode(con);
       dump_node_mode (con);
       fprintf (F, " ");
@@ -317,7 +320,7 @@ dump_node (ir_node *n, pmap * map) {
   if (get_opt_dump_const_local() && is_constlike_node(n)) return;
 
   /* dump this node */
-  fprintf (F, "node: {title: \""); PRINT_NODEID(n); fprintf(F, "\" label: \"");
+  fprintf (F, "node: {title: "); PRINT_NODEID(n); fprintf(F, " label: \"");
 
   dump_node_opcode(n);
   dump_node_mode (n);
@@ -337,11 +340,11 @@ static void
 dump_ir_block_edge(ir_node *n)  {
   if (get_opt_dump_const_local() && is_constlike_node(n)) return;
   if (is_no_Block(n)) {
-    fprintf (F, "edge: { sourcename: \"");
+    fprintf (F, "edge: { sourcename: ");
     PRINT_NODEID(n);
-    fprintf (F, "\" targetname: \"");
+    fprintf (F, " targetname: ");
     PRINT_NODEID(get_nodes_Block(n));
-    fprintf (F, "\" "  BLOCK_EDGE_ATTR "}\n");
+    fprintf (F, " "    BLOCK_EDGE_ATTR "}\n");
   }
 }
 
@@ -446,15 +449,19 @@ dump_ir_data_edges(ir_node *n)  {
     if ((interprocedural_view && get_irn_visited(pred) < visited))
       continue; /* pred not dumped */
     if (is_backedge(n, i))
-      fprintf (F, "backedge: {sourcename: \"");
+      fprintf (F, "backedge: {sourcename: ");
     else
-      fprintf (F, "edge: {sourcename: \"");
+      fprintf (F, "edge: {sourcename: ");
     PRINT_NODEID(n);
-    fprintf (F, "\" targetname: \"");
+    fprintf (F, " targetname: ");
     if ((get_opt_dump_const_local()) && is_constlike_node(pred))
-      PRINT_NODEID(n);
-    PRINT_NODEID(pred);
-    fprintf (F, "\"");
+    {
+      PRINT_CONSTID(n,pred);
+    }
+    else
+    {
+      PRINT_NODEID(pred);
+    }
     fprintf (F, " label: \"%d\" ", i);
     print_edge_vcgattr(n, i);
     fprintf (F, "}\n");
@@ -467,11 +474,11 @@ dump_out_edge (ir_node *n, void* env) {
   int i;
   for (i = 0; i < get_irn_n_outs(n); i++) {
     assert(get_irn_out(n, i));
-    fprintf (F, "edge: {sourcename: \"");
+    fprintf (F, "edge: {sourcename: ");
     PRINT_NODEID(n);
-    fprintf (F, "\" targetname: \"");
+    fprintf (F, " targetname: ");
     PRINT_NODEID(get_irn_out(n, i));
-    fprintf (F, "\" color: red linestyle: dashed");
+    fprintf (F, " color: red linestyle: dashed");
     fprintf (F, "}\n");
   }
 }
@@ -479,9 +486,9 @@ dump_out_edge (ir_node *n, void* env) {
 static INLINE void
 dump_loop_node_edge (ir_loop *loop, int i) {
   assert(loop);
-  fprintf (F, "edge: {sourcename: \"%p\" targetname: \"", loop);
+  fprintf (F, "edge: {sourcename: \"%p\" targetname: ", (void*) loop);
   PRINT_NODEID(get_loop_node(loop, i));
-  fprintf (F, "\" color: green");
+  fprintf (F, " color: green");
   fprintf (F, "}\n");
 }
 
@@ -490,7 +497,7 @@ void dump_loops (ir_loop *loop) {
   int i;
   /* dump this loop node */
   fprintf (F, "node: {title: \"%p\" label: \"loop %d, %d sons, %d nodes\" }\n",
-           loop, get_loop_depth(loop), get_loop_n_sons(loop), get_loop_n_nodes(loop));
+           (void*)loop, get_loop_depth(loop), get_loop_n_sons(loop), get_loop_n_nodes(loop));
   /* dump edges to nodes in loop -- only if it is a real loop */
   if (get_loop_depth(loop) != 0) {
     for (i = 0; i < get_loop_n_nodes(loop); i++) {
@@ -611,10 +618,10 @@ static void print_typespecific_info(type *tp) {
 }
 
 static void print_type_node(type *tp) {
-  fprintf (F, "node: {title: \"");
+  fprintf (F, "node: {title: ");
   PRINT_TYPEID(tp);
-  fprintf (F, "\" label: \"%s %s\"", id_to_str(get_type_tpop_nameid(tp)), id_to_str(get_type_ident(tp)));
-  fprintf (F, "info1: \"");
+  fprintf (F, " label: \"%s %s\"", id_to_str(get_type_tpop_nameid(tp)), id_to_str(get_type_ident(tp)));
+  fprintf (F, " info1: \"");
   print_type_info(tp);
   fprintf (F, "\"");
   print_typespecific_info(tp);
@@ -622,9 +629,9 @@ static void print_type_node(type *tp) {
 }
 
 void dump_entity_node(entity *ent) {
-  fprintf (F, "node: {title: \"");
+  fprintf (F, "node: {title: ");
   PRINT_ENTID(ent);
-  fprintf (F, "\"" DEFAULT_TYPE_ATTRIBUTE);
+  fprintf (F, DEFAULT_TYPE_ATTRIBUTE);
   fprintf (F, "label: ");
   fprintf (F, "\"ent %s\" " ENTITY_NODE_ATTR , id_to_str(get_entity_ident(ent)));
   fprintf (F, "\n info1:\"\nallocation:  ");
@@ -700,9 +707,9 @@ dump_type_info (type_or_ent *tore, void *env) {
          if (value) {
             PRINT_ENT_NODE_EDGE(ent, value, ENT_VALUE_EDGE_ATTR, i);
            /*
-           fprintf (F, "edge: { sourcename: \"%p\" targetname: \"", GET_ENTID(ent));
+           fprintf (F, "edge: { sourcename: \"%p\" targetname: ", GET_ENTID(ent));
            PRINT_NODEID(value);
-           fprintf(F, "\" " ENT_VALUE_EDGE_ATTR "\"}\n");
+           fprintf(F, " " ENT_VALUE_EDGE_ATTR "\"}\n");
            */
            dump_const_expression(value);
          }
@@ -1018,9 +1025,9 @@ dump_ir_block (ir_node *block, void *env) {
   if (get_irn_opcode(block) == iro_Block) {
 
     /* This is a block. So dump the vcg information to make a block. */
-    fprintf(F, "graph: { title: \"");
+    fprintf(F, "graph: { title: ");
        PRINT_NODEID(block);
-       fprintf(F, "\"  label: \"");
+       fprintf(F, "  label: \"");
 #ifdef DEBUG_libfirm
     fprintf (F, "%ld", get_irn_node_nr(block));
 #else
@@ -1104,35 +1111,40 @@ dump_block_to_cfg (ir_node *block, void *env) {
 
   if (get_irn_opcode(block) == iro_Block) {
     /* This is a block. Dump a node for the block. */
-    fprintf (F, "node: {title:\""); PRINT_NODEID(block);
-    fprintf (F, "\" label: \"%s ", get_op_name(get_irn_op(block))); PRINT_NODEID(block);
+    fprintf (F, "node: {title:"); PRINT_NODEID(block);
+    fprintf (F, " label: \"%s ", get_op_name(get_irn_op(block)));
+#ifdef DEBUG_libfirm
+    fprintf (F, "%ld", get_irn_node_nr(block));
+#else
+    fprintf (F, "%p", (void*) block);
+#endif
 
     if (exc_normal != get_Block_exc (block))
       fprintf (F, " (%s)", exc_to_string (get_Block_exc (block)));
 
     fprintf (F, "\" ");
     if (dump_dominator_information_flag)
-      fprintf(F, "info1:\"dom depth %d\"", get_Block_dom_depth(block));
+      fprintf(F, "info1:dom depth %d", get_Block_dom_depth(block));
     fprintf (F, "}\n");
     /* Dump the edges */
     for ( i = 0; i < get_Block_n_cfgpreds(block); i++)
       if (get_irn_op(skip_Proj(get_Block_cfgpred(block, i))) != op_Bad) {
        pred = get_nodes_Block(skip_Proj(get_Block_cfgpred(block, i)));
-       fprintf (F, "edge: { sourcename: \"");
+       fprintf (F, "edge: { sourcename: ");
        PRINT_NODEID(block);
-       fprintf (F, "\" targetname: \"");
+       fprintf (F, " targetname: ");
        PRINT_NODEID(pred);
-       fprintf (F, "\" }\n");
+       fprintf (F, " }\n");
       }
 
     /* Dump dominator edge */
     if (dump_dominator_information_flag && get_Block_idom(block)) {
       pred = get_Block_idom(block);
-      fprintf (F, "edge: { sourcename: \"");
+      fprintf (F, "edge: { sourcename: ");
       PRINT_NODEID(block);
-      fprintf (F, "\" targetname: \"");
+      fprintf (F, " targetname: ");
       PRINT_NODEID(pred);
-      fprintf (F, "\" " DOMINATOR_EDGE_ATTR "}\n");
+      fprintf (F, " " DOMINATOR_EDGE_ATTR "}\n");
     }
   }
 }
@@ -1322,8 +1334,11 @@ static void collect_blocks_floats_cg(ir_node * node, pmap * map) {
       || get_irn_op(node) == op_Bad
       || get_irn_op(node) == op_Unknown) {
     pmap_entry * entry = pmap_find(map, current_ir_graph);
-    if (entry) {
-      ARR_APP1(ir_node *, (ir_node **) entry->value, node);
+    if (entry)
+    {
+      ir_node ** arr;
+      arr = entry->value;
+      ARR_APP1(ir_node *, arr , node);
     } else {
       ir_node ** arr = NEW_ARR_F(ir_node *, 1);
       arr[0] = node;
@@ -1341,13 +1356,14 @@ static void dump_cg_ir_block(ir_node * block, void * env) {
   ir_node *node;
   pmap *irgmap = (pmap *)env;
   assert(is_Block(block));
-  fprintf(F, "graph: { title: \"");
+  fprintf(F, "graph: { title: ");
   PRINT_NODEID(block);
-  fprintf(F, "\"  label: \"");
+  fprintf(F, "  label: \"");
+  fprintf (F, "%s ", get_op_name(get_irn_op(block)));
 #ifdef DEBUG_libfirm
   fprintf (F, "%ld", get_irn_node_nr(block));
 #else
-  fprintf (F, "%s", get_op_name(get_irn_op(block)));
+  fprintf (F, "%p", (void*) block);
 #endif
   if (exc_normal != get_Block_exc(block)) {
     fprintf (F, " (%s)", exc_to_string (get_Block_exc(block)));
@@ -1372,8 +1388,8 @@ static void dump_cg_ir_block(ir_node * block, void * env) {
 static void d_cg_block_graph(ir_graph *irg, ir_node **arr, pmap *irgmap) {
   int i;
 
-  fprintf(F, "graph: { title: \"%p\" label: \"%s\" status:clustered color:white \n",
-          irg, id_to_str(get_entity_ident(get_irg_ent(irg))));
+  fprintf(F, "graph: { title: %p label: %s status:clustered color:white \n",
+          (void*) irg, id_to_str(get_entity_ident(get_irg_ent(irg))));
 
   for (i = ARR_LEN(arr) - 1; i >= 0; --i) {
     ir_node * node = arr[i];
@@ -1480,7 +1496,7 @@ void dump_cg_graph(ir_graph * irg) {
     int i;
     ident * irg_ident = get_entity_ident(get_irg_ent(entry->key));
 
-    fprintf(F, "graph: { title: \"%s\" label: \"%s\" status:clustered color:white \n",
+    fprintf(F, "graph: { title: %s label: %s status:clustered color:white \n",
             id_to_str(irg_ident), id_to_str(irg_ident));
 
     for (i = ARR_LEN(arr) - 1; i >= 0; --i) {
index de777e0..1ebfddb 100644 (file)
@@ -48,7 +48,7 @@ static int num_modes;
  *
  * TODO: Add other fields
  **/
-inline static int modes_are_equal(const ir_mode *m, const ir_mode *n)
+INLINE static int modes_are_equal(const ir_mode *m, const ir_mode *n)
 {
   if (m == n) return 1;
   if(!bcmp( m + offsetof(ir_mode,sort) , n + offsetof(ir_mode,sort), offsetof(ir_mode,min)-offsetof(ir_mode,min))) return 1;
index 95bd7f4..5b9ca0e 100644 (file)
@@ -55,6 +55,11 @@ ir_prog *new_ir_prog (void) {
   /* res->obst      = (struct obstack *) xmalloc (sizeof (struct obstack)); */
   res->graphs = NEW_ARR_F (ir_graph *, 1);
   res->types  = NEW_ARR_F (type *, 1);
+
+#ifdef DEBUG_libfirm
+  res->max_node_nr = 0;
+#endif
+
   res->glob_type = new_type_class(id_from_str (GLOBAL_TYPE_NAME,
                                               strlen(GLOBAL_TYPE_NAME)));
   /* Remove type from type list.  Must be treated differently than
@@ -63,9 +68,6 @@ ir_prog *new_ir_prog (void) {
 
   res->const_code_irg = new_const_code_irg();
 
-#ifdef DEBUG_libfirm
-  res->max_node_nr = 1;
-#endif
 
   return res;
 }
index 51f6112..8ba9fa3 100644 (file)
@@ -33,7 +33,8 @@ CPPFLAGS += -I$(top_srcdir)/ir/adt -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/
                -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/ir -I$(top_srcdir)/ir/tr \
                -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/st  -I$(top_srcdir)/ir/ana
 
-LDFLAGS += -L$(topdir)
+LDFLAGS = -L$(topdir)
+LDFLAGS+= @LDFLAGS@
 LDLIBS += -lfirm -liberty
 
 GENFILES := $(bin_EXAMPLES) *.vcg
index 2232baa..d275d07 100644 (file)
@@ -112,10 +112,7 @@ int main(int argc, char **argv)
   set_store(new_Proj(call, mode_M, 0));
 
   /* Make the return node returning the memory. */
-  {
-    ir_node *in[0]; /* this is the array containing the return parameters */
-    x = new_Return (get_store(), 0, in);
-  }
+  x = new_Return (get_store(), 0, NULL);
   /* Now we generated all instructions for this block and all its predecessor blocks
    * so we can mature it. */
   mature_block (get_irg_current_block(irg));
index 0a43fb9..0a1de47 100644 (file)
@@ -73,10 +73,7 @@ int main(int argc, char **argv)
    * it is not matured.
    * Generate the return node into this region. The Return node is needed to
    * return at least the memory. */
-  {
-    ir_node *in[0]; /* this is the array containing the return parameters */
-    x = new_Return (get_store(), 0, in);
-  }
+    x = new_Return (get_store(), 0, NULL);
   /* Now we generated all instructions for this block and all its predecessor
    * blocks so we can mature it.  (There are not too much.) */
   mature_block (get_irg_current_block(irg));
index 243b24f..29268f6 100644 (file)
@@ -93,10 +93,8 @@ int main(int argc, char **argv)
                     new_Const(mode_Is, new_tarval_from_long (2, mode_Is)));
   set_store(new_Proj(store, mode_M, 0));
 
-  {
-    ir_node *in[0]; /* this is the array containing the return parameters */
-    x = new_Return (get_store(), 0, in);
-  }
+  x = new_Return (get_store(), 0, NULL);
+
   /* Now generate all instructions for this block and all its predecessor blocks
    * so we can mature it. */
   mature_block (get_irg_current_block(irg));
index c3ad7a8..c1eac06 100644 (file)
@@ -117,10 +117,9 @@ int main(int argc, char **argv)
   new_immBlock();
   add_in_edge(get_irg_current_block(irg), t);
   add_in_edge(get_irg_current_block(irg), jmp);
-  {
-    ir_node *in[0]; /* this is the array containing the return parameters */
-    x = new_Return (get_store(), 0, in);
-  }
+
+  x = new_Return (get_store(), 0, NULL);
+
   mature_block (get_irg_current_block(irg));
 
   add_in_edge (get_irg_end_block(irg), x);
index b974c73..7e6edbd 100644 (file)
@@ -107,10 +107,7 @@ int main(int argc, char **argv)
   new_immBlock();
   add_in_edge(get_irg_current_block(irg), f_l2);
   add_in_edge(get_irg_current_block(irg), f_l1);
-  {
-    ir_node *in[0];
-    x = new_Return (get_store(), 0, in);
-  }
+  x = new_Return (get_store(), 0, NULL);
   mature_block (get_irg_current_block(irg));
 
   add_in_edge (get_irg_end_block(irg), x);