libFirm
cdep.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5 
11 #ifndef FIRM_ANA_CDEP_H
12 #define FIRM_ANA_CDEP_H
13 
14 #include "firm_types.h"
15 #include "begin.h"
16 
23 FIRM_API void compute_cdep(ir_graph *irg);
24 
26 FIRM_API void free_cdep(ir_graph *irg);
27 
29 FIRM_API ir_node *get_cdep_node(const ir_cdep *cdep);
30 
32 FIRM_API ir_cdep *get_cdep_next(const ir_cdep *cdep);
33 
37 FIRM_API ir_cdep *find_cdep(const ir_node *block);
38 
42 FIRM_API void exchange_cdep(ir_node *old, const ir_node *nw);
43 
50 FIRM_API int is_cdep_on(const ir_node *dependee, const ir_node *candidate);
51 
58 FIRM_API ir_node *get_unique_cdep(const ir_node *block);
59 
65 FIRM_API int has_multiple_cdep(const ir_node *block);
66 
69 #include "end.h"
70 
71 #endif
void free_cdep(ir_graph *irg)
Frees the control dependence info.
int has_multiple_cdep(const ir_node *block)
Checks if the given block is control dependent of more than one node.
ir_cdep * get_cdep_next(const ir_cdep *cdep)
Returns next entry in a list of cdeps.
struct ir_cdep ir_cdep
Control Dependence Analysis Results.
Definition: firm_types.h:86
ir_cdep * find_cdep(const ir_node *block)
Returns a list of all control dependences of a block.
void compute_cdep(ir_graph *irg)
Computes the control dependence graph for a graph.
void exchange_cdep(ir_node *old, const ir_node *nw)
Replaces the control dependence info of old by the info of nw.
int is_cdep_on(const ir_node *dependee, const ir_node *candidate)
Checks whether dependee is (directly) control dependent on candidate.
ir_node * get_cdep_node(const ir_cdep *cdep)
Returns control dependent block.
struct ir_node ir_node
Procedure Graph Node.
Definition: firm_types.h:53
struct ir_graph ir_graph
Procedure Graph.
Definition: firm_types.h:74
ir_node * get_unique_cdep(const ir_node *block)
If block is control dependent on exactly one node, returns this node, else NULL.