* configure.ac: New switch for disabling -O2 (--disable-optimizations).
[cacao.git] / src / vm / jit / optimizing / lifetimes.h
1 /* src/vm/jit/optimizing/lifetimes.h - lifetimes header
2
3    Copyright (C) 2005, 2006, 2008
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21    02111-1307, USA.
22
23 */
24
25
26 #ifndef _LIFETIMES_H
27 #define _LIFETIMES_H
28
29 #include "config.h"
30
31 #include "vm/jit/optimizing/dominators.hpp"
32
33 #if !defined(NDEBUG)
34 # include <assert.h>
35 # define LT_DEBUG_CHECK
36 /* # define LT_DEBUG_VERBOSE */
37 #endif
38
39 #ifdef LT_DEBUG_CHECK
40 # define _LT_CHECK_BOUNDS(i,l,h) assert( ((i) >= (l)) && ((i) < (h)));
41 # define _LT_ASSERT(a) assert((a));
42 #else
43 # define _LT_CHECK_BOUNDS(i,l,h)
44 # define _LT_ASSERT(a)
45 #endif
46
47 #define LT_BB_IN 3
48 #define LT_BB_OUT 2
49 #define LT_DEF 1
50 #define LT_USE 0
51
52 typedef struct site *lt_iterator;
53 void lt_scanlifetimes(jitdata *, graphdata *, dominatordata *);
54 void lt_add_ss(struct lifetime *, stackelement_t *);
55 void lt_remove_use_site(struct lifetime *lt, int block, int iindex);
56 void lt_move_use_sites(struct lifetime *from, struct lifetime *to);
57 void lt_lifeness_analysis(jitdata *, graphdata *);
58 #endif /* _LIFETIMES_H */
59
60 /*
61  * These are local overrides for various environment variables in Emacs.
62  * Please do not remove this and leave it at the end of the file, where
63  * Emacs will automagically detect them.
64  * ---------------------------------------------------------------------
65  * Local variables:
66  * mode: c
67  * indent-tabs-mode: t
68  * c-basic-offset: 4
69  * tab-width: 4
70  * End:
71  */