Loads do not remove any nodes from the exec after sets. Also fix a 'node leak'.
[libfirm] / ir / ana2 / typalise.h
1 /* -*- c -*- */
2
3 /*
4  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
5  *
6  * This file is part of libFirm.
7  *
8  * This file may be distributed and/or modified under the terms of the
9  * GNU General Public License version 2 as published by the Free Software
10  * Foundation and appearing in the file LICENSE.GPL included in the
11  * packaging of this file.
12  *
13  * Licensees holding valid libFirm Professional Edition licenses may use
14  * this file in accordance with the libFirm Commercial License.
15  * Agreement provided with the Software.
16  *
17  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE.
20  */
21
22 /**
23  * @file
24  * @brief   Compute rough approximations of pointer types
25  * @author  Florian
26  * @date    Mon 18 Oct 2004
27  * @version $Id$
28  */
29 # ifndef FIRM_ANA2_TYPALISE_H
30 # define FIRM_ANA2_TYPALISE_H
31
32 # include "lset.h"
33
34 # include "type.h"
35 # include "irnode.h"
36
37 /*
38   Data Types and Structures
39 */
40 typedef enum typalise_kind_enum {
41   type_invalid = 0,             /* invalid (only set at deletion time) */
42   type_exact = 1,               /* this and only this type (res.type) */
43   type_types = 2,               /* these types (res.types) */
44   type_type  = 3                /* this type and sub types (res.type) */
45 } typalise_kind;
46
47 typedef struct typalise
48 {
49   typalise_kind kind;
50   union {
51     ir_type *type;              /* for kind == kind_exact and kind == kind_type */
52     lset_t *types;              /* for kind == kind_types */
53   } res;
54   int id;
55 } typalise_t;
56
57 /*
58   Protos
59 */
60 /**
61    Given a set of graphs and a typalise_t,  return the method (s) in
62    the set that are supported by the typalise_t.  Also, deallocates
63    the given set.
64 */
65 lset_t *filter_for_ta (lset_t*, typalise_t*);
66
67 /**
68    For the given ptr, do a quick check about what (class) types may be
69    brought along on it.
70 */
71 typalise_t *typalise (ir_node*);
72
73 /*
74   Initialise the Typalise module
75 */
76 void typalise_init (void);
77
78 # endif
79
80 \f
81 /*
82   $Log$
83   Revision 1.4  2006/01/13 21:54:03  beck
84   renamed all types 'type' to 'ir_type'
85
86   Revision 1.3  2005/03/22 13:56:09  liekweg
87   "small" fix for exception b/d
88
89   Revision 1.2  2004/10/21 11:11:21  liekweg
90   whitespace fix
91
92   Revision 1.1  2004/10/21 11:09:37  liekweg
93   Moved memwalk stuf into irmemwalk
94   Moved lset stuff into lset
95   Moved typalise stuff into typalise
96
97
98  */