summaryrefslogtreecommitdiff
path: root/gcc/ira-lives.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-11 18:54:47 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-11 18:54:47 +0000
commitd068a2f31d9792f9502667e04c83e2340eced645 (patch)
treec1dfc7cfd88768e4decf85c593946bf539aa4254 /gcc/ira-lives.c
parent6d2e6772be45c588ab03d9120d3750cf32663208 (diff)
downloadgcc-d068a2f31d9792f9502667e04c83e2340eced645.tar.gz
* ira-build.c (ira_loop_tree_body_rev_postorder): New function.
(ira_traverse_loop_tree): Traverse a loop's basic blocks in reverse post-order of the reversed control-flow direction. * ira-conflicts.c (ira_build_conflicts): Pass add_copies as the pre-order function to ira_traverse_loop_tree to preserve the existing semantics. * ira-lives.c (remove_some_program_points_and_update_live_ranges): Squeeze out live range chain elements if their program points are connected. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192378 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-lives.c')
-rw-r--r--gcc/ira-lives.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ira-lives.c b/gcc/ira-lives.c
index 853832e3c9f..109e3c4c9f3 100644
--- a/gcc/ira-lives.c
+++ b/gcc/ira-lives.c
@@ -1458,7 +1458,7 @@ remove_some_program_points_and_update_live_ranges (void)
int *map;
ira_object_t obj;
ira_object_iterator oi;
- live_range_t r;
+ live_range_t r, prev_r, next_r;
sbitmap born_or_dead, born, dead;
sbitmap_iterator sbi;
bool born_p, dead_p, prev_born_p, prev_dead_p;
@@ -1502,10 +1502,19 @@ remove_some_program_points_and_update_live_ranges (void)
ira_max_point = n;
FOR_EACH_OBJECT (obj, oi)
- for (r = OBJECT_LIVE_RANGES (obj); r != NULL; r = r->next)
+ for (r = OBJECT_LIVE_RANGES (obj), prev_r = NULL; r != NULL; r = next_r)
{
+ next_r = r->next;
r->start = map[r->start];
r->finish = map[r->finish];
+ if (prev_r == NULL || prev_r->start > r->finish + 1)
+ {
+ prev_r = r;
+ continue;
+ }
+ prev_r->start = r->start;
+ prev_r->next = next_r;
+ ira_finish_live_range (r);
}
ira_free (map);