Commit 75f4e3a1 by Richard Sandiford Committed by Richard Sandiford

Tweak interface to ira-build.c:ior_hard_reg_conflicts

This patch makes ior_hard_reg_conflicts take a const_hard_reg_set
rather than a pointer, so that it can be passed a temporary object
in later patches.

2019-09-09  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* ira-int.h (ior_hard_reg_conflicts): Take a const_hard_reg_set
	instead of a HARD_REG_SET *.
	* ira-build.c (ior_hard_reg_conflicts): Likewise.
	(ira_build): Update call accordingly.
	* ira-emit.c (add_range_and_copies_from_move_list): Likewise.

From-SVN: r275535
parent a8579651
2019-09-09 Richard Sandiford <richard.sandiford@arm.com> 2019-09-09 Richard Sandiford <richard.sandiford@arm.com>
* ira-int.h (ior_hard_reg_conflicts): Take a const_hard_reg_set
instead of a HARD_REG_SET *.
* ira-build.c (ior_hard_reg_conflicts): Likewise.
(ira_build): Update call accordingly.
* ira-emit.c (add_range_and_copies_from_move_list): Likewise.
2019-09-09 Richard Sandiford <richard.sandiford@arm.com>
* hard-reg-set.h (HARD_REG_SET::operator==): New function. * hard-reg-set.h (HARD_REG_SET::operator==): New function.
(HARD_REG_SET::operator!=): Likewise. (HARD_REG_SET::operator!=): Likewise.
(hard_reg_set_equal_p): Delete. (hard_reg_set_equal_p): Delete.
......
...@@ -614,15 +614,15 @@ merge_hard_reg_conflicts (ira_allocno_t from, ira_allocno_t to, ...@@ -614,15 +614,15 @@ merge_hard_reg_conflicts (ira_allocno_t from, ira_allocno_t to,
/* Update hard register conflict information for all objects associated with /* Update hard register conflict information for all objects associated with
A to include the regs in SET. */ A to include the regs in SET. */
void void
ior_hard_reg_conflicts (ira_allocno_t a, HARD_REG_SET *set) ior_hard_reg_conflicts (ira_allocno_t a, const_hard_reg_set set)
{ {
ira_allocno_object_iterator i; ira_allocno_object_iterator i;
ira_object_t obj; ira_object_t obj;
FOR_EACH_ALLOCNO_OBJECT (a, obj, i) FOR_EACH_ALLOCNO_OBJECT (a, obj, i)
{ {
OBJECT_CONFLICT_HARD_REGS (obj) |= *set; OBJECT_CONFLICT_HARD_REGS (obj) |= set;
OBJECT_TOTAL_CONFLICT_HARD_REGS (obj) |= *set; OBJECT_TOTAL_CONFLICT_HARD_REGS (obj) |= set;
} }
} }
...@@ -3462,7 +3462,7 @@ ira_build (void) ...@@ -3462,7 +3462,7 @@ ira_build (void)
allocno crossing calls. */ allocno crossing calls. */
FOR_EACH_ALLOCNO (a, ai) FOR_EACH_ALLOCNO (a, ai)
if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0) if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
ior_hard_reg_conflicts (a, &call_used_reg_set); ior_hard_reg_conflicts (a, call_used_reg_set);
} }
if (internal_flag_ira_verbose > 2 && ira_dump_file != NULL) if (internal_flag_ira_verbose > 2 && ira_dump_file != NULL)
print_copies (ira_dump_file); print_copies (ira_dump_file);
......
...@@ -1122,8 +1122,8 @@ add_range_and_copies_from_move_list (move_t list, ira_loop_tree_node_t node, ...@@ -1122,8 +1122,8 @@ add_range_and_copies_from_move_list (move_t list, ira_loop_tree_node_t node,
ira_allocate_object_conflicts (to_obj, n); ira_allocate_object_conflicts (to_obj, n);
} }
} }
ior_hard_reg_conflicts (from, &hard_regs_live); ior_hard_reg_conflicts (from, hard_regs_live);
ior_hard_reg_conflicts (to, &hard_regs_live); ior_hard_reg_conflicts (to, hard_regs_live);
update_costs (from, true, freq); update_costs (from, true, freq);
update_costs (to, false, freq); update_costs (to, false, freq);
......
...@@ -998,7 +998,7 @@ extern void ira_set_allocno_class (ira_allocno_t, enum reg_class); ...@@ -998,7 +998,7 @@ extern void ira_set_allocno_class (ira_allocno_t, enum reg_class);
extern bool ira_conflict_vector_profitable_p (ira_object_t, int); extern bool ira_conflict_vector_profitable_p (ira_object_t, int);
extern void ira_allocate_conflict_vec (ira_object_t, int); extern void ira_allocate_conflict_vec (ira_object_t, int);
extern void ira_allocate_object_conflicts (ira_object_t, int); extern void ira_allocate_object_conflicts (ira_object_t, int);
extern void ior_hard_reg_conflicts (ira_allocno_t, HARD_REG_SET *); extern void ior_hard_reg_conflicts (ira_allocno_t, const_hard_reg_set);
extern void ira_print_expanded_allocno (ira_allocno_t); extern void ira_print_expanded_allocno (ira_allocno_t);
extern void ira_add_live_range_to_object (ira_object_t, int, int); extern void ira_add_live_range_to_object (ira_object_t, int, int);
extern live_range_t ira_create_live_range (ira_object_t, int, int, extern live_range_t ira_create_live_range (ira_object_t, int, int,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment