printflat option
[IRC.git] / Robust / src / IR / Flat / FlatPrefetchNode.java
1 package IR.Flat;
2 import Analysis.Prefetch.*;
3 import java.util.*;
4
5 public class FlatPrefetchNode extends FlatNode {
6         HashSet<PrefetchPair> hspp;
7
8         public FlatPrefetchNode() {
9                 hspp = new HashSet<PrefetchPair>();
10         }
11
12         public String toString() {
13             String st="prefetch(";
14             boolean first=true;
15             for(Iterator<PrefetchPair> it=hspp.iterator();it.hasNext();) {
16                 PrefetchPair pp=it.next();
17                 if (!first)
18                     st+=", ";
19                 first=false;
20                 st+=pp;
21             }
22             return st+")";
23         }
24
25         public int kind() {
26                 return FKind.FlatPrefetchNode;
27         }
28
29         public void insPrefetchPair(PrefetchPair pp) {
30                 hspp.add(pp);
31         }
32
33         public void insAllpp(HashSet<PrefetchPair> hspp) {
34                 this.hspp.addAll(hspp);
35         }
36
37         public HashSet<PrefetchPair> getPrefetchPairs() {
38                 return hspp;
39         }
40
41         public int getNumPairs() {
42                 return hspp.size();
43         }
44 }