for (i = 0; i < dim->nparam; ++i) {
name = get_name(dim, isl_dim_param, i);
- hash = isl_hash_builtin(hash, name);
+ hash = isl_hash_name(hash, name);
}
name = tuple_name(dim, isl_dim_in);
- hash = isl_hash_builtin(hash, name);
+ hash = isl_hash_name(hash, name);
name = tuple_name(dim, isl_dim_out);
- hash = isl_hash_builtin(hash, name);
+ hash = isl_hash_name(hash, name);
hash = isl_hash_dim(hash, dim->nested[0]);
hash = isl_hash_dim(hash, dim->nested[1]);
name->ref = 1;
name->name = copy;
+ name->hash = isl_hash_init();
+ name->hash = isl_hash_string(name->hash, s);
+
return name;
error:
free((char *)copy);
return entry == name;
}
+uint32_t isl_hash_name(uint32_t hash, struct isl_name *name)
+{
+ if (name)
+ isl_hash_hash(hash, name->hash);
+
+ return hash;
+}
+
void isl_name_free(struct isl_ctx *ctx, struct isl_name *name)
{
uint32_t name_hash;
int ref;
const char *name;
+ uint32_t hash;
};
struct isl_name *isl_name_alloc(struct isl_ctx *ctx, const char *name);
struct isl_name *isl_name_get(struct isl_ctx *ctx, const char *name);
struct isl_name *isl_name_copy(struct isl_ctx *ctx, struct isl_name *name);
+uint32_t isl_hash_name(uint32_t hash, struct isl_name *name);
void isl_name_free(struct isl_ctx *ctx, struct isl_name *name);
#if defined(__cplusplus)