[gcc(refs/vendors/redhat/heads/gcc-8-branch)] re PR rtl-optimization/93088 (Compile time hog on gcc/testsuite/gcc.target/i386/pr56348.c w/ -O3 -fu
Jakub Jelinek
jakub@gcc.gnu.org
Thu Sep 17 16:40:58 GMT 2020
https://gcc.gnu.org/g:c4cfb11a99885a73ad5dbf58f9030d13ceebf4b5
commit c4cfb11a99885a73ad5dbf58f9030d13ceebf4b5
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Feb 14 15:34:43 2020 +0100
re PR rtl-optimization/93088 (Compile time hog on gcc/testsuite/gcc.target/i386/pr56348.c w/ -O3 -funroll-loops -fno-tree-dominator-opts -fno-tree-vrp)
PR rtl-optimization/93088
* loop-iv.c (find_single_def_src): Punt after looking through
128 reg copies for regs with single definitions. Move definitions
to first uses.
* gcc.target/i386/pr93088.c: New test.
Diff:
---
gcc/ChangeLog | 6 ++++++
gcc/loop-iv.c | 15 +++++++--------
gcc/testsuite/ChangeLog | 5 +++++
gcc/testsuite/gcc.target/i386/pr93088.c | 5 +++++
4 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 704d01f2565..05cbf6ec009 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,12 @@
2020-02-14 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2020-01-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/93087
+ * predict.c (compute_function_frequency): Don't call
+ warn_function_cold on functions that already have cold attribute.
+
2019-12-14 Jakub Jelinek <jakub@redhat.com>
PR ipa/92357
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index 8f476819728..fb09e0f6e54 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -1380,24 +1380,23 @@ simple_rhs_p (rtx rhs)
static rtx
find_single_def_src (unsigned int regno)
{
- df_ref adef;
- rtx set, src;
+ rtx src = NULL_RTX;
- for (;;)
+ /* Don't look through unbounded number of single definition REG copies,
+ there might be loops for sources with uninitialized variables. */
+ for (int cnt = 0; cnt < 128; cnt++)
{
- rtx note;
- adef = DF_REG_DEF_CHAIN (regno);
+ df_ref adef = DF_REG_DEF_CHAIN (regno);
if (adef == NULL || DF_REF_NEXT_REG (adef) != NULL
|| DF_REF_IS_ARTIFICIAL (adef))
return NULL_RTX;
- set = single_set (DF_REF_INSN (adef));
+ rtx set = single_set (DF_REF_INSN (adef));
if (set == NULL || !REG_P (SET_DEST (set))
|| REGNO (SET_DEST (set)) != regno)
return NULL_RTX;
- note = find_reg_equal_equiv_note (DF_REF_INSN (adef));
-
+ rtx note = find_reg_equal_equiv_note (DF_REF_INSN (adef));
if (note && function_invariant_p (XEXP (note, 0)))
{
src = XEXP (note, 0);
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f6e4ee150e5..98a16e919ef 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,6 +1,11 @@
2020-02-14 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2020-01-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/93087
+ * c-c++-common/cold-1.c: New test.
+
2019-12-26 Jakub Jelinek <jakub@redhat.com>
PR c++/92438
diff --git a/gcc/testsuite/gcc.target/i386/pr93088.c b/gcc/testsuite/gcc.target/i386/pr93088.c
new file mode 100644
index 00000000000..dc986cfaa80
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr93088.c
@@ -0,0 +1,5 @@
+/* PR rtl-optimization/93088 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -funroll-loops -fno-tree-dominator-opts -fno-tree-vrp -w" } */
+
+#include "pr56348.c"
More information about the Gcc-cvs
mailing list