aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-live.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>2013-06-14 12:52:32 -0600
committerJeff Law <law@gcc.gnu.org>2013-06-14 12:52:32 -0600
commite91d0adbc165ca56844bc0f0c8c92782739d75f4 (patch)
tree885f6be93528b5d127ff4ebdfff5e4d673b7ab15 /gcc/tree-ssa-live.c
parent51b08adabf40a7922771ff4e0c36c8680c082825 (diff)
downloadgcc-e91d0adbc165ca56844bc0f0c8c92782739d75f4.zip
gcc-e91d0adbc165ca56844bc0f0c8c92782739d75f4.tar.gz
gcc-e91d0adbc165ca56844bc0f0c8c92782739d75f4.tar.bz2
gimple.h (gimple_can_coalesce_p): Prototype.
* gimple.h (gimple_can_coalesce_p): Prototype. * tree-ssa-coalesce.c (gimple_can_coalesce_p): New function. (create_outofssa_var_map, coalesce_partitions): Use it. * tree-ssa-uncprop.c (uncprop_into_successor_phis): Similarly. * tree-ssa-live.c (var_map_base_init): Use TYPE_CANONICAL if it's available. * gcc.dg/tree-ssa/coalesce-1.c: New test. From-SVN: r200103
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r--gcc/tree-ssa-live.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 83a52a0..a624d00 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -111,8 +111,12 @@ var_map_base_init (var_map map)
as it restricts the sets we compute conflicts for.
Using TREE_TYPE to generate sets is the easies as
type equivalency also holds for SSA names with the same
- underlying decl. */
- m->base.from = TREE_TYPE (var);
+ underlying decl.
+
+ Check gimple_can_coalesce_p when changing this code. */
+ m->base.from = (TYPE_CANONICAL (TREE_TYPE (var))
+ ? TYPE_CANONICAL (TREE_TYPE (var))
+ : TREE_TYPE (var));
/* If base variable hasn't been seen, set it up. */
slot = tree_to_index.find_slot (m, INSERT);
if (!*slot)