[3.4 PATCH] Fix record_value_for_reg (PR rtl-optimization/15139)
Mark Mitchell
mark@codesourcery.com
Tue Jan 18 20:09:00 GMT 2005
Jakub Jelinek wrote:
> Hi!
>
> 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)))
> and as
> /* 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.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
More information about the Gcc-patches
mailing list