Fixed include ring
[libfirm] / ir / tv / tv_t.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/tv/tv_t.h
4  * Purpose:     Representation of and static computations on target machine
5  *              values -- private header.
6  * Author:      Mathias Heil
7  * Modified by:
8  * Created:
9  * CVS-ID:      $Id$
10  * Copyright:   (c) 2003 Universität Karlsruhe
11  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
12  */
13
14
15
16 #ifndef _TV_T_H_
17 #define _TV_T_H_
18
19 #include "entity.h"
20 #include "irmode.h"
21 #include "tv.h"
22
23
24 /**
25  * Initialization of the tarval module.
26  *
27  * Call before init_mode().
28  */
29 void init_tarval_1(void);
30
31 /**
32  * Initialization of the tarval module.
33  *
34  * Call after init_mode().
35  */
36 void init_tarval_2(void);
37
38 /**
39  * Free all memory occupied by the tarval module.
40  */
41 void finish_tarval(void);
42
43 /**
44  * This struct represents the afore mentioned tarvals.
45  *
46  * A tarval struct consists of an internal representation of the
47  * value and some additional fields further describing the value.
48  *
49  * ATTRIBUTES:
50  *   - ir_mode *mode     The mode of the stored value
51  *   - void *value       The internal representation
52  *
53  * @sa
54  *   irmode.h for predefined modes
55  */
56 struct tarval {
57     ir_mode *mode;      /**< the mode of the stored value */
58     const void *value;      /**< the value stored in an internal way... */
59     unsigned int length;    /**< the length of the stored value */
60   /* void *link; */                   /**< some opaque information */
61 };
62
63 /** remove tarval representing an entity that is about to be destroyed */
64 void free_tarval_entity(entity *ent);
65
66 #endif /* _TV_T_H_ */