Fixed bug in conv-conv optimization: We have to assure, that we don't change the...
[libfirm] / ir / be / ppc32 / ppc32_transform_conv.c
index 58263a8..ffb0049 100644 (file)
@@ -23,9 +23,7 @@
  * @author  Moritz Kroll, Jens Mueller
  * @version $Id$
  */
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include "irnode_t.h"
 #include "irgraph_t.h"
@@ -214,7 +212,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)
        {
@@ -241,7 +239,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;