X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Fcdep.h;h=b37e17f52f01895c7c07af8c1eaf59fc2d63b30f;hb=ce29d67e4cf75e435dd50b15a294a07a3b3e6309;hp=17e6a447b7d02cd3f33da53d26aa6cf00b984705;hpb=c021732d2f0c04113e6afd153a7a9be38e40ca6f;p=libfirm diff --git a/include/libfirm/cdep.h b/include/libfirm/cdep.h index 17e6a447b..b37e17f52 100644 --- a/include/libfirm/cdep.h +++ b/include/libfirm/cdep.h @@ -21,7 +21,6 @@ * @file * @brief control dependence analysis * @author Christoph Mallon - * @version $Id$ */ #ifndef FIRM_ANA_CDEP_H #define FIRM_ANA_CDEP_H @@ -29,59 +28,57 @@ #include "firm_types.h" #include "begin.h" -/** - * An entry in the control dependence list. +/** @ingroup irana + * @defgroup ir_cdep Control Dependence + * @{ */ -struct ir_cdep { - ir_node *node; /**< A node on which the current block is control dependent on. */ - ir_cdep *next; /**< Link to the next one if any. */ -}; -/** Compute the control dependence graph for a graph. */ -FIRM_DLL void compute_cdep(ir_graph *irg); +/** Computes the control dependence graph for a graph. */ +FIRM_API void compute_cdep(ir_graph *irg); -/** Free the control dependence info. */ -FIRM_DLL void free_cdep(ir_graph *irg); +/** Frees the control dependence info. */ +FIRM_API void free_cdep(ir_graph *irg); -/** - * Return a list of all control dependences of a block. - */ -FIRM_DLL ir_cdep *find_cdep(const ir_node *block); +/** Returns control dependent block */ +FIRM_API ir_node *get_cdep_node(const ir_cdep *cdep); + +/** Returns next entry in a list of cdeps */ +FIRM_API ir_cdep *get_cdep_next(const ir_cdep *cdep); /** - * Replace the control dependence info of old by the info of nw. + * Returns a list of all control dependences of a block. */ -FIRM_DLL void exchange_cdep(ir_node *old, const ir_node *nw); +FIRM_API ir_cdep *find_cdep(const ir_node *block); /** - * Check whether dependee is (directly) control dependent on candidate. - * - * @param dependee the (possible) dependent block - * @param candidate the (possible) block on which dependee is dependent + * Replaces the control dependence info of old by the info of nw. */ -FIRM_DLL int is_cdep_on(const ir_node *dependee, const ir_node *candidate); +FIRM_API void exchange_cdep(ir_node *old, const ir_node *nw); /** - * Check whether dependee is (possible iterated) control dependent on candidate. + * Checks whether dependee is (directly) control dependent on candidate. * * @param dependee the (possible) dependent block * @param candidate the (possible) block on which dependee is dependent */ -FIRM_DLL int is_iterated_cdep_on(ir_node *dependee, ir_node *candidate); +FIRM_API int is_cdep_on(const ir_node *dependee, const ir_node *candidate); /** - * If block is control dependent on exactly one node, return this node, else NULL. + * If block is control dependent on exactly one node, returns this node, + * else NULL. * * @param block the block to check */ -FIRM_DLL ir_node *get_unique_cdep(const ir_node *block); +FIRM_API ir_node *get_unique_cdep(const ir_node *block); /** - * Check if the given block is control dependent of more than one node. + * Checks if the given block is control dependent of more than one node. * * @param block the block to check */ -FIRM_DLL int has_multiple_cdep(const ir_node *block); +FIRM_API int has_multiple_cdep(const ir_node *block); + +/** @} */ #include "end.h"