summaryrefslogtreecommitdiffstats
path: root/polly/lib/External/isl/isl_multi_hash.c
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-03-25 19:38:18 +0000
committerTobias Grosser <tobias@grosser.es>2016-03-25 19:38:18 +0000
commit37034db826ab706ffd9c74c8d5d7474f2700679c (patch)
tree1b87bb5fde12ac4cdb0276d4e86d57f8cbbde112 /polly/lib/External/isl/isl_multi_hash.c
parente988af9073dc59d6b158b0b90570b97415ba52a2 (diff)
downloadbcm5719-llvm-37034db826ab706ffd9c74c8d5d7474f2700679c.tar.gz
bcm5719-llvm-37034db826ab706ffd9c74c8d5d7474f2700679c.zip
Update to isl-0.16.1-145-g243bf7c
Just an import to keep track with the latest version of isl. We are not looking for specific features. llvm-svn: 264452
Diffstat (limited to 'polly/lib/External/isl/isl_multi_hash.c')
-rw-r--r--polly/lib/External/isl/isl_multi_hash.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/polly/lib/External/isl/isl_multi_hash.c b/polly/lib/External/isl/isl_multi_hash.c
new file mode 100644
index 00000000000..b4bb6c321a0
--- /dev/null
+++ b/polly/lib/External/isl/isl_multi_hash.c
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2016 Sven Verdoolaege
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege
+ */
+
+#include <isl_multi_macro.h>
+#include <isl/hash.h>
+
+/* Return a hash value that digests "multi".
+ */
+uint32_t FN(MULTI(BASE),get_hash)(__isl_keep MULTI(BASE) *multi)
+{
+ int i;
+ uint32_t hash;
+
+ if (!multi)
+ return 0;
+
+ hash = isl_hash_init();
+ for (i = 0; i < multi->n; ++i) {
+ uint32_t el_hash;
+ el_hash = FN(EL,get_hash)(multi->p[i]);
+ isl_hash_hash(hash, el_hash);
+ }
+
+ return hash;
+}
OpenPOWER on IntegriCloud