X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeuses.h;h=b69ddc10602e5d774823a67dc560a0c254fd968c;hb=3dc38f8f23569593c030b85e83ecd9174a95bc73;hp=06a97b0f265187367c51fea2991aaee55c2e01ff;hpb=1013579946ac0cdb7e1461a6b52006e01d87716b;p=libfirm diff --git a/ir/be/beuses.h b/ir/be/beuses.h index 06a97b0f2..b69ddc106 100644 --- a/ir/be/beuses.h +++ b/ir/be/beuses.h @@ -1,29 +1,44 @@ /** * @file beuse.h * @date 27.06.2005 - * @author Sebastian Hack + * @author Sebastian Hack, Matthias Braun * * Determine future usages of values. * * Copyright (C) 2005 Universitaet Karlsruhe * Released under the GPL */ - #ifndef _BEUSES_H #define _BEUSES_H -#define USES_INFINITY 1000000 -#define USES_IS_INIFINITE(x) ((x) >= USES_INFINITY) +#include "bearch.h" +#include "belive.h" + +typedef struct _be_next_use_t { + unsigned time; + int outermost_loop; +} be_next_use_t; + +#define USES_INFINITY 10000000 +#define USES_PENDING 9999999 + +static INLINE int USES_IS_INFINITE(unsigned time) +{ + return time >= USES_INFINITY; +} + +static INLINE int USES_IS_PENDING(unsigned time) +{ + return time == USES_PENDING; +} -typedef struct _loc_t loc_t; typedef struct _be_uses_t be_uses_t; -unsigned be_get_next_use(be_uses_t *uses, const ir_node *from, - unsigned from_step, const ir_node *def); +be_next_use_t be_get_next_use(be_uses_t *uses, ir_node *from, + unsigned from_step, const ir_node *def, + int skip_from_uses); -be_uses_t *be_begin_uses(ir_graph *irg, - const arch_env_t *arch_env, - const arch_register_class_t *cls); +be_uses_t *be_begin_uses(ir_graph *irg, const be_lv_t *lv); void be_end_uses(be_uses_t *uses);