X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgmod.h;h=36c4fd8f5ec7815ba6980b8374cbd29782647e5d;hb=5f8ddee6b08c8040c0a304a347d65045c1141d52;hp=513a0114d81d57093bbcf675a75263c4dcbb92ea;hpb=efbeaff549fcc6015da255ed4d453a95937ff0fd;p=libfirm diff --git a/ir/ir/irgmod.h b/ir/ir/irgmod.h index 513a0114d..36c4fd8f5 100644 --- a/ir/ir/irgmod.h +++ b/ir/ir/irgmod.h @@ -3,51 +3,24 @@ ** ** Authors: Martin Trapp, Christian Schaefer ** -** irgmod.h: ir graph modification*/ +** irgmod.h: ir graph modification +*/ -# include "irgraph.h" -# include "ircons.h" -# include "array.h" -# include "misc.h" +# ifndef _IRGMOD_H_ +# define _IRGMOD_H_ -/* ir_node *arg_access (ir_mode *mode, long proj); */ +# include "irnode.h" - -inline ir_node *get_r_value_internal (ir_node *block, int pos, ir_mode *mode); - - -/** Needed only during ir_graph construction. Should all go into - ircons.ch **/ - -/* Read a store. - Use this function to get the most recent version of the store (type M). - Internally it does the same as get_value. */ -ir_node *get_store (void); - -/* write a store */ -void set_store (ir_node *store); - -/* add a control flow edge */ -void add_in_edge (ir_node *block, ir_node *jmp); - -/* read a value from the array with the local variables */ -ir_node *get_value (int pos, ir_mode *mode); - -/* write a value in the array with the local variables */ -void set_value (int pos, ir_node *value); - -/* fixes the number of predecessors of a block. */ -void mature_block (ir_node *block); - -/* sets current block */ -void switch_block (ir_node *target); - - -/** always useful, e.g. for optimizations. **/ -/* turns a node into a tuple. The tuples predecessors have to be - set by hand. */ +/* Turns a node into a "useless" Tuple. The Tuple node just forms a tuple + from several inputs. The predecessors of the tuple have to be + set by hand. + This is useful if a node returning a tuple is removed, but the Projs + extracting values from the tuple are not available. */ void turn_into_tuple (ir_node *node, int arity); -/* exchanges two nodes by conserving edges leaving old (i.e., pointers - pointing to old. */ +/* Exchanges two nodes by conserving edges leaving old (i.e., pointers + pointing to old). Turns the old node into an Id. Requires that + current_ir_graph is set properly. */ inline void exchange (ir_node *old, ir_node *new); + +#endif /* ifndef _IRGMOD_H_ */