compileable with -Wall and bugfixing
authorBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Fri, 23 Aug 2002 10:27:07 +0000 (10:27 +0000)
committerBoris Boesler <boesler@ipd.info.uni-karlsruhe.de>
Fri, 23 Aug 2002 10:27:07 +0000 (10:27 +0000)
[r463]

ir/ana/cgana.c
ir/ana/irscc.c
ir/common/common.c
ir/ir/irgopt.c
ir/ir/irgwalk.c
ir/ir/irmode.c
ir/ir/irnode.c
ir/ir/irnode.h
ir/ir/irprog.c
ir/tr/type.c

index 21a3878..c7c09c3 100644 (file)
@@ -20,7 +20,7 @@
 #include "ircons.h"
 #include "irgmod.h"
 #include "xprintf.h"
-
+#include "irnode.h"
 
 /* Eindeutige Adresse zur Markierung von besuchten Knoten und zur
  * Darstellung der unbekannten Methode. */
index dfb51c3..ff6f10f 100644 (file)
 
 /* $Id$ */
 
+#include <string.h>
+
 #include "irloop_t.h"
 #include "irnode.h"
 #include "irgraph_t.h"
 #include "array.h"
+#include "xprintf.h"
+#include "irgwalk.h"
+
 
 ir_graph *outermost_ir_graph;      /* The outermost graph the scc is computed
                                      for */
index a7381ab..6782ee9 100644 (file)
@@ -40,6 +40,7 @@ const char* print_firm_kind(void *firm_thing) {
     case k_type_primitive: { return "k_type_primitive"; } break;
 #endif
     case k_ir_node: { return "k_ir_node"; } break;
+  default: break;
   }
   return "";
 }
index c6c7f20..1e1893d 100644 (file)
@@ -130,7 +130,7 @@ compute_new_arity(ir_node *b) {
   }
 }
 
-static INLINE new_backedge_info(ir_node *n) {
+static INLINE void new_backedge_info(ir_node *n) {
   switch(get_irn_opcode(n)) {
   case iro_Block:
     n->attr.block.cg_backedge = NULL;
index c554e81..1bbe1b2 100644 (file)
@@ -14,6 +14,8 @@
 # include <config.h>
 #endif
 
+# include <stdlib.h>
+
 # include "irnode.h"
 # include "irgraph.h" /* visited flag */
 # include "irprog.h"
@@ -312,6 +314,7 @@ new_callsite_stack(ir_graph *g) {
   res->tos = 0;
   res->s = NEW_ARR_F (ir_node *, MIN_STACK_SIZE);
   set_irg_callsite_stack(g, res);
+  return(res);
 }
 
 static INLINE void
index 995f6ee..1157f60 100644 (file)
@@ -518,4 +518,5 @@ smaller_mode(ir_mode *sm, ir_mode *lm) {
   if ((mode_is_float(sm) && mode_is_float(lm)) &&
       get_mode_modecode(sm) <= get_mode_modecode(lm))
     return true;
+  return(false);
 }
index 7a6d41e..78e7a9b 100644 (file)
@@ -19,6 +19,7 @@
 #include "typegmod_t.h"
 #include "array.h"
 #include "irbackedge_t.h"
+#include "irdump.h"
 
 #ifdef DEBUG_libfirm
 #include "irprog_t.h"
index 281cfb9..cf4c98b 100644 (file)
@@ -297,6 +297,8 @@ INLINE ir_node *get_Call_param (ir_node *node, int pos);
 INLINE void     set_Call_param (ir_node *node, int pos, ir_node *param);
 INLINE type    *get_Call_type (ir_node *node);
 INLINE void     set_Call_type (ir_node *node, type *type);
+INLINE int      get_Call_arity (ir_node *node);
+
 /* Set, get and remove the callee-analysis. */
 int get_Call_n_callees(ir_node * node);
 entity * get_Call_callee(ir_node * node, int pos);
index 5fd231a..4d3eef1 100644 (file)
@@ -30,6 +30,20 @@ void init_irprog(void) {
   new_ir_prog ();
 }
 
+INLINE void remove_irp_type_from_list (type *typ) {
+  int i;
+  assert(typ);
+  for (i = 1; i < (ARR_LEN (irp->types)); i++) {
+    if (irp->types[i] == typ) {
+      for(; i < (ARR_LEN (irp->types)) - 1; i++) {
+       irp->types[i] = irp->types[i+1];
+      }
+      ARR_SETLEN(type*, irp->types, (ARR_LEN(irp->types)) - 1);
+      break;
+    }
+  }
+}
+
 /* Create a new ir prog. Automatically called by init_firm through
    init_irprog. */
 ir_prog *new_ir_prog (void) {
@@ -123,20 +137,6 @@ void add_irp_type(type *typ) {
   ARR_APP1 (type *, irp->types, typ);
 }
 
-INLINE void remove_irp_type_from_list (type *typ) {
-  int i;
-  assert(typ);
-  for (i = 1; i < (ARR_LEN (irp->types)); i++) {
-    if (irp->types[i] == typ) {
-      for(; i < (ARR_LEN (irp->types)) - 1; i++) {
-       irp->types[i] = irp->types[i+1];
-      }
-      ARR_SETLEN(type*, irp->types, (ARR_LEN(irp->types)) - 1);
-      break;
-    }
-  }
-}
-
 void remove_irp_type(type *typ) {
   remove_irp_type_from_list (typ);
 }
index 19f4600..b1883b7 100644 (file)
@@ -33,6 +33,7 @@
 
 # include <stdlib.h>
 # include <stddef.h>
+# include <string.h>
 # include "type_t.h"
 # include "tpop_t.h"
 # include "typegmod_t.h"