aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2016-01-29 18:47:17 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2016-01-29 18:47:17 +0000
commit9eb1ca69e1ebd98cc8e401b5ae271b988e3ab84a (patch)
treef72efae70813e3fdbe36d5a4563ab3bf55869ca0 /gcc/reload.c
parent6bbacdb54436ea71d77f70f625c4a97f5c245329 (diff)
downloadgcc-9eb1ca69e1ebd98cc8e401b5ae271b988e3ab84a.zip
gcc-9eb1ca69e1ebd98cc8e401b5ae271b988e3ab84a.tar.gz
gcc-9eb1ca69e1ebd98cc8e401b5ae271b988e3ab84a.tar.bz2
re PR target/69299 (-mavx performance degradation with r232088)
2016-01-29 Vladimir Makarov <vmakarov@redhat.com> PR target/69299 * config/i386/constraints.md (Bm): Describe as special memory constraint. * doc/md.texi (DEFINE_SPECIAL_MEMORY_CONSTRAINT): Describe it. * genoutput.c (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * genpreds.c (struct constraint_data): Add is_special_memory. (have_special_memory_constraints, special_memory_start): New static vars. (special_memory_end): Ditto. (add_constraint): Add new arg is_special_memory. Add code to process its true value. Update have_special_memory_constraints. (process_define_constraint): Pass the new arg. (process_define_register_constraint): Ditto. (choose_enum_order): Process special memory. (write_tm_preds_h): Generate enum const CT_SPECIAL_MEMORY and function insn_extra_special_memory_constraint. (main): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_SPECIAL_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_SPECIAL_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_special_memory_constraint. * ira.c (ira_setup_alts): Process CT_SPECIAL_MEMORY. * lra-constraints.c (process_alt_operands): Ditto. (curr_insn_transform): Use insn_extra_special_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_SPECIAL_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_SPECIFAL_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_special_memory_constraint. From-SVN: r232993
Diffstat (limited to 'gcc/reload.c')
-rw-r--r--gcc/reload.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c
index 4646545..6196e63 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -3471,6 +3471,23 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known,
offmemok = 1;
break;
+ case CT_SPECIAL_MEMORY:
+ if (force_reload)
+ break;
+ if (constraint_satisfied_p (operand, cn))
+ win = 1;
+ /* Likewise if the address will be reloaded because
+ reg_equiv_address is nonzero. For reg_equiv_mem
+ we have to check. */
+ else if (REG_P (operand)
+ && REGNO (operand) >= FIRST_PSEUDO_REGISTER
+ && reg_renumber[REGNO (operand)] < 0
+ && reg_equiv_mem (REGNO (operand)) != 0
+ && (constraint_satisfied_p
+ (reg_equiv_mem (REGNO (operand)), cn)))
+ win = 1;
+ break;
+
case CT_ADDRESS:
if (constraint_satisfied_p (operand, cn))
win = 1;