Loads do not remove any nodes from the exec after sets. Also fix a 'node leak'.
[libfirm] / ir / ana / height.c
index 469e422..2b35665 100644 (file)
@@ -1,15 +1,29 @@
 /*
- * Project:     libFIRM
- * File name:   ir/ana/height.c
- * Purpose:     Compute heights of nodes inside basic blocks
- * Author:      Sebastian Hack
- * Modified by:
- * Created:     19.04.2006
- * CVS-ID:      $Id$
- * Copyright:   (c) 2006 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * 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    Compute heights of nodes inside basic blocks
+ * @author   Sebastian Hack
+ * @date     19.04.2006
+ * @version  $Id$
+ */
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -28,7 +42,7 @@
 typedef struct _heights_t heights_t;
 
 struct _heights_t {
-       phase_t ph;
+       ir_phase ph;
        unsigned visited;
        void *dump_handle;
 };
@@ -38,7 +52,7 @@ typedef struct {
        unsigned visited;
 } irn_height_t;
 
-static void *irn_height_init(phase_t *ph, ir_node *irn, void *data)
+static void *irn_height_init(ir_phase *ph, ir_node *irn, void *data)
 {
        irn_height_t *h = data ? data : phase_alloc(ph, sizeof(h[0]));
        memset(h, 0, sizeof(h[0]));
@@ -228,7 +242,7 @@ void heights_recompute(heights_t *h)
 heights_t *heights_new(ir_graph *irg)
 {
        heights_t *res = xmalloc(sizeof(res[0]));
-       phase_init(&res->ph, "heights", irg, PHASE_DEFAULT_GROWTH, irn_height_init);
+       phase_init(&res->ph, "heights", irg, PHASE_DEFAULT_GROWTH, irn_height_init, NULL);
        res->dump_handle = dump_add_node_info_callback(height_dump_cb, res);
        heights_recompute(res);