1 /* $Id: lv.h,v 1.4 1994/06/24 10:26:31 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* L I V E V A R I A B L E S A N A L Y S I S
12 #define USE(b) (b)->b_extend->bx_lv.bx_use
13 #define DEF(b) (b)->b_extend->bx_lv.bx_def
14 #define L_IN(b) (b)->b_extend->bx_lv.bx_lin
15 #define L_OUT(b) (b)->b_extend->bx_lv.bx_lout
17 extern short nrglobals; /* number of global variables for which
18 * ud-info is maintained.
20 extern short nrvars; /* total number of variables (global + local)
21 * for which ud-info is maintained.
24 /* Every global variable for which ud-info is maintained has
25 * a 'global variable number' (o_globnr). Every useful local
26 * has a 'local variable number', which is its index in the
27 * 'locals' table. All these variables also have a
28 * 'variable number'. Conversions exist between these numbers.
31 #define TO_GLOBAL(v) (v)
32 #define TO_LOCAL(v) (v - nrglobals)
33 #define GLOB_TO_VARNR(v) (v)
34 #define LOC_TO_VARNR(v) (v + nrglobals)
35 #define IS_GLOBAL(v) (v <= nrglobals)
36 #define IS_LOCAL(v) (v > nrglobals)
38 #define REGVAR(lc) lc->lc_flags |= LCF_REG
39 #define IS_REGVAR(lc) (lc->lc_flags & LCF_REG)
40 #define BADLC(lc) lc->lc_flags |= LCF_BAD
41 #define IS_BADLC(lc) (lc->lc_flags & LCF_BAD)
42 #define LIVE(lc) lc->lc_flags |= LCF_LIVE
43 #define DEAD(lc) lc->lc_flags &= ~LCF_LIVE
44 #define IS_LIVE(lc) (lc->lc_flags & LCF_LIVE)
45 #define IS_DEAD(lc) (!(lc->lc_flags & LCF_LIVE))