summaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-16 11:45:55 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-16 11:45:55 +0000
commitf9a5c96c7f5440813625922545d3352a8a493d34 (patch)
treec990f61db6d9cccd7a0c387548db3d6be224f378 /gcc/gimple.c
parent65162f7e02aaf62896f005048c16da509503c314 (diff)
downloadgcc-f9a5c96c7f5440813625922545d3352a8a493d34.tar.gz
2009-10-16 Richard Guenther <rguenther@suse.de>
* gimple.c (iterative_hash_gimple_type): For integer types also hash their minimum and maximum values and the string flag. For array types hash their domain and the string flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152899 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 105fb1b6061..fe8f156b463 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3688,7 +3688,24 @@ iterative_hash_gimple_type (tree type, hashval_t val,
sccstack, sccstate, sccstate_obstack);
}
- /* Recurse for aggregates with a single element. */
+ /* For integer types hash the types min/max values and the string flag. */
+ if (TREE_CODE (type) == INTEGER_TYPE)
+ {
+ v = iterative_hash_expr (TYPE_MIN_VALUE (type), v);
+ v = iterative_hash_expr (TYPE_MAX_VALUE (type), v);
+ v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
+ }
+
+ /* For array types hash their domain and the string flag. */
+ if (TREE_CODE (type) == ARRAY_TYPE
+ && TYPE_DOMAIN (type))
+ {
+ v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
+ v = visit (TYPE_DOMAIN (type), state, v,
+ sccstack, sccstate, sccstate_obstack);
+ }
+
+ /* Recurse for aggregates with a single element type. */
if (TREE_CODE (type) == ARRAY_TYPE
|| TREE_CODE (type) == COMPLEX_TYPE
|| TREE_CODE (type) == VECTOR_TYPE)