[PATCH] Fix PR52977

2012-04-16 Thread Richard Guenther
This fixes PR52977 - for PCH to work with its pointer relocation code we have to avoid dereferencing pointers to compute array lengths in structures. So we have to unfortunately keep duplicated info about VECTOR_CST vector lengths. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to

Re: [PATCH] Fix PR52977

2012-04-26 Thread Dodji Seketeli
Diego Novillo a écrit: > On Mon, Apr 16, 2012 at 10:23, Richard Guenther wrote: [...] >> I'm not sure PPH will replace PCH - will it? [...] > In theory, it may. But it's not in the immediate plans. > > The big thing that PCH has going for it is load speed. PCH is almost > instantaneous, PP

Re: [PATCH] Fix PR52977

2012-04-26 Thread Diego Novillo
On Thu, Apr 26, 2012 at 06:43, Dodji Seketeli wrote: > I guess it's also worth noting one limitation of PPHs that is, if I > believe the wiki: > >    In essence, the only headers that can be pre-parsed are those that >    produce the same result when they are compiled in isolation or as >    part

Re: [PATCH] Fix PR52977

2012-04-26 Thread Diego Novillo
On 4/26/12 9:35 AM, Diego Novillo wrote: On Thu, Apr 26, 2012 at 06:43, Dodji Seketeli wrote: I guess it's also worth noting one limitation of PPHs that is, if I believe the wiki: In essence, the only headers that can be pre-parsed are those that produce the same result when they are

Re: [PATCH] Fix PR52977

2012-04-26 Thread Richard Guenther
On Thu, 26 Apr 2012, Diego Novillo wrote: > On 4/26/12 9:35 AM, Diego Novillo wrote: > > On Thu, Apr 26, 2012 at 06:43, Dodji Seketeli wrote: > > > > > I guess it's also worth noting one limitation of PPHs that is, if I > > > believe the wiki: > > > > > > In essence, the only headers that can

Re: [PATCH] Fix PR52977

2012-04-26 Thread Dodji Seketeli
Diego Novillo a écrit: > On Thu, Apr 26, 2012 at 06:43, Dodji Seketeli wrote: > >> I guess it's also worth noting one limitation of PPHs that is, if I >> believe the wiki: >> >>    In essence, the only headers that can be pre-parsed are those that >>    produce the same result when they are comp

Re: [PATCH] Fix PR52977

2012-04-26 Thread Diego Novillo
On 4/26/12 2:15 PM, Dodji Seketeli wrote: One more question, for my education. Does the PPH machinery detect that a given header doesn't respect that requirement and thus refuses to serialize it? Yup. Some requirements can be enforced when the image is being generated (e.g., double inclusio

Re: [PATCH] Fix PR52977

2012-04-26 Thread Mike Stump
On Apr 26, 2012, at 3:43 AM, Dodji Seketeli wrote: > How hard would it be to drop that limitation? It would be a mistake to try... My take away from the work on a compile server I worked on is that a header whose semantics don't change is critical. Just checking this property for a header, is

Re: [PATCH] Fix PR52977

2012-04-16 Thread Steven Bosscher
On Mon, Apr 16, 2012 at 3:19 PM, Richard Guenther wrote: > > This fixes PR52977 - for PCH to work with its pointer relocation code > we have to avoid dereferencing pointers to compute array lengths > in structures.  So we have to unfortunately keep duplicated info about > VECTOR_CST vector lengths

Re: [PATCH] Fix PR52977

2012-04-16 Thread Richard Guenther
On Mon, 16 Apr 2012, Steven Bosscher wrote: > On Mon, Apr 16, 2012 at 3:19 PM, Richard Guenther wrote: > > > > This fixes PR52977 - for PCH to work with its pointer relocation code > > we have to avoid dereferencing pointers to compute array lengths > > in structures.  So we have to unfortunately

Re: [PATCH] Fix PR52977

2012-04-16 Thread Diego Novillo
On Mon, Apr 16, 2012 at 10:23, Richard Guenther wrote: > On Mon, 16 Apr 2012, Steven Bosscher wrote: > >> On Mon, Apr 16, 2012 at 3:19 PM, Richard Guenther wrote: >> > >> > This fixes PR52977 - for PCH to work with its pointer relocation code >> > we have to avoid dereferencing pointers to comput

Re: [PATCH] Fix PR52977

2012-04-16 Thread Richard Guenther
On Mon, 16 Apr 2012, Diego Novillo wrote: > On Mon, Apr 16, 2012 at 10:23, Richard Guenther wrote: > > On Mon, 16 Apr 2012, Steven Bosscher wrote: > > > >> On Mon, Apr 16, 2012 at 3:19 PM, Richard Guenther > >> wrote: > >> > > >> > This fixes PR52977 - for PCH to work with its pointer relocatio

Re: [PATCH] Fix PR52977

2012-04-16 Thread Diego Novillo
On 4/16/12 10:43 AM, Richard Guenther wrote: Well, the number one advantage of replacing PCH is that it would kill the current PCH implementation which is tied to our garbage collector... Sure. That too. Diego.

Re: [PATCH] Fix PR52977

2012-04-16 Thread Steven Bosscher
On Mon, Apr 16, 2012 at 3:38 PM, Diego Novillo wrote: >> I'm not sure PPH will replace PCH - will it? > > In theory, it may.  But it's not in the immediate plans. IMHO, the case for including PPH would be much stronger if replacing PCH would be included in the immediate to mid-term plans. The cur

Re: [PATCH] Fix PR52977

2012-04-16 Thread Mike Stump
On Apr 16, 2012, at 6:43 AM, Richard Guenther wrote: > Well, the number one advantage of replacing PCH is that it would kill > the current PCH implementation which is tied to our garbage collector... If compile speed isn't important to people, there is little reason to keep pch around. Once that

Re: [PATCH] Fix PR52977

2012-04-19 Thread Michael Matz
Hi, On Mon, 16 Apr 2012, Richard Guenther wrote: > This fixes PR52977 - for PCH to work with its pointer relocation code we > have to avoid dereferencing pointers to compute array lengths in > structures. So we have to unfortunately keep duplicated info about > VECTOR_CST vector lengths. Tha

Re: [PATCH] Fix PR52977

2012-04-19 Thread Richard Guenther
On Thu, 19 Apr 2012, Michael Matz wrote: > Hi, > > On Mon, 16 Apr 2012, Richard Guenther wrote: > > > This fixes PR52977 - for PCH to work with its pointer relocation code we > > have to avoid dereferencing pointers to compute array lengths in > > structures. So we have to unfortunately keep