This is the mail archive of the gcc-patches@gcc.gnu.org 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: [RFC] Fix PR rtl-optimization/27616


> While this is obviously a very unusual test case, I think that you
> have set the cap much too high.  I can't imagine a case which would
> successfully simplify after even four recursive calls to fold_rtx_mem.

Where do you draw the 4 from?  I see no theoritical limit to the scheme, just 
chain

  set (reg[n+1])
      (plus (reg)
            (mem (plus (reg[n]) (const_int))))

and stop somewhere.

> I think if you set the recursion limit to, say, ten, you will catch
> anything that could possibly simplify, and that is likely to be quite
> a bit fewer than the number of entries in the hash table.

Since we are really talking about corner cases, the idea was to be quite 
conservative.  However if the consensus is that a small fixed cap is good 
enough, fine with me.

> I would also be interested in hearing what Roger Sayle thinks when he
> gets back from vacation, but don't let that stop you from putting the
> patch in in the meantime.

OK, let's wait for Roger's input.

Thanks for your comments.

-- 
Eric Botcazou


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