diff options
author | Vladimir N. Makarov <vmakarov@redhat.com> | 2021-03-22 13:34:50 -0400 |
---|---|---|
committer | Vladimir N. Makarov <vmakarov@redhat.com> | 2021-03-22 13:37:00 -0400 |
commit | 02f2dc441b1954736cc61e3f97687cd23d5586c5 (patch) | |
tree | 7e72432b58a588cb214052e6d4736aa0cc9d68e9 /gcc/recog.c | |
parent | ba16797fe69a0fae47355aa2c102ffac1c48c3bd (diff) | |
download | gcc-02f2dc441b1954736cc61e3f97687cd23d5586c5.zip gcc-02f2dc441b1954736cc61e3f97687cd23d5586c5.tar.gz gcc-02f2dc441b1954736cc61e3f97687cd23d5586c5.tar.bz2 |
[PR99581] Define relaxed memory and use it for aarch64
aarch64 needs to skip memory address validation for LD1R insns. Skipping
the address validation may result in LRA crash for some targets when usual
memory constraint is used. This patch introduces define_relaxed_memory_constraint,
skipping address validation for it, and defining relaxed memory for
aarch64 LD1r insn memory operand.
gcc/ChangeLog:
PR target/99581
* config/aarch64/constraints.md (UtQ): Use
define_relaxed_memory_constraint for it.
* doc/md.texi (define_relaxed_memory_constraint): Describe it.
* genoutput.c (main): Process DEFINE_RELAXED_MEMORY_CONSTRAINT.
* genpreds.c (constraint_data): Add bitfield is_relaxed_memory.
(have_relaxed_memory_constraints): New static var.
(relaxed_memory_start, relaxed_memory_end): Ditto.
(add_constraint): Add arg is_relaxed_memory. Check name for
relaxed memory. Set up is_relaxed_memory in constraint_data and
have_relaxed_memory_constraints. Adjust calls.
(choose_enum_order): Process relaxed memory.
(write_tm_preds_h): Ditto.
(main): Process DEFINE_RELAXED_MEMORY_CONSTRAINT.
* gensupport.c (process_rtx): Process DEFINE_RELAXED_MEMORY_CONSTRAINT.
* ira-costs.c (record_reg_classes): Process CT_RELAXED_MEMORY.
* ira-lives.c (single_reg_class): Use
insn_extra_relaxed_memory_constraint.
* ira.c (ira_setup_alts): CT_RELAXED_MEMORY.
* lra-constraints.c (valid_address_p): Use
insn_extra_relaxed_memory_constraint instead of other memory
constraints.
(process_alt_operands): Process CT_RELAXED_MEMORY.
(curr_insn_transform): Use insn_extra_relaxed_memory_constraint.
* recog.c (asm_operand_ok, preprocess_constraints): Process
CT_RELAXED_MEMORY.
* reload.c (find_reloads): Ditto.
* rtl.def (DEFINE_RELAXED_MEMORY_CONSTRAINT): New.
* stmt.c (parse_input_constraint): Use
insn_extra_relaxed_memory_constraint.
gcc/testsuite/ChangeLog:
PR target/99581
* gcc.target/powerpc/pr99581.c: New.
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index abbc49f..ee143bc 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -2270,6 +2270,7 @@ asm_operand_ok (rtx op, const char *constraint, const char **constraints) mem = op; /* Fall through. */ case CT_SPECIAL_MEMORY: + case CT_RELAXED_MEMORY: /* Every memory operand can be reloaded to fit. */ if (!mem) mem = extract_mem_from_operand (op); @@ -2892,6 +2893,7 @@ preprocess_constraints (int n_operands, int n_alternatives, case CT_MEMORY: case CT_SPECIAL_MEMORY: + case CT_RELAXED_MEMORY: op_alt[i].memory_ok = 1; break; |