amd64: Spell amd64 as AMD64 in macro names.
[libfirm] / ir / be / beirgmod.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       Backend IRG modification routines.
9  * @author      Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
10  * @date        04.05.2005
11  *
12  * This file contains the following IRG modifications for be routines:
13  * - insertion of Perm nodes
14  * - empty block elimination
15  * - a simple dead node elimination (set inputs of unreachable nodes to BAD)
16  */
17 #ifndef FIRM_BE_BEIRGMOD_H
18 #define FIRM_BE_BEIRGMOD_H
19
20 #include "be_types.h"
21 #include "firm_types.h"
22
23 /**
24  * Insert a Perm which permutes all (non-ignore) live values of a given register class
25  * before a certain instruction.
26  * @param lv        Liveness Information.
27  * @param irn       The node to insert the Perm before.
28  * @return          The Perm or NULL if nothing was live before @p irn.
29  */
30 ir_node *insert_Perm_before(ir_graph *irg, const arch_register_class_t *cls,
31                                                    ir_node *irn);
32
33 /**
34  * Removes basic blocks that only contain a jump instruction
35  * (this will potentially create critical edges).
36  *
37  * @param irg  the graph that will be changed
38  *
39  * @return non-zero if the graph was changed, zero else
40  */
41 int be_remove_empty_blocks(ir_graph *irg);
42
43 /**
44  * Removes dead nodes from schedule
45  * @param irg  the graph
46  */
47 void be_remove_dead_nodes_from_schedule(ir_graph *irg);
48
49 #endif