aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-21 07:00:46 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-21 07:00:46 +0000
commit68184180f25f3c89ebcb9202ff3235f936bcdc78 (patch)
tree80c76ceffc762df432c6b9871357d8642769e61e /gcc/rtl.h
parenta15b25dcdcf597e01f5079b2bc44c1430b5e7719 (diff)
downloadgcc-68184180f25f3c89ebcb9202ff3235f936bcdc78.zip
gcc-68184180f25f3c89ebcb9202ff3235f936bcdc78.tar.gz
gcc-68184180f25f3c89ebcb9202ff3235f936bcdc78.tar.bz2
poly_int: REG_ARGS_SIZE
This patch adds new utility functions for manipulating REG_ARGS_SIZE notes and allows the notes to carry polynomial as well as constant sizes. The code was inconsistent about whether INT_MIN or HOST_WIDE_INT_MIN should be used to represent an unknown size. The patch uses HOST_WIDE_INT_MIN throughout. 2017-12-21 Richard Sandiford <richard.sandiford@linaro.org> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> gcc/ * rtl.h (get_args_size, add_args_size_note): New functions. (find_args_size_adjust): Return a poly_int64 rather than a HOST_WIDE_INT. (fixup_args_size_notes): Likewise. Make the same change to the end_args_size parameter. * rtlanal.c (get_args_size, add_args_size_note): New functions. * builtins.c (expand_builtin_trap): Use add_args_size_note. * calls.c (emit_call_1): Likewise. * explow.c (adjust_stack_1): Likewise. * cfgcleanup.c (old_insns_match_p): Update use of find_args_size_adjust. * combine.c (distribute_notes): Track polynomial arg sizes. * dwarf2cfi.c (dw_trace_info): Change beg_true_args_size, end_true_args_size, beg_delay_args_size and end_delay_args_size from HOST_WIDE_INT to poly_int64. (add_cfi_args_size): Take the args_size as a poly_int64 rather than a HOST_WIDE_INT. (notice_args_size, notice_eh_throw, maybe_record_trace_start) (maybe_record_trace_start_abnormal, scan_trace, connect_traces): Track polynomial arg sizes. * emit-rtl.c (try_split): Use get_args_size. * recog.c (peep2_attempt): Likewise. * reload1.c (reload_as_needed): Likewise. * expr.c (find_args_size_adjust): Return the adjustment as a poly_int64 rather than a HOST_WIDE_INT. (fixup_args_size_notes): Change end_args_size from a HOST_WIDE_INT to a poly_int64 and change the return type in the same way. (emit_single_push_insn): Track polynomial arg sizes. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r255919
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 17fd920..9989263 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -3355,6 +3355,7 @@ extern rtx get_related_value (const_rtx);
extern bool offset_within_block_p (const_rtx, HOST_WIDE_INT);
extern void split_const (rtx, rtx *, rtx *);
extern rtx strip_offset (rtx, poly_int64_pod *);
+extern poly_int64 get_args_size (const_rtx);
extern bool unsigned_reg_p (rtx);
extern int reg_mentioned_p (const_rtx, const_rtx);
extern int count_occurrences (const_rtx, const_rtx, int);
@@ -3390,6 +3391,7 @@ extern int find_regno_fusage (const_rtx, enum rtx_code, unsigned int);
extern rtx alloc_reg_note (enum reg_note, rtx, rtx);
extern void add_reg_note (rtx, enum reg_note, rtx);
extern void add_int_reg_note (rtx_insn *, enum reg_note, int);
+extern void add_args_size_note (rtx_insn *, poly_int64);
extern void add_shallow_copy_of_reg_note (rtx_insn *, rtx);
extern rtx duplicate_reg_note (rtx);
extern void remove_note (rtx_insn *, const_rtx);
@@ -3979,8 +3981,8 @@ extern void emit_jump (rtx);
/* In expr.c */
extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
unsigned int, int);
-extern HOST_WIDE_INT find_args_size_adjust (rtx_insn *);
-extern int fixup_args_size_notes (rtx_insn *, rtx_insn *, int);
+extern poly_int64 find_args_size_adjust (rtx_insn *);
+extern poly_int64 fixup_args_size_notes (rtx_insn *, rtx_insn *, poly_int64);
/* In expmed.c */
extern void init_expmed (void);