We were trying to generate PCH and PPH information at the same time. We never ...
13 years, 10 months ago
(2011-06-09 18:49:59 UTC)
#1
We were trying to generate PCH and PPH information at the same time.
We never noticed because PPH is generated after PCH, so we were just
clobbering over the previous dump.
Found it by accident while debugging a GC ICE. This should make
testing slightly faster.
Committed to the branch.
* lang-specs.h (@c++-header): Do not emit PCH if any -fpph flag is
present.
diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
index a73aba3..9943446 100644
--- a/gcc/cp/lang-specs.h
+++ b/gcc/cp/lang-specs.h
@@ -48,8 +48,8 @@ along with GCC; see the file COPYING3. If not see
cc1plus %{save-temps*|no-integrated-cpp:-fpreprocessed
%{save-temps*:%b.ii} %{!save-temps*:%g.ii}}\
%{!save-temps*:%{!no-integrated-cpp:%(cpp_unique_options)}}\
%(cc1_options) %2\
- %{!fsyntax-only:%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\
- %W{o*:--output-pch=%*}}%V}}}}",
+ %{!fsyntax-only:%{!fpph*:%{!fdump-ada-spec*:-o %g.s
%{!o*:--output-pch=%i.gch}\
+ %W{o*:--output-pch=%*}}}%V}}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{"@c++",
"%{E|M|MM:cc1plus -E %(cpp_options) %2 %(cpp_debug_options)}\
--
This patch is available for review at http://codereview.appspot.com/4591061
On Thu, Jun 9, 2011 at 11:49, Diego Novillo <dnovillo@google.com> wrote: > > We were ...
13 years, 10 months ago
(2011-06-10 15:47:36 UTC)
#2
On Thu, Jun 9, 2011 at 11:49, Diego Novillo <dnovillo@google.com> wrote:
>
> We were trying to generate PCH and PPH information at the same time.
> We never noticed because PPH is generated after PCH, so we were just
> clobbering over the previous dump.
>
> Found it by accident while debugging a GC ICE. This should make
> testing slightly faster.
>
> Committed to the branch.
This version had problems and it was still abusing the PCH options
from specs. The problem is that when compiling header files
separately, the compiler assumes that we want to generate PCH files.
In the long term, I think we will want to replace PCH with PPH, but
until then I'm adding a new flag -fpph-gen to distinguish the PCH from
the PPH generation. So, when compiling a header file, if you want a
PPH image, you need to:
$ gcc -fpph-gen foo.h
This generate foo.pph instead of foo.gch.
The new patch also adds documentation on the three user-facing flags
used for pph.
Tested on x86_64.
Diego.
LGTM On Fri, Jun 10, 2011 at 8:47 AM, Diego Novillo <dnovillo@google.com> wrote: > On ...
13 years, 10 months ago
(2011-06-10 17:20:19 UTC)
#3
LGTM
On Fri, Jun 10, 2011 at 8:47 AM, Diego Novillo <dnovillo@google.com> wrote:
> On Thu, Jun 9, 2011 at 11:49, Diego Novillo <dnovillo@google.com> wrote:
> >
> > We were trying to generate PCH and PPH information at the same time.
> > We never noticed because PPH is generated after PCH, so we were just
> > clobbering over the previous dump.
> >
> > Found it by accident while debugging a GC ICE. This should make
> > testing slightly faster.
> >
> > Committed to the branch.
>
> This version had problems and it was still abusing the PCH options
> from specs. The problem is that when compiling header files
> separately, the compiler assumes that we want to generate PCH files.
>
> In the long term, I think we will want to replace PCH with PPH, but
> until then I'm adding a new flag -fpph-gen to distinguish the PCH from
> the PPH generation. So, when compiling a header file, if you want a
> PPH image, you need to:
>
> $ gcc -fpph-gen foo.h
>
> This generate foo.pph instead of foo.gch.
>
> The new patch also adds documentation on the three user-facing flags
> used for pph.
>
> Tested on x86_64.
>
>
> Diego.
>
Issue 4591061: [pph] Do not emit PCH if generating PPH
(Closed)
Created 13 years, 10 months ago by Diego Novillo
Modified 13 years, 10 months ago
Reviewers:
Base URL:
Comments: 0