[gcc(refs/users/marxin/heads/marxin-gcc-benchmark-branch)] i386: Schedule the only -O0 split pass on x86 after pro_and_epilogue/jump2 [PR92190]
Martin Liska
marxin@gcc.gnu.org
Mon Mar 30 10:47:39 GMT 2020
https://gcc.gnu.org/g:17a2e8c0918c2ddda82ace9ed17464906f96633d
commit 17a2e8c0918c2ddda82ace9ed17464906f96633d
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Feb 5 15:35:46 2020 +0100
i386: Schedule the only -O0 split pass on x86 after pro_and_epilogue/jump2 [PR92190]
The problem is that x86 is the only target that defines HAVE_ATTR_length and
doesn't schedule any splitting pass at -O0 after pro_and_epilogue.
So, either we go back to handling this during vzeroupper output
(unconditionally, rather than flag_ipa_ra guarded), or we need to tweak the
split* passes for x86.
Seems there are 5 split passes, split1 is run unconditionally before reload,
split2 is run for optimize > 0 or STACK_REGS (x86) after ra but before
epilogue_completed, split3 is run before regstack for STACK_REGS and
optimize and -fno-schedule-insns2, split4 is run before sched2 if sched2 is
run and split5 is run before shorten_branches if HAVE_ATTR_length and not
STACK_REGS.
2020-02-05 Jakub Jelinek <jakub@redhat.com>
PR target/92190
* recog.c (pass_split_after_reload::gate): For STACK_REGS targets,
don't run when !optimize.
(pass_split_before_regstack::gate): For STACK_REGS targets, run even
when !optimize.
Diff:
---
gcc/ChangeLog | 8 ++++++++
gcc/recog.c | 15 ++++-----------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 072c89171ae..cb4132f955e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2020-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/92190
+ * recog.c (pass_split_after_reload::gate): For STACK_REGS targets,
+ don't run when !optimize.
+ (pass_split_before_regstack::gate): For STACK_REGS targets, run even
+ when !optimize.
+
2020-02-05 Richard Biener <rguenther@suse.de>
PR middle-end/90648
diff --git a/gcc/recog.c b/gcc/recog.c
index 5dd1a927888..5790a58a911 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3924,14 +3924,7 @@ public:
virtual bool gate (function *)
{
/* If optimizing, then go ahead and split insns now. */
- if (optimize > 0)
- return true;
-
-#ifdef STACK_REGS
- return true;
-#else
- return false;
-#endif
+ return optimize > 0;
}
virtual unsigned int execute (function *)
@@ -3991,12 +3984,12 @@ pass_split_before_regstack::gate (function *)
split until final which doesn't allow splitting
if HAVE_ATTR_length. */
# ifdef INSN_SCHEDULING
- return (optimize && !flag_schedule_insns_after_reload);
+ return !optimize || !flag_schedule_insns_after_reload;
# else
- return (optimize);
+ return true;
# endif
#else
- return 0;
+ return false;
#endif
}
More information about the Gcc-cvs
mailing list