2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief Backend IRG modification routines.
9 * @author Sebastian Hack, Daniel Grund, Matthias Braun, Christian Wuerdig
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)
17 #ifndef FIRM_BE_BEIRGMOD_H
18 #define FIRM_BE_BEIRGMOD_H
21 #include "firm_types.h"
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.
30 ir_node *insert_Perm_before(ir_graph *irg, const arch_register_class_t *cls,
34 * Removes basic blocks that only contain a jump instruction
35 * (this will potentially create critical edges).
37 * @param irg the graph that will be changed
39 * @return non-zero if the graph was changed, zero else
41 int be_remove_empty_blocks(ir_graph *irg);
44 * Removes dead nodes from schedule
45 * @param irg the graph
47 void be_remove_dead_nodes_from_schedule(ir_graph *irg);