/*
- * Project: libFIRM
- * File name: ir/ana/irextbb.h
- * Purpose: Extended basis block support.
- * Author: Michael Beck
- * Modified by:
- * Created: 5.2005
- * CVS-ID: $Id$
- * Copyright: (c) 2002-2005 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 irextbb.h
- *
- * Computes extended basic blocks.
- *
- * @author Michael Beck
+ * @file
+ * @brief Extended basis block support.
+ * @author Michael Beck
+ * @date 5.2005
+ * @version $Id$
*/
-#ifndef _IREXTBB_H_
-#define _IREXTBB_H_
+#ifndef FIRM_ANA_IREXTBB_H
+#define FIRM_ANA_IREXTBB_H
#include "firm_types.h"
+#include "execfreq.h"
#ifndef _IR_EXTBB_TYPEDEF_
#define _IR_EXTBB_TYPEDEF_
#endif
/**
- * Compute the extended basic blocks for a graph
+ * Checks whether a pointer points to a extended basic block.
+ * Intern version for libFirm.
+ */
+int is_ir_extbb(const void *thing);
+
+/**
+ * Compute the extended basic blocks for a graph.
*/
void compute_extbb(ir_graph *irg);
+/**
+ * Compute the extended basic blocks for a graph based on execution frequencies.
+ */
+void compute_extbb_execfreqs(ir_graph *irg, ir_exec_freq *execfreqs);
+
/**
* free all extended block info.
*/
/**
* Return the extended block of a node.
*
- * @param blk the extended basic block
+ * @param node the node
*/
ir_extblk *get_nodes_extbb(ir_node *node);
/**
* Walks only over reachable Extended Basic Block nodes in the graph.
+ * Ensures, that the extended block containing the End node is visited last
+ * and the block containing Start visited first (in post order).
*
* @param irg - the irg graph
* @param pre - walker function, executed before the predecessor of a block are visited
*/
void irg_extblock_walk_graph(ir_graph *irg, extbb_walk_func *pre, extbb_walk_func *post, void *env);
-#endif /* _IREXTBB_H_ */
+#endif