This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.4 PATCH] Fix record_value_for_reg (PR rtl-optimization/15139)

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)))
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
(916) 791-8304

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]