X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbesched.h;h=e02d940239a21eb037b4cf268ecd8ae620d3fd32;hb=dd4cd761ab637d4488c7e29f49843b1b02366acf;hp=3f3bf9c5d08c4e107624857a862274c9c85d3652;hpb=4d5c3365a58cba59993045a9e08e686d8ae079a7;p=libfirm diff --git a/ir/be/besched.h b/ir/be/besched.h index 3f3bf9c5d..e02d94023 100644 --- a/ir/be/besched.h +++ b/ir/be/besched.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -17,20 +17,29 @@ * PURPOSE. */ -/* - * Scheduling utilities for nodes in Blocks and Blocks. - * - * $Id$ +/** + * @file + * @brief Scheduling utilities for nodes in Blocks and Blocks. + * @author Sebastian Hack + * @version $Id$ */ -#ifndef _BESCHED_H -#define _BESCHED_H +#ifndef FIRM_BE_BESCHED_H +#define FIRM_BE_BESCHED_H #include -#include "firm_types.h" +#include "irgraph.h" +#include "irnode.h" +#include "beirg.h" void be_sched_dump(FILE *f, ir_graph *irg); +/** + * returns the time step of a node. Each node in a block has a timestep + * unique to that block. a node schedule before another node has a lower + * timestep than this node. + */ +int have_sched_info(const ir_graph *irg); int sched_get_time_step(const ir_node *irn); int sched_has_next(const ir_node *irn); int sched_has_prev(const ir_node *irn); @@ -39,11 +48,11 @@ ir_node *sched_next(const ir_node *irn); ir_node *sched_prev(const ir_node *irn); ir_node *sched_first(const ir_node *block); ir_node *sched_last(const ir_node *block); -ir_node *sched_add_before(ir_node *before, ir_node *irn); -ir_node *sched_add_after(ir_node *before, ir_node *irn); -void sched_init_block(ir_node *block); -void sched_reset(ir_node *node); -void sched_remove(ir_node *irn); +void sched_add_before(const ir_node *before, const ir_node *irn); +void sched_add_after(const ir_node *after, const ir_node *irn); +void sched_init_block(const ir_node *block); +void sched_reset(const ir_node *node); +void sched_remove(const ir_node *irn); #define sched_is_end(irn) is_Block(irn) #define sched_is_begin(irn) is_Block(irn) @@ -74,6 +83,9 @@ void sched_remove(ir_node *irn); * Removes dead nodes from schedule * @param irg the graph */ -void be_remove_dead_nodes_from_schedule(ir_graph *irg); +void be_remove_dead_nodes_from_schedule(be_irg_t *birg); + +void be_sched_init_phase(ir_graph *irg); +void be_sched_free_phase(ir_graph *irg); -#endif /* _BESCHED_H */ +#endif /* FIRM_BE_BESCHED_H */