This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Trevor Saunders <tsaunders at mozilla dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Richard Biener <rguenther at suse dot de>, Mike Stump <mikestump at comcast dot net>, Jeff Law <law at redhat dot com>, Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Thu, 7 Aug 2014 13:26:30 +0200
- Subject: Re: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)
- Authentication-results: sourceware.org; auth=none
- References: <20140804113836 dot GD24292 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1408041404040 dot 20733 at zhemvz dot fhfr dot qr> <20140805143652 dot GG24292 at redhat dot com> <53E13B1D dot 5050401 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1408060951390 dot 20733 at zhemvz dot fhfr dot qr> <634E36B1-4340-43B5-97F1-9C897D63306E at comcast dot net> <alpine dot LSU dot 2 dot 11 dot 1408070948560 dot 20733 at zhemvz dot fhfr dot qr> <20140807095515 dot GA11828 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <20140807102934 dot GA25208 at kam dot mff dot cuni dot cz> <20140807104957 dot GC11828 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com>
>
> err yeah, I guess we'd need to rework things so front end just creates
> functions for each variable and then middle end pass creates function
> that call all of them if necessary.
There is already code for that in cdtor optimization pass (ipa.c), but I think
C++ does its own wrapper to solve orderin issues - but I am not sure abou thtat.
Never really cared why those in-frontend wrappers are produced.
Honza
>
> > Should not be hard to add though. Need to read back why inlining would
> > be undesriable here - not inliing ctors in general would indeed be problematic
> > (preventing SRA and more stuff)
>
> yeah, doesn't seem that hard.
>
> Trev
>
> >
> > Honza
> > >
> > > Trev
> > >
> > > >
> > > > Richard.