#ifndef _FIRM_IRNODESET_H_
#define _FIRM_IRNODESET_H_
-#include "irnode.h"
+#include "firm_config.h"
+
+#include "firm_types.h"
#include "xmalloc.h"
+/*
+ * sebastian experimental:
+ * use ordered arrays as node sets.
+ * the guys here have made good experiences with that.
+ * Internally we use normal Firm arrays and binary
+ * search for locating the elements. Using arrays should
+ * give the sets a small footprint.
+ */
+#undef IR_NODESET_USE_ORDERED_SETS
+
#define HashSet ir_nodeset_t
#define HashSetIterator ir_nodeset_iterator_t
#define ValueType ir_node*
#define DO_REHASH
+
#include "hashset.h"
+
#undef DO_REHASH
#undef ValueType
#undef HashSetIterator
#undef HashSet
+typedef struct ir_nodeset_t ir_nodeset_t;
+typedef struct ir_nodeset_iterator_t ir_nodeset_iterator_t;
+
/**
* Initializes a nodeset with default size.
*
*/
int ir_nodeset_insert(ir_nodeset_t *nodeset, ir_node *node);
+
/**
* Removes a node from a nodeset. Does nothing if the nodeset doesn't contain
* the node.