X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firlivechk.h;h=4d258cbdfa8339efa1b183edca2ddcfc4c9d5720;hb=e350b484176725a82b3fce4ed2466a91c1b37f88;hp=3831fd70b3927530290720522dc42459a5c5757f;hpb=1270f179b17caf2cdf98d4ac95192650b3258090;p=libfirm diff --git a/include/libfirm/irlivechk.h b/include/libfirm/irlivechk.h index 3831fd70b..4d258cbdf 100644 --- a/include/libfirm/irlivechk.h +++ b/include/libfirm/irlivechk.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2007 Inria Rhone-Alpes. All right reserved. * * This file is part of libFirm. * @@ -22,17 +22,19 @@ * @author Sebastian Hack * @date 22.04.2007 * @version $Id$ - * @summary + * @brief * * Live in/end checks whose only precomputation concerns the structure of the CFG. * Hence, nothing has to be updated if the program is modified unless the CFG is touched. * See .c file for more comments. */ + #ifndef FIRM_ANA_IRLIVECHK_H #define FIRM_ANA_IRLIVECHK_H #include "irgraph.h" #include "irnode.h" +#include "dfs.h" typedef enum { lv_chk_state_in = 1, @@ -46,9 +48,10 @@ typedef struct _lv_chk_t lv_chk_t; /** * Make a new liveness check environment. * @param irg The graph. + * @param dfs A forward DFS on CFG of the given irg. * @return The environment. */ -extern lv_chk_t *lv_chk_new(ir_graph *irg); +extern lv_chk_t *lv_chk_new(ir_graph *irg, const dfs_t *dfs); /** * Free liveness check information. @@ -56,9 +59,6 @@ extern lv_chk_t *lv_chk_new(ir_graph *irg); */ extern void lv_chk_free(lv_chk_t *lv); -#define lv_chk_bl_end(lv, bl, irn) ((lv_chk_bl_xxx((lv), (bl), (irn)) & lv_chk_state_end) != 0) -#define lv_chk_bl_out(lv, bl, irn) ((lv_chk_bl_xxx((lv), (bl), (irn)) & lv_chk_state_out) != 0) -#define lv_chk_bl_in(lv, bl, irn) ((lv_chk_bl_xxx((lv), (bl), (irn)) & lv_chk_state_in) != 0) /** * Return liveness information for a node concerning a block. @@ -69,4 +69,8 @@ extern void lv_chk_free(lv_chk_t *lv); */ extern unsigned lv_chk_bl_xxx(const lv_chk_t *lv, const ir_node *bl, const ir_node *irn); +#define lv_chk_bl_in(lv, bl, irn) ((lv_chk_bl_xxx((lv), (bl), (irn)) & lv_chk_state_in) != 0) +#define lv_chk_bl_end(lv, bl, irn) ((lv_chk_bl_xxx((lv), (bl), (irn)) & lv_chk_state_end) != 0) +#define lv_chk_bl_out(lv, bl, irn) ((lv_chk_bl_xxx((lv), (bl), (irn)) & lv_chk_state_out) != 0) + #endif /* FIRM_ANA_IRLIVECHK_H */