remove conv after load and before stores
[libfirm] / ir / ana2 / lset.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    Lists, err, Sets
25  * @author   Florian
26  * @date     Mon 18 Oct 2004
27  * @version  $Id$
28  */
29 # ifndef FIRM_ANA2_LSET_H
30 # define FIRM_ANA2_LSET_H
31
32 /*
33   Data Types and Structures
34 */
35 /* Lists, err, Sets */
36 typedef struct lset_entry
37 {
38   void *data;
39   struct lset_entry *next;
40 } lset_entry_t;
41
42 typedef struct lset
43 {
44   lset_entry_t *first;
45   lset_entry_t *last;           /* useful for lset_append */
46   lset_entry_t *curs;           /* for lset_first/lset_next */
47   int n_entries;
48 } lset_t;
49
50 /* create a new lset */
51 lset_t *lset_create (void);
52 /* check whether the lset contains an entry for the given data */
53 int lset_contains (lset_t*, void*);
54 /* check whether the given lset is empty */
55 int lset_empty (lset_t*);
56 /* insert the data into the lset (unless there's an entry for it
57    already) */
58 void lset_insert (lset_t*, void*);
59 /* insert all entries from src into tgt */
60 void lset_insert_all (lset_t*, lset_t*);
61 /* append src to tgt. src is deallocated. */
62 void lset_append (lset_t*, lset_t*);
63
64 /* remove the entry for the given data element from the lset. return
65    TRUE iff it was on the list in the first place, FALSE else */
66 int lset_remove (lset_t*, void*);
67 /* prepare the given lset for an iteration. return the first element. */
68 void *lset_first (lset_t*);
69 /* after calling lset_first, get the next element, if applicable, or
70    NULL */
71 void *lset_next (lset_t*);
72 /* say how many entries there are in the given lset */
73 int lset_n_entries (lset_t*);
74 /* deallocate the lset and all of its entries */
75 void lset_destroy (lset_t*);
76
77
78
79 # endif
80
81 \f
82 /*
83   $Log$
84   Revision 1.1  2004/10/21 11:09:37  liekweg
85   Moved memwalk stuf into irmemwalk
86   Moved lset stuff into lset
87   Moved typalise stuff into typalise
88
89
90  */