This is the mail archive of the
mailing list for the GCC project.
Re: [3.4 PATCH] Fix record_value_for_reg (PR rtl-optimization/15139)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Henderson <rth at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Jan 2005 12:08:50 -0800
- Subject: Re: [3.4 PATCH] Fix record_value_for_reg (PR rtl-optimization/15139)
- Organization: CodeSourcery, LLC
- References: <20050111213034.GO10340@devserv.devel.redhat.com>
Jakub Jelinek wrote:
The following testcase on x86-64 eats needs I guess at least a dozen
gigabytes of memory to compile. The problem is that after unrolling, we
have 30 really similar maxdf instructions updating one pseudo, there
are 2 occurences of the pseudo in the insn
(set (reg:DF 61) (if_then_else:DF (gt (reg:DF 61) (reg:DF 67))
(reg:DF 61) (reg:DF 67)))
/* If VALUE contains REG and we have a previous value for REG, substitute
the previous value. */
if (value && insn && reg_overlap_mentioned_p (reg, value))
is true, on each maxdf instruction the size of the recorded get_last_value*
for (reg:DF 61) more than doubles.
The following patch adds a cap on the size of the last value if it is going
to replace it into two or more places. The 10000 rtxs was completely random
number high enough that it IMHO shouldn't trigger too often, but still small
enough that the testcase compiles instantly.
Is this ok for gcc-3_4-branch if it bootstraps & testing succeeds?
This is OK -- if you use an appropriate --param instead of the magic 10000.