summaryrefslogtreecommitdiff
path: root/gcc/lra-int.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-20 12:53:35 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-20 12:53:35 +0000
commit73ca989cb823c3857336ada13446bc5c04cec3eb (patch)
treefc42b0612019e3b1e83163506a633ce5c28f801e /gcc/lra-int.h
parentd05d755107df11e675a57ac4371fd0031c7d68a4 (diff)
poly_int: lra frame offsets
This patch makes LRA use poly_int64s rather than HOST_WIDE_INTs to store a frame offset (including in things like eliminations). 2017-12-20 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * lra-int.h (lra_reg): Change offset from int to poly_int64. (lra_insn_recog_data): Change sp_offset from HOST_WIDE_INT to poly_int64. (lra_eliminate_regs_1, eliminate_regs_in_insn): Change update_sp_offset from a HOST_WIDE_INT to a poly_int64. (lra_update_reg_val_offset, lra_reg_val_equal_p): Take the offset as a poly_int64 rather than an int. * lra-assigns.c (find_hard_regno_for_1): Handle poly_int64 offsets. (setup_live_pseudos_and_spill_after_risky_transforms): Likewise. * lra-constraints.c (equiv_address_substitution): Track offsets as poly_int64s. (emit_inc): Check poly_int_rtx_p instead of CONST_INT_P. (curr_insn_transform): Handle the new form of sp_offset. * lra-eliminations.c (lra_elim_table): Change previous_offset and offset from HOST_WIDE_INT to poly_int64. (print_elim_table, update_reg_eliminate): Update accordingly. (self_elim_offsets): Change from HOST_WIDE_INT to poly_int64_pod. (get_elimination): Update accordingly. (form_sum): Check poly_int_rtx_p instead of CONST_INT_P. (lra_eliminate_regs_1, eliminate_regs_in_insn): Change update_sp_offset from a HOST_WIDE_INT to a poly_int64. Handle poly_int64 offsets generally. (curr_sp_change): Change from HOST_WIDE_INT to poly_int64. (mark_not_eliminable, init_elimination): Update accordingly. (remove_reg_equal_offset_note): Return a bool and pass the new offset back by pointer as a poly_int64. * lra-remat.c (change_sp_offset): Take sp_offset as a poly_int64 rather than a HOST_WIDE_INT. (do_remat): Track offsets poly_int64s. * lra.c (lra_update_insn_recog_data, setup_sp_offset): Likewise. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r255876
Diffstat (limited to 'gcc/lra-int.h')
-rw-r--r--gcc/lra-int.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/lra-int.h b/gcc/lra-int.h
index 405071708b1..4d354356009 100644
--- a/gcc/lra-int.h
+++ b/gcc/lra-int.h
@@ -106,7 +106,7 @@ struct lra_reg
they do not conflict. */
int val;
/* Offset from relative eliminate register to pesudo reg. */
- int offset;
+ poly_int64 offset;
/* These members are set up in lra-lives.c and updated in
lra-coalesce.c. */
/* The biggest size mode in which each pseudo reg is referred in
@@ -213,7 +213,7 @@ struct lra_insn_recog_data
insn. */
int used_insn_alternative;
/* SP offset before the insn relative to one at the func start. */
- HOST_WIDE_INT sp_offset;
+ poly_int64 sp_offset;
/* The insn itself. */
rtx_insn *insn;
/* Common data for insns with the same ICODE. Asm insns (their
@@ -406,8 +406,8 @@ extern bool lra_remat (void);
extern void lra_debug_elim_table (void);
extern int lra_get_elimination_hard_regno (int);
extern rtx lra_eliminate_regs_1 (rtx_insn *, rtx, machine_mode,
- bool, bool, HOST_WIDE_INT, bool);
-extern void eliminate_regs_in_insn (rtx_insn *insn, bool, bool, HOST_WIDE_INT);
+ bool, bool, poly_int64, bool);
+extern void eliminate_regs_in_insn (rtx_insn *insn, bool, bool, poly_int64);
extern void lra_eliminate (bool, bool);
extern void lra_eliminate_reg_if_possible (rtx *);
@@ -493,7 +493,7 @@ lra_get_insn_recog_data (rtx_insn *insn)
/* Update offset from pseudos with VAL by INCR. */
static inline void
-lra_update_reg_val_offset (int val, int incr)
+lra_update_reg_val_offset (int val, poly_int64 incr)
{
int i;
@@ -506,10 +506,10 @@ lra_update_reg_val_offset (int val, int incr)
/* Return true if register content is equal to VAL with OFFSET. */
static inline bool
-lra_reg_val_equal_p (int regno, int val, int offset)
+lra_reg_val_equal_p (int regno, int val, poly_int64 offset)
{
if (lra_reg_info[regno].val == val
- && lra_reg_info[regno].offset == offset)
+ && known_eq (lra_reg_info[regno].offset, offset))
return true;
return false;