libFirm
irouts.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5 
12 #ifndef FIRM_ANA_IROUTS_H
13 #define FIRM_ANA_IROUTS_H
14 
15 #include "firm_types.h"
16 
17 #include "begin.h"
18 
28 FIRM_API unsigned get_irn_n_outs(const ir_node *node);
29 
31 FIRM_API ir_node *get_irn_out(const ir_node *def, unsigned pos);
32 
37 FIRM_API ir_node *get_irn_out_ex(const ir_node *def, unsigned pos, int *in_pos);
38 
40 FIRM_API unsigned get_Block_n_cfg_outs(const ir_node *node);
41 
43 FIRM_API unsigned get_Block_n_cfg_outs_ka(const ir_node *node);
44 
46 FIRM_API ir_node *get_Block_cfg_out(const ir_node *node, unsigned pos);
47 
49 FIRM_API ir_node *get_Block_cfg_out_ex(const ir_node *node, unsigned pos,
50  int *in_pos);
51 
53 FIRM_API ir_node *get_Block_cfg_out_ka(const ir_node *node, unsigned pos);
54 
59 FIRM_API void irg_out_walk(ir_node *node, irg_walk_func *pre,
60  irg_walk_func *post, void *env);
61 
67 FIRM_API void irg_out_block_walk(ir_node *node, irg_walk_func *pre,
68  irg_walk_func *post, void *env);
69 
76 FIRM_API void compute_irg_outs(ir_graph *irg);
77 
79 FIRM_API void assure_irg_outs(ir_graph *irg);
80 
82 FIRM_API void free_irg_outs(ir_graph *irg);
83 
86 #include "end.h"
87 
88 #endif
void irg_out_block_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
Walks only over Block nodes in the graph.
void irg_out_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
Walks over the graph starting at node.
ir_node * get_irn_out_ex(const ir_node *def, unsigned pos, int *in_pos)
Returns the User and its input position from the Def-Use edge of def at position pos.
ir_node * get_Block_cfg_out_ka(const ir_node *node, unsigned pos)
Access predecessor n, honor keep-alives.
void compute_irg_outs(ir_graph *irg)
Computes the out edges.
void irg_walk_func(ir_node *, void *)
type for graph-walk callbacks
Definition: firm_types.h:97
unsigned get_Block_n_cfg_outs(const ir_node *node)
Returns the number of control flow successors, ignore keep-alives.
ir_node * get_irn_out(const ir_node *def, unsigned pos)
Returns the User of a node from the Def-Use edge at position pos.
struct ir_node ir_node
Procedure Graph Node.
Definition: firm_types.h:53
void free_irg_outs(ir_graph *irg)
Frees memory occupied by out edges data structures.
unsigned get_Block_n_cfg_outs_ka(const ir_node *node)
Returns the number of control flow successors, honor keep-alives.
unsigned get_irn_n_outs(const ir_node *node)
Returns the number of successors of the node:
ir_node * get_Block_cfg_out(const ir_node *node, unsigned pos)
Access predecessor n, ignore keep-alives.
void assure_irg_outs(ir_graph *irg)
Recomputes out edges if necessary.
ir_node * get_Block_cfg_out_ex(const ir_node *node, unsigned pos, int *in_pos)
Access predecessor n, ignore keep-alives also return its input position.
struct ir_graph ir_graph
Procedure Graph.
Definition: firm_types.h:74