ir/ir/irop_t.h added
[libfirm] / ir / ana2 / typalise.h
1 /* -*- c -*- */
2
3 /*
4  * Project:     libFIRM
5  * File name:   ir/ana2/typalise.h
6  * Purpose:     Compute rough approximations of pointer types
7  * Author:      Florian
8  * Modified by:
9  * Created:     Mon 18 Oct 2004
10  * CVS-ID:      $Id$
11  * Copyright:   (c) 1999-2004 Universität Karlsruhe
12  * Licence:     This file is protected by GPL -  GNU GENERAL PUBLIC LICENSE.
13  */
14
15 # ifndef _TYPALISE_H_
16 # define _TYPALISE_H_
17
18 # include "lset.h"
19
20 # include "type.h"
21 # include "irnode.h"
22
23 /*
24   Data Types and Structures
25 */
26 typedef enum typalise_kind_enum {
27   type_invalid = 0,             /* invalid (only set at deletion time) */
28   type_exact = 1,               /* this and only this type (res.type) */
29   type_types = 2,               /* these types (res.types) */
30   type_type  = 3                /* this type and sub types (res.type) */
31 } typalise_kind;
32
33 typedef struct typalise
34 {
35   typalise_kind kind;
36   union {
37     ir_type *type;              /* for kind == kind_exact and kind == kind_type */
38     lset_t *types;              /* for kind == kind_types */
39   } res;
40   int id;
41 } typalise_t;
42
43 /*
44   Protos
45 */
46 /**
47    Given a set of graphs and a typalise_t,  return the method (s) in
48    the set that are supported by the typalise_t.  Also, deallocates
49    the given set.
50 */
51 lset_t *filter_for_ta (lset_t*, typalise_t*);
52
53 /**
54    For the given ptr, do a quick check about what (class) types may be
55    brought along on it.
56 */
57 typalise_t *typalise (ir_node*);
58
59 /*
60   Initialise the Typalise module
61 */
62 void typalise_init (void);
63
64 # endif /* not defined _TYPALISE_H_ */
65
66 \f
67 /*
68   $Log$
69   Revision 1.4  2006/01/13 21:54:03  beck
70   renamed all types 'type' to 'ir_type'
71
72   Revision 1.3  2005/03/22 13:56:09  liekweg
73   "small" fix for exception b/d
74
75   Revision 1.2  2004/10/21 11:11:21  liekweg
76   whitespace fix
77
78   Revision 1.1  2004/10/21 11:09:37  liekweg
79   Moved memwalk stuf into irmemwalk
80   Moved lset stuff into lset
81   Moved typalise stuff into typalise
82
83
84  */