ia32: Use a more logical specification of operand sizes in the binary emitter.
[libfirm] / ir / ir / valueset.h
index 027e708..084b47a 100644 (file)
@@ -21,7 +21,6 @@
  * @file
  * @author    Michael Beck
  * @brief     A value set, containing expression for values.
- * @version   $Id$
  */
 #ifndef _FIRM_VALUESET_H_
 #define _FIRM_VALUESET_H_
 typedef struct ir_valueset_entry_t {
        ir_node     *value;  /**< the represented value */
        ir_node     *expr;   /**< the leader expression for the value in the current set */
+       void        *link;   /**< additional attached information */
        list_head   list;    /**< link field for the list iterator */
 } ir_valueset_entry_t;
 
 #define HashSet          ir_valueset_t
-#define HashSetIterator  ir_valueset_iterator_t
 #define ValueType        ir_valueset_entry_t
 #define ADDITIONAL_DATA  list_head elem_list; list_head all_iters;
 #undef DO_REHASH
-#define NO_ITERATOR
 
 #include "hashset.h"
 
-#undef NO_ITERATOR
 #undef ADDITIONAL_DATA
 #undef ValueType
-#undef HashSetIterator
 #undef HashSet
 
 typedef struct ir_valueset_t ir_valueset_t;
@@ -112,6 +108,24 @@ static inline void ir_valueset_del(ir_valueset_t *valueset) {
  */
 int ir_valueset_insert(ir_valueset_t *valueset, ir_node *value, ir_node *expr);
 
+/**
+ * Sets link of the element associated with specified value.
+ *
+ * @param valueset  Pointer to the value set.
+ * @param value     Value of the element.
+ * @param link      Link to be set in element.
+ */
+void ir_valueset_set_link(const ir_valueset_t *valueset, const ir_node *value, void *link);
+
+/**
+ * Get the link of the element associated with specified value.
+ *
+ * @param valueset  Pointer to the value set.
+ * @param value     Value of the element.
+ * @returns         Link of the element associated to the value.
+ */
+void *ir_valueset_get_link(const ir_valueset_t *valueset, const ir_node *value);
+
 /**
  * Inserts a (value, expression) pair into a valueset if the value is not already
  * known, else replace the expression for the given value.
@@ -138,7 +152,7 @@ void *ir_valueset_lookup(const ir_valueset_t *valueset, const ir_node *value);
  * the value.
  *
  * @param valueset  Pointer to the value set
- * @param value     value to remove from the values et
+ * @param value     value to remove from the values set
  */
 void ir_valueset_remove(ir_valueset_t *valueset, const ir_node *value);