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 #include "begin.h"
17 
27 FIRM_API unsigned get_irn_n_outs(const ir_node *node);
28 
30 FIRM_API ir_node *get_irn_out(const ir_node *def, unsigned pos);
31 
36 FIRM_API ir_node *get_irn_out_ex(const ir_node *def, unsigned pos, int *in_pos);
37 
39 FIRM_API unsigned get_Block_n_cfg_outs(const ir_node *node);
40 
42 FIRM_API unsigned get_Block_n_cfg_outs_ka(const ir_node *node);
43 
45 FIRM_API ir_node *get_Block_cfg_out(const ir_node *node, unsigned pos);
46 
48 FIRM_API ir_node *get_Block_cfg_out_ex(const ir_node *node, unsigned pos,
49  int *in_pos);
50 
52 FIRM_API ir_node *get_Block_cfg_out_ka(const ir_node *node, unsigned pos);
53 
58 FIRM_API void irg_out_walk(ir_node *node, irg_walk_func *pre,
59  irg_walk_func *post, void *env);
60 
66 FIRM_API void irg_out_block_walk(ir_node *node, irg_walk_func *pre,
67  irg_walk_func *post, void *env);
68 
75 FIRM_API void compute_irg_outs(ir_graph *irg);
76 
78 FIRM_API void assure_irg_outs(ir_graph *irg);
79 
81 FIRM_API void free_irg_outs(ir_graph *irg);
82 
85 #include "end.h"
86 
87 #endif
void irg_out_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env)
Walks over the graph starting at node.
unsigned get_irn_n_outs(const ir_node *node)
Returns the number of successors of the node:
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.
void free_irg_outs(ir_graph *irg)
Frees memory occupied by out edges data structures.
void irg_walk_func(ir_node *, void *)
type for graph-walk callbacks
Definition: firm_types.h:94
unsigned get_Block_n_cfg_outs(const ir_node *node)
Returns the number of control flow successors, ignore keep-alives.
void assure_irg_outs(ir_graph *irg)
Recomputes out edges if necessary.
void compute_irg_outs(ir_graph *irg)
Computes the out edges.
ir_node * get_Block_cfg_out(const ir_node *node, unsigned pos)
Access predecessor n, ignore keep-alives.
unsigned get_Block_n_cfg_outs_ka(const ir_node *node)
Returns the number of control flow successors, honor keep-alives.
ir_node * get_Block_cfg_out_ka(const ir_node *node, unsigned pos)
Access predecessor n, honor keep-alives.
struct ir_node ir_node
Procedure Graph Node.
Definition: firm_types.h:53
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.
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_irn_out(const ir_node *def, unsigned pos)
Returns the User of a node from the Def-Use edge at position pos.
struct ir_graph ir_graph
Procedure Graph.
Definition: firm_types.h:74