unified main comments
[libfirm] / ir / be / bedomfront.h
1 /*
2  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief       Algorithms for computing normal and iterated dominance frontiers
23  * @author      Sebastian Hack, Daniel Grund
24  * @date:       04.05.2005
25  * @version     $Id$
26  */
27 #ifndef FIRM_BE_BEDOMFRONT_H
28 #define FIRM_BE_BEDOMFRONT_H
29
30 #include "irnode.h"
31 #include "irgraph.h"
32
33 /*
34  * Forward type declaration.
35  */
36 typedef struct _be_dom_front_info_t be_dom_front_info_t;
37
38 /**
39  * Compute the dominance frontiers for a given graph.
40  * @param  irg The graphs.
41  * @return A pointer to the dominance frontier information.
42  */
43 be_dom_front_info_t *be_compute_dominance_frontiers(ir_graph *irg);
44
45 /**
46  * Free some dominance frontier information.
47  * @param info Some dominance frontier information.
48  */
49 void be_free_dominance_frontiers(be_dom_front_info_t *info);
50
51 /**
52  * Get the dominance frontier of a block.
53  * @param info  A pointer to the dominance frontier information.
54  * @param block The block whose dominance frontier you want.
55  * @return A list containing the all blocks in the dominance frontier of @p block.
56  */
57 ir_node **be_get_dominance_frontier(const be_dom_front_info_t *info, ir_node *block);
58
59 #endif /* FIRM_BE_BEDOMFRONT_H */