diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-30 22:14:17 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-30 22:14:17 +0000 |
commit | a2b1a05e75a0d5a6120792e12392ff3624eef95f (patch) | |
tree | 90c26e80fc63e94c4779d3d07c7d2bf90e51f41c /gcc/tree-outof-ssa.c | |
parent | a5711a804a26e1af1cb1a1fe380aff8ae3ec1d48 (diff) | |
download | gcc-a2b1a05e75a0d5a6120792e12392ff3624eef95f.tar.gz |
* tree-outof-ssa.c (coalesce_ssa_name): Use coalesce_cost.
(coalesce_vars): Likewise.
* tree-ssa-live.c (coalesce_cost): New.
(build_tree_conflict_graph): Use coalesce_cost.
* tree-ssa-live.h (coalesce_cost): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102593 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-outof-ssa.c')
-rw-r--r-- | gcc/tree-outof-ssa.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c index 38f583e7112..b8ceaa85cd4 100644 --- a/gcc/tree-outof-ssa.c +++ b/gcc/tree-outof-ssa.c @@ -729,7 +729,13 @@ coalesce_ssa_name (var_map map, int flags) continue; p2 = var_to_partition (map, PHI_ARG_DEF (phi, x)); if (p2 != NO_PARTITION) - add_coalesce (cl, p, p2, 1); + { + edge e = PHI_ARG_EDGE (phi, x); + add_coalesce (cl, p, p2, + coalesce_cost (EDGE_FREQUENCY (e), + maybe_hot_bb_p (bb), + EDGE_CRITICAL_P (e))); + } } } } @@ -748,7 +754,10 @@ coalesce_ssa_name (var_map map, int flags) i = x; } else - add_coalesce (cl, i, x, 1); + add_coalesce (cl, i, x, + coalesce_cost (EXIT_BLOCK_PTR->frequency, + maybe_hot_bb_p (EXIT_BLOCK_PTR), + false)); } } @@ -1097,7 +1106,14 @@ coalesce_vars (var_map map, tree_live_info_p liveinfo) if (p2 == (unsigned)NO_PARTITION) continue; if (p != p2) - add_coalesce (cl, p, p2, 1); + { + edge e = PHI_ARG_EDGE (phi, x); + + add_coalesce (cl, p, p2, + coalesce_cost (EDGE_FREQUENCY (e), + maybe_hot_bb_p (bb), + EDGE_CRITICAL_P (e))); + } } } } |