Fixed initialization of option tables
[libfirm] / ir / be / beprofile.c
index 100551c..7931429 100644 (file)
@@ -1,13 +1,28 @@
-/** vim: set sw=4 ts=4:
- * @file   beprofile.c
- * @date   2006-04-06
- * @author Adam M. Szalkowski
- * @cvs-id $Id$
+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
  *
- * Code instrumentation and execution count profiling
+ * This file is part of libFirm.
  *
- * Copyright (C) 2006 Universitaet Karlsruhe
- * Released under the GPL
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/**
+ * @file
+ * @brief       Code instrumentation and execution count profiling.
+ * @author      Adam M. Szalkowski
+ * @date        06.04.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -22,7 +37,6 @@
 #include "list.h"
 #include "pmap.h"
 
-#include "entity.h"
 #include "irprintf.h"
 #include "irgwalk.h"
 #include "irdump_t.h"
 #include "iredges.h"
 #include "execfreq.h"
 #include "irvrfy.h"
-#include "type.h"
+#include "typerep.h"
 
 #include "be_t.h"
 #include "belive_t.h"
 #include "besched_t.h"
 #include "beirgmod.h"
-#include "bearch.h"
+#include "bearch_t.h"
 #include "beabi.h"
 #include "benode_t.h"
 #include "beutil.h"
@@ -74,6 +88,7 @@ typedef struct _execcount_t {
 static int
 cmp_execcount(const void * a, const void * b, size_t size)
 {
+       (void) size;
        return ((execcount_t*)a)->block != ((execcount_t*)b)->block;
 }
 
@@ -81,6 +96,7 @@ static void
 block_counter(ir_node * bb, void * data)
 {
        unsigned int  *count = data;
+       (void) bb;
        *count = *count + 1;
 }
 
@@ -308,7 +324,7 @@ ir_graph *
 be_profile_instrument(const char *filename, unsigned flags)
 {
        int n, i;
-       unsigned int n_blocks = 0;
+       int n_blocks = 0;
        ir_entity *bblock_id;
        ir_entity *bblock_counts;
        ir_entity *ent_filename;
@@ -508,6 +524,7 @@ be_profile_instrument(const char *filename, unsigned flags)
 static void
 profile_node_info(void *ctx, FILE *f, const ir_node *irn)
 {
+       (void) ctx;
        if(is_Block(irn)) {
                fprintf(f, "profiled execution count: %u\n", be_profile_get_block_execcount(irn));
        }