diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2020-12-17 00:15:06 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2020-12-17 00:15:06 +0000 |
commit | 6059a3dd084d157759309357e5a52f8a8cc504c1 (patch) | |
tree | 995df859e09f7f248c362584f2e76cd62bcb11c4 /gcc/recog.h | |
parent | f48b51496d08de2aabc5ed1deb45e5517333662c (diff) | |
download | gcc-6059a3dd084d157759309357e5a52f8a8cc504c1.zip gcc-6059a3dd084d157759309357e5a52f8a8cc504c1.tar.gz gcc-6059a3dd084d157759309357e5a52f8a8cc504c1.tar.bz2 |
recog: Add a validate_change_xveclen function
A later patch wants to be able to use the validate_change machinery
to reduce the XVECLEN of a PARALLEL. This should be more efficient
than allocating a separate PARALLEL at a possibly distant memory
location, especially since the new PARALLEL would be garbage rtl if
the new pattern turns out not to match. Combine already pulls this
trick with SUBST_INT.
This patch adds a general helper for doing that.
gcc/
* recog.h (validate_change_xveclen): Declare.
* recog.c (change_t::old_len): New field.
(validate_change_1): Add a new_len parameter. Conditionally
replace the XVECLEN of an rtx, avoiding single-element PARALLELs.
(validate_change_xveclen): New function.
(cancel_changes): Undo changes made by validate_change_xveclen.
Diffstat (limited to 'gcc/recog.h')
-rw-r--r-- | gcc/recog.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/recog.h b/gcc/recog.h index d87456c..e152e2b 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -88,6 +88,7 @@ extern int check_asm_operands (rtx); extern int asm_operand_ok (rtx, const char *, const char **); extern bool validate_change (rtx, rtx *, rtx, bool); extern bool validate_unshare_change (rtx, rtx *, rtx, bool); +extern bool validate_change_xveclen (rtx, rtx *, int, bool); extern bool canonicalize_change_group (rtx_insn *insn, rtx x); extern int insn_invalid_p (rtx_insn *, bool); extern int verify_changes (int); |