Do not mark the transformed as visited. It makes no sense at all.
[libfirm] / ir / be / ppc32 / ppc32_transform_conv.c
index 5efe5aa..205c997 100644 (file)
@@ -37,6 +37,7 @@
 #include "ircons.h"
 #include "iropt_t.h"
 #include "debug.h"
+#include "error.h"
 
 #include "../benode_t.h"
 #include "bearch_ppc32_t.h"
@@ -173,11 +174,7 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
                default:
                        break;
        }
-       fprintf(stderr, "Mode for Conv not supported: %s -> %s\n", get_mode_name(from_mode), get_mode_name(to_mode));
-       assert(0);
-       return 0;
-
-       // return op;
+       panic("Mode for Conv not supported: %F -> %F", from_mode, to_mode);
 }
 
 int search_from_node_in_block(ir_node *from, ir_node *to)
@@ -217,7 +214,7 @@ void finalize_block(ppc32_code_gen_t *cgenv)
                memslot = frame_alloc_area(frame_type, get_mode_size_bytes(mode_D), 4, 0);
        }
 
-       attr->convs = xmalloc(attr->conv_count * sizeof(ir_node *));
+       attr->convs = XMALLOCN(ir_node*, attr->conv_count);
 
        for (i = 0, current_conv = attr->first_conv; i < attr->conv_count; i++, current_conv = current_conv->link)
        {
@@ -244,7 +241,7 @@ void finalize_block(ppc32_code_gen_t *cgenv)
 
 void init_block(void)
 {
-       cw_block_attr *attr = xmalloc(sizeof(cw_block_attr));
+       cw_block_attr *attr = XMALLOC(cw_block_attr);
        attr->first_conv    = NULL;
        attr->convs         = NULL; /* attr->convs is set in finalize_block() */
        attr->conv_count    = 0;