aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira-conflicts.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2008-11-19 21:20:44 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2008-11-19 21:20:44 +0000
commit3553f0bb324124195a64ce30c0832463e9082461 (patch)
tree5b79c7c3d997c7b687af33f6229b6111cc84177b /gcc/ira-conflicts.c
parent2de6c675d3b3c7a32dee10fee434e120f8cbd05f (diff)
downloadgcc-3553f0bb324124195a64ce30c0832463e9082461.zip
gcc-3553f0bb324124195a64ce30c0832463e9082461.tar.gz
gcc-3553f0bb324124195a64ce30c0832463e9082461.tar.bz2
re PR middle-end/37790 (limits-fnargs.c takes very long time to compile at -O2)
2008-11-15 Vladimir Makarov <vmakarov@redhat.com> PR bootstrap/37790 * ira-int.h (ira_copy_allocno_live_range_list, ira_merge_allocno_live_ranges, ira_allocno_live_ranges_intersect_p, ira_finish_allocno_live_range_list): New prototypes. (ira_allocno_live_ranges_intersect_p, ira_pseudo_live_ranges_intersect_p): Remove. * ira-conflicts.c (ira_allocno_live_ranges_intersect_p, ira_pseudo_live_ranges_intersect_p): Rename to allocnos_have_intersected_live_ranges_p and pseudos_have_intersected_live_ranges_p. Move them from here to ... * ira-color.c: ... here (coalesced_allocno_conflict_p): Use allocnos_have_intersected_live_ranges_p. (coalesced_allocnos_living_at_program_points, coalesced_allocnos_live_at_points_p, set_coalesced_allocnos_live_points): Remove. (slot_coalesced_allocnos_live_ranges, slot_coalesced_allocno_live_ranges_intersect_p, setup_slot_coalesced_allocno_live_ranges): New. (coalesce_spill_slots): Use ranges of coalesced allocnos. (ira_sort_regnos_for_alter_reg): Use allocnos_have_intersected_live_ranges_p. (ira_reuse_stack_slot): Use pseudos_have_intersected_live_ranges_p. * global.c (pseudo_for_reload_consideration_p): Check flag_ira_share_spill_slots too. * ira-build.c (copy_allocno_live_range_list): Rename to ira_copy_allocno_live_range_list. Make it external. (merge_ranges): Rename to ira_merge_allocno_live_ranges. Make it external. (ira_allocno_live_ranges_intersect_p): New. (ira_finish_allocno_live_range_list): New. (finish_allocno): Use it. (remove_unnecessary_allocnos): Use ira_merge_allocno_live_ranges. (copy_info_to_removed_store_destinations): Ditto. Use ira_copy_allocno_live_range_list. (ira_flattening): Use ira_merge_allocno_live_ranges. * ira.c (too_high_register_pressure_p): New function. (ira): Switch off sharing spill slots if the pressure is too high. From-SVN: r142017
Diffstat (limited to 'gcc/ira-conflicts.c')
-rw-r--r--gcc/ira-conflicts.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c
index 66376b6..6e7d769 100644
--- a/gcc/ira-conflicts.c
+++ b/gcc/ira-conflicts.c
@@ -532,52 +532,6 @@ propagate_copies (void)
}
}
-/* Return TRUE if live ranges of allocnos A1 and A2 intersect. It is
- used to find a conflict for new allocnos or allocnos with the
- different cover classes. */
-bool
-ira_allocno_live_ranges_intersect_p (ira_allocno_t a1, ira_allocno_t a2)
-{
- allocno_live_range_t r1, r2;
-
- if (a1 == a2)
- return false;
- if (ALLOCNO_REG (a1) != NULL && ALLOCNO_REG (a2) != NULL
- && (ORIGINAL_REGNO (ALLOCNO_REG (a1))
- == ORIGINAL_REGNO (ALLOCNO_REG (a2))))
- return false;
- /* Remember the ranges are always kept ordered. */
- for (r1 = ALLOCNO_LIVE_RANGES (a1), r2 = ALLOCNO_LIVE_RANGES (a2);
- r1 != NULL && r2 != NULL;)
- {
- if (r1->start > r2->finish)
- r1 = r1->next;
- else if (r2->start > r1->finish)
- r2 = r2->next;
- else
- return true;
- }
- return false;
-}
-
-/* Return TRUE if live ranges of pseudo-registers REGNO1 and REGNO2
- intersect. This should be used when there is only one region.
- Currently this is used during reload. */
-bool
-ira_pseudo_live_ranges_intersect_p (int regno1, int regno2)
-{
- ira_allocno_t a1, a2;
-
- ira_assert (regno1 >= FIRST_PSEUDO_REGISTER
- && regno2 >= FIRST_PSEUDO_REGISTER);
- /* Reg info caclulated by dataflow infrastructure can be different
- from one calculated by regclass. */
- if ((a1 = ira_loop_tree_root->regno_allocno_map[regno1]) == NULL
- || (a2 = ira_loop_tree_root->regno_allocno_map[regno2]) == NULL)
- return false;
- return ira_allocno_live_ranges_intersect_p (a1, a2);
-}
-
/* Array used to collect all conflict allocnos for given allocno. */
static ira_allocno_t *collected_conflict_allocnos;