Add pass constructor C99 feature removed.
[libfirm] / ir / opt / escape_ana.c
index fae75f1..6f4acd9 100644 (file)
@@ -47,6 +47,7 @@
 #include "ircons.h"
 #include "irprintf.h"
 #include "debug.h"
+#include "error.h"
 
 /**
  * walker environment
@@ -91,16 +92,14 @@ static int is_method_leaving_raise(ir_node *raise)
     /* Hmm: no ProjX from a Raise? This should be a verification
      * error. For now we just assert and return.
      */
-    assert(! "No ProjX after Raise found");
-    return 1;
+    panic("No ProjX after Raise found");
   }
 
   if (get_irn_n_outs(proj) != 1) {
     /* Hmm: more than one user of ProjX: This is a verification
      * error.
      */
-    assert(! "More than one user of ProjX");
-    return 1;
+    panic("More than one user of ProjX");
   }
 
   n = get_irn_out(proj, 0);
@@ -117,7 +116,8 @@ static int is_method_leaving_raise(ir_node *raise)
  * returns an Alloc node if the node adr Select
  * from one
  */
-static ir_node *is_depend_alloc(ir_node *adr) {
+static ir_node *is_depend_alloc(ir_node *adr)
+{
   ir_node *alloc;
 
   if (!is_Sel(adr))
@@ -141,7 +141,8 @@ static ir_node *is_depend_alloc(ir_node *adr) {
  * determine if a value calculated by n "escape", ie
  * is stored somewhere we could not track
  */
-static int can_escape(ir_node *n) {
+static int can_escape(ir_node *n)
+{
   int i, j, k;
 
   /* should always be pointer mode or we made some mistake */
@@ -402,7 +403,7 @@ static void transform_allocs(ir_graph *irg, walk_env_t *env)
   ftp = get_irg_frame_type(irg);
   for (alloc = env->found_allocs; alloc; alloc = next) {
     next = get_irn_link(alloc);
-    size = get_Alloc_size(alloc);
+    size = get_Alloc_count(alloc);
     atp  = get_Alloc_type(alloc);
 
     tp = NULL;
@@ -485,11 +486,10 @@ static void transform_alloc_calls(ir_graph *irg, walk_env_t *env)
     mem = get_Call_mem(call);
        blk = get_nodes_block(call);
     turn_into_tuple(call, pn_Call_max);
-    set_Tuple_pred(call, pn_Call_M_regular, mem);
-       set_Tuple_pred(call, pn_Call_X_regular, new_r_Jmp(blk));
-    set_Tuple_pred(call, pn_Call_X_except, new_r_Bad(irg));
-    set_Tuple_pred(call, pn_Call_T_result, new_r_Bad(irg));
-    set_Tuple_pred(call, pn_Call_M_except, mem);
+    set_Tuple_pred(call, pn_Call_M,                mem);
+       set_Tuple_pred(call, pn_Call_X_regular,        new_r_Jmp(blk));
+    set_Tuple_pred(call, pn_Call_X_except,         new_r_Bad(irg));
+    set_Tuple_pred(call, pn_Call_T_result,         new_r_Bad(irg));
     set_Tuple_pred(call, pn_Call_P_value_res_base, new_r_Bad(irg));
 
     ++env->nr_deads;