X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Fvalueset.h;h=084b47a24b623ccc1d43ee5bfa4839ab561002ea;hb=6be797281b157f8f71b9c47d28b3d09f2a7918cc;hp=079b7580ac25243beb9b4f613eb91f8b00612599;hpb=f8cc15664f571aa7ef89d6f6bc8d5bd2b8ca7d53;p=libfirm diff --git a/ir/ir/valueset.h b/ir/ir/valueset.h index 079b7580a..084b47a24 100644 --- a/ir/ir/valueset.h +++ b/ir/ir/valueset.h @@ -32,22 +32,19 @@ 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; @@ -111,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. @@ -137,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);