aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ira-color.c3
-rw-r--r--gcc/ira-int.h10
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ira-color.c b/gcc/ira-color.c
index 36f3f4d..59d978f 100644
--- a/gcc/ira-color.c
+++ b/gcc/ira-color.c
@@ -3664,7 +3664,8 @@ color_pass (ira_loop_tree_node_t loop_tree_node)
ira_assert (bitmap_bit_p (subloop_node->all_allocnos,
ALLOCNO_NUM (subloop_allocno)));
if (ira_single_region_allocno_p (a, subloop_allocno)
- || !ira_subloop_allocnos_can_differ_p (a, hard_regno >= 0))
+ || !ira_subloop_allocnos_can_differ_p (a, hard_regno >= 0,
+ false))
{
gcc_assert (!ALLOCNO_MIGHT_CONFLICT_WITH_PARENT_P
(subloop_allocno));
diff --git a/gcc/ira-int.h b/gcc/ira-int.h
index e1e6802..e80fdeb 100644
--- a/gcc/ira-int.h
+++ b/gcc/ira-int.h
@@ -1607,10 +1607,16 @@ ira_loop_border_costs::move_between_loops_cost () const
/* Return true if subloops that contain allocnos for A's register can
use a different assignment from A. ALLOCATED_P is true for the case
- in which allocation succeeded for A. */
+ in which allocation succeeded for A. EXCLUDE_OLD_RELOAD is true if
+ we should always return false for non-LRA targets. (This is a hack
+ and should be removed along with old reload.) */
inline bool
-ira_subloop_allocnos_can_differ_p (ira_allocno_t a, bool allocated_p = true)
+ira_subloop_allocnos_can_differ_p (ira_allocno_t a, bool allocated_p = true,
+ bool exclude_old_reload = true)
{
+ if (exclude_old_reload && !ira_use_lra_p)
+ return false;
+
auto regno = ALLOCNO_REGNO (a);
if (pic_offset_table_rtx != NULL