not needed
[libfirm] / ir / be / beirgmod.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
23  * This file contains the following IRG modifications for be routines:
24  * - insertion of Perm nodes
25  * - empty block elimination
26  * - a simple dead node elimination (set inputs of unreachable nodes to BAD)
27  *
28  * @author      Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
29  * @date        04.05.2005
30  * @version     $Id$
31  * Copyright:   (c) Universitaet Karlsruhe
32  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
33  */
34 #ifndef _FIRM_BE_IRGMOD_H_
35 #define _FIRM_BE_IRGMOD_H_
36
37 #include "irnode.h"
38 #include "beirg.h"
39
40 #if 0
41 /**
42  * Introduce several copies for one node.
43  *
44  * A copy in this context means, that you want to introduce several new
45  * abstract values (in Firm: nodes) for which you know, that they
46  * represent the same concrete value. This is the case if you
47  * - copy
48  * - spill and reload
49  * - re-materialize
50  * a value.
51  *
52  * This function reroutes all uses of the original value to the copies in the
53  * corresponding dominance subtrees and creates Phi functions where necessary.
54  *
55  * @note The visited flag and link fields are used.
56  *
57  * @param info            Dominance frontier information.
58  * @param lv          Liveness information to be updated. If NULL, no liveness
59  *                    updating is performed.
60  * @param value       The value that has been duplicated.
61  * @param copies_len  the length of the copies array
62  * @param copie       an array holding all copies of the value
63  * @param phis        An ARR_F where all newly created phis will be inserted,
64  *                    may be NULL
65  * @param ignore_uses A set of nodes probably using one of the nodes in
66  *                    @p nodes. Their usage will not adjusted. They remain
67  *                    untouched by this function. May be NULL.
68  */
69 ir_node **be_ssa_construction(const be_dom_front_info_t *info, be_lv_t *lv,
70                             ir_node *value, int copies_len, ir_node **copies,
71                             const ir_nodeset_t *ignore_uses, int need_new_phis);
72
73 /** @deprecated */
74 void be_ssa_constr_set_ignore(const be_dom_front_info_t *info, be_lv_t *lv,
75                               pset *nodes, pset *ignores);
76 #endif
77
78 /**
79  * Insert a Perm which permutes all (non-ignore) live values of a given register class
80  * after a certain instruction.
81  * @param lv        Liveness Information.
82  * @param irn       The node to insert the Perm after.
83  * @return          The Perm or NULL if nothing was live before @p irn.
84  */
85 ir_node *insert_Perm_after(be_irg_t *birg, const arch_register_class_t *cls,
86                                                    ir_node *irn);
87
88 /**
89  * Removes basic blocks that only contain a jump instruction
90  * (this will potentially create critical edges).
91  *
92  * @param irg  the graph that will be changed
93  *
94  * @return non-zero if the graph was changed, zero else
95  */
96 int be_remove_empty_blocks(ir_graph *irg);
97
98 #endif /* _BEIRGMOD_H */