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: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)


On Mon, 4 Aug 2014, Jakub Jelinek wrote:

> On Mon, Aug 04, 2014 at 12:26:01PM +0200, Richard Biener wrote:
> > I think that tree-ssa-forwprop.c already simplifies this in
> > associate_plusminus with (T)(P + A) - (T)P -> (T)A.  Well,
> > maybe not - but then the code should be massages to handle it.
> > 
> > Can you double-check and do that?
> > 
> > Otherwise I agree with removing this (and other) "premature"
> > optimizations scattered throughout the frontends (and convert.c).
> 
> IMHO a precondition of such changes is exactly verifying the middle-end
> can perform those optimizations later on and if not, teaching the middle-end
> to optimize that.

Yep.  Which is why I said "double-check and do that", "do that" in
extend what tree-ssa-forwrpop.c does.

Richard.


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