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: [patch] Fix for PR26222


Hello,

> >the part of the code in loop (insn 94) is replaced with
> >
> >(set (mem/c/i:SI (plus:SI (reg/f:SI 113 sfp)
> >                          (const_int 64 [0x40])) [9 S4 A32])
> >     (reg:SI 194))
> >
> >Which indeed does not help too much.  Nevertheless, there is no easy 
> >way
> >how to detect this case, and I do not intend to add any pass that would
> >further optimize this.  Invariant motion for this construction should
> >happen on tree level (which seems to happen for the C testcase, but
> >probably because of exceptions not for the Java one).
> 
> After trying the patch, there is just an extra store and no extra load 
> so
> it is not as bad as I originally thought it would be.  I am not that
> worried about the extra store as I was about the extra load.
> Though I wonder why RTL level DSE did not remove it (unless it was
> not really unused until after rtl level DSE was run).

I think we do not remove dead stores on RTL.  In any case, the code
cannot be much worse than the one before the optimization (assuming the
loop is hot, adding some computations before it should not hurt too
much); nevertheless, if you have a better idea how to fix the problem,
I would much appreciate that.

Zdenek


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