OSDN Git Service

Merge tree-ssa-20020619-branch into mainline.
[pf3gnuchains/gcc-fork.git] / libbanshee / engine / setst-sort.h
1 /*
2  * Copyright (c) 2000-2001
3  *      The Regents of the University of California.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. Neither the name of the University nor the names of its contributors
14  *    may be used to endorse or promote products derived from this software
15  *    without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  *
29  */
30
31 #ifndef SETST_SORT_H
32 #define SETST_SORT_H
33
34 #include "banshee.h"
35 #include "termhash.h"
36 #include "setst-var.h"
37
38 extern region setst_region;
39 extern term_hash setst_hash;
40
41 struct setst_term /* extends gen_e */
42 {
43 #ifdef NONSPEC
44   sort_kind sort;
45 #endif
46   int type;
47   stamp st;
48 };
49
50 typedef struct setst_term *setst_term;
51
52 stamp setst_get_stamp(gen_e e);
53 void setst_inclusion(con_match_fn_ptr,gen_e, gen_e);
54
55 gen_e setst_zero(void);
56 gen_e setst_one(void);
57 gen_e setst_fresh(const char *name);
58 gen_e setst_fresh_large(const char *name);
59 gen_e setst_fresh_small(const char *name);
60 gen_e setst_constant(const char *name) deletes;
61 gen_e setst_union(gen_e_list exprs) deletes;
62 gen_e setst_inter(gen_e_list exprs) deletes;
63 bool setst_is_zero(gen_e e);
64 bool setst_is_one(gen_e e);
65 bool setst_is_var(gen_e e);
66 bool setst_is_union(gen_e e);
67 bool setst_is_inter(gen_e e);
68 bool setst_is_constant(gen_e e);
69
70 char *setst_get_constant_name(gen_e e);
71 gen_e_list setst_get_union(gen_e e);
72 gen_e_list setst_get_inter(gen_e e);
73
74 gen_e_list setst_tlb(gen_e e,incl_fn_ptr setst_incl) deletes;
75 void setst_set_proj_cache(gen_e e, gen_e elem);
76 gen_e_list setst_get_proj_cache(gen_e e);
77
78
79 void setst_init(void);
80 void setst_reset(void) deletes;
81 void setst_print_stats(FILE *f);
82
83 extern struct setst_stats setst_stats;
84
85 struct setst_stats
86 {
87   int fresh;
88   int fresh_large;
89   int fresh_small;
90
91   int distinct_constructors;
92   int hashed_constructors;
93   int distinct_constants;
94   int hashed_constants;
95   int distinct_unions;
96   int filtered_unions;
97   int hashed_unions;
98   int distinct_intersections;
99   int filtered_intersections;
100   int hashed_intersections;
101
102   int redundant_var;
103   int redundant_source;
104   int redundant_sink;
105   
106   int added_var;
107   int added_source;
108   int added_sink;
109
110   int incycle_vars;
111   int unchanged_vars;
112   int no_sinks;
113   
114   int cycles_searched;
115   int cycles_collapsed;
116   int cycles_length;
117 };
118
119
120 #endif /* SETST_SORT_H */
121