2 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief modifies schedule so flags dependencies are respected.
23 * @author Matthias Braun, Christoph Mallon
25 #ifndef FIRM_BE_BEFLAGS_H
26 #define FIRM_BE_BEFLAGS_H
32 * Callback which rematerializes (=duplicates) a machine node.
34 typedef ir_node * (*func_rematerialize) (ir_node *node, ir_node *after);
37 * Callback function that checks whether a node modifies the flags
39 typedef bool (*check_modifies_flags) (const ir_node *node);
42 * Walks the schedule and ensures that flags aren't destroyed between producer
43 * and consumer of flags. It does so by moving down/rematerialising of the
44 * nodes. This does not work across blocks.
45 * The callback functions may be NULL if you want to use default
48 void be_sched_fix_flags(ir_graph *irg, const arch_register_class_t *flag_cls,
49 func_rematerialize remat_func,
50 check_modifies_flags check_modifies_flags_func);