aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-07-21 11:45:27 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-07-21 11:45:27 +0000
commit35e3a6e946495735d49cd6914df2528acc54b16d (patch)
treea555e3dcdaf2bc02ef5701b559e9a66712504d98 /gcc/gimple.c
parent3f2930d891ecaca678a3351e31354b6e618bddaa (diff)
downloadgcc-35e3a6e946495735d49cd6914df2528acc54b16d.zip
gcc-35e3a6e946495735d49cd6914df2528acc54b16d.tar.gz
gcc-35e3a6e946495735d49cd6914df2528acc54b16d.tar.bz2
re PR middle-end/45013 (Failed to build 483.xalancbmk in SPEC CPU 2006)
2010-07-21 Richard Guenther <rguenther@suse.de> PR middle-end/45013 * tree-ssa.c (useless_type_conversion_p): Dispatch to gimple_types_compatible_p only when in lto. * gimple.c (gimple_types_compatible_p): Use canonical types to speed up comparison. From-SVN: r162371
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index a3b1bba..5ad79aa 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -3360,6 +3360,12 @@ gimple_types_compatible_p (tree t1, tree t2, bool for_merging_p)
if (t1 == NULL_TREE || t2 == NULL_TREE)
return 0;
+ /* If the types have been previously registered and found equal
+ they still are. */
+ if (TYPE_CANONICAL (t1)
+ && TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2))
+ return 1;
+
/* Can't be the same type if the types don't have the same code. */
if (TREE_CODE (t1) != TREE_CODE (t2))
return 0;