public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* objc data structure design
@ 2004-11-23 19:34 Geoffrey Keating
  2004-11-23 23:00 ` Ziemowit Laski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Geoffrey Keating @ 2004-11-23 19:34 UTC (permalink / raw)
  To: gcc list; +Cc: Zem Laski

[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]

Following discussion with Zem, we've agreed that the objc data 
structure design will proceed as follows:

Zem will take this patch:

Index: c-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-tree.h,v
retrieving revision 1.187
diff -u -p -u -p -r1.187 c-tree.h
--- c-tree.h    11 Nov 2004 23:13:10 -0000      1.187
+++ c-tree.h    23 Nov 2004 18:54:26 -0000
@@ -73,6 +73,8 @@ struct lang_type GTY(())
    /* In an ENUMERAL_TYPE, the min and max values.  */
    tree enum_min;
    tree enum_max;
+  /* In a RECORD_TYPE, <insert proper comment here>.  */
+  tree objc_protocol;
  };

  /* Record whether a type or decl was written with nonconstant size.
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.1070
diff -u -p -u -p -r1.1070 cp-tree.h
--- cp/cp-tree.h        10 Nov 2004 17:34:47 -0000      1.1070
+++ cp/cp-tree.h        23 Nov 2004 18:54:28 -0000
@@ -1060,6 +1060,9 @@ struct lang_type_class GTY(())
    tree decl_list;
    tree template_info;
    tree befriending_classes;
+
+  /* <insert proper comment here>.  */
+  tree objc_protocol;
  };

  struct lang_type_ptrmem GTY(())

(with comments and possibly field names improved), and determine what 
impact it has on C and C++ compile time, and C and C++ PCH size.  For 
C++, he'll use our Finder_FE benchmark for both time and PCH size, for 
C I suggest that the PCH be one that just contains

#include <Carbon/Carbon.h>

on Darwin, and use some reasonable and convenient benchmark for time.

If these results show that there's not significant degradation, that is 
less than 1% for compile speed and increase in PCH size, then this 
should solve his problem and let him proceed with the objc data 
structure changes.  If there is significant degradation, we'll look at 
making these fields be inserted only when they're actually needed.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2408 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: objc data structure design
  2004-11-23 19:34 objc data structure design Geoffrey Keating
@ 2004-11-23 23:00 ` Ziemowit Laski
  2004-11-24 16:12 ` Nathan Sidwell
  2004-12-04  5:25 ` Ziemowit Laski
  2 siblings, 0 replies; 5+ messages in thread
From: Ziemowit Laski @ 2004-11-23 23:00 UTC (permalink / raw)
  To: gcc list; +Cc: Geoffrey Keating


On 23 Nov 2004, at 11.01, Geoffrey Keating wrote:

> Index: c-tree.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/c-tree.h,v
> retrieving revision 1.187
> diff -u -p -u -p -r1.187 c-tree.h
> --- c-tree.h    11 Nov 2004 23:13:10 -0000      1.187
> +++ c-tree.h    23 Nov 2004 18:54:26 -0000
> @@ -73,6 +73,8 @@ struct lang_type GTY(())
>    /* In an ENUMERAL_TYPE, the min and max values.  */
>    tree enum_min;
>    tree enum_max;
> +  /* In a RECORD_TYPE, <insert proper comment here>.  */
> +  tree objc_protocol;
>  };
>
>  /* Record whether a type or decl was written with nonconstant size.
> Index: cp/cp-tree.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
> retrieving revision 1.1070
> diff -u -p -u -p -r1.1070 cp-tree.h
> --- cp/cp-tree.h        10 Nov 2004 17:34:47 -0000      1.1070
> +++ cp/cp-tree.h        23 Nov 2004 18:54:28 -0000
> @@ -1060,6 +1060,9 @@ struct lang_type_class GTY(())
>    tree decl_list;
>    tree template_info;
>    tree befriending_classes;
> +
> +  /* <insert proper comment here>.  */
> +  tree objc_protocol;
>  };
>
>  struct lang_type_ptrmem GTY(())
>

Just wanted to confirm that I will indeed do this, albeit next week 
(this week we have Thanksgiving in the U.S.). :-)  Also, I'd like to 
encourage those of you on non-Darwin platforms who suspect that adding 
these two fields might hurt compile-time performance to try this patch 
out on your systems.

--Zem

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: objc data structure design
  2004-11-23 19:34 objc data structure design Geoffrey Keating
  2004-11-23 23:00 ` Ziemowit Laski
@ 2004-11-24 16:12 ` Nathan Sidwell
  2004-12-04  5:25 ` Ziemowit Laski
  2 siblings, 0 replies; 5+ messages in thread
From: Nathan Sidwell @ 2004-11-24 16:12 UTC (permalink / raw)
  To: Geoffrey Keating; +Cc: gcc list, Zem Laski

Geoffrey Keating wrote:
> Following discussion with Zem, we've agreed that the objc data structure 
> design will proceed as follows:


> on Darwin, and use some reasonable and convenient benchmark for time.

I have measured a 0.4% slowdown on ppc-darwin with a qt library/designer
benchmark.

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: objc data structure design
  2004-11-23 19:34 objc data structure design Geoffrey Keating
  2004-11-23 23:00 ` Ziemowit Laski
  2004-11-24 16:12 ` Nathan Sidwell
@ 2004-12-04  5:25 ` Ziemowit Laski
  2004-12-07  1:45   ` Ziemowit Laski
  2 siblings, 1 reply; 5+ messages in thread
From: Ziemowit Laski @ 2004-12-04  5:25 UTC (permalink / raw)
  To: gcc list

OK, I finally managed to get the C++ numbers Geoff requested; sorry it 
took so long.

Without patch:
20041203 usr FinderFE_COMPILATION 895.07(1.63)
20041203 usr FinderFE_SIZE 73695552
PCH: -rw-rw-r--    1 zlaski  admin  46080420 Dec  3 15:25 c++

With patch:
20041203 usr FinderFE_COMPILATION 897.43(9.76)
20041203 usr FinderFE_SIZE 73695552
PCH: -rw-rw-r--    1 zlaski  admin  46080420 Dec  3 18:01 c++

So, compile time regressed by 0.3%, with no increase in PCH size.   
This was done
on a 500 MHz G4 Power Mac, should anyone care.

I shall now do the C measurements. Stay tuned.

--Zem

> Index: c-tree.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/c-tree.h,v
> retrieving revision 1.187
> diff -u -p -u -p -r1.187 c-tree.h
> --- c-tree.h    11 Nov 2004 23:13:10 -0000      1.187
> +++ c-tree.h    23 Nov 2004 18:54:26 -0000
> @@ -73,6 +73,8 @@ struct lang_type GTY(())
>    /* In an ENUMERAL_TYPE, the min and max values.  */
>    tree enum_min;
>    tree enum_max;
> +  /* In a RECORD_TYPE, <insert proper comment here>.  */
> +  tree objc_protocol;
>  };
>
>  /* Record whether a type or decl was written with nonconstant size.
> Index: cp/cp-tree.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
> retrieving revision 1.1070
> diff -u -p -u -p -r1.1070 cp-tree.h
> --- cp/cp-tree.h        10 Nov 2004 17:34:47 -0000      1.1070
> +++ cp/cp-tree.h        23 Nov 2004 18:54:28 -0000
> @@ -1060,6 +1060,9 @@ struct lang_type_class GTY(())
>    tree decl_list;
>    tree template_info;
>    tree befriending_classes;
> +
> +  /* <insert proper comment here>.  */
> +  tree objc_protocol;
>  };
>
>  struct lang_type_ptrmem GTY(())

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: objc data structure design
  2004-12-04  5:25 ` Ziemowit Laski
@ 2004-12-07  1:45   ` Ziemowit Laski
  0 siblings, 0 replies; 5+ messages in thread
From: Ziemowit Laski @ 2004-12-07  1:45 UTC (permalink / raw)
  To: gcc list

And here are the C numbers:

Without patch:
20041206 usr SimpleText_COMPILATION 34.52(0.05)
20041206 usr SimpleText_SIZE 150972
-rw-rw-r--   1 zlaski  admin  18494852 Dec  6 17:21 c

With patch:
20041206 usr SimpleText_COMPILATION 34.68(0.35)
20041206 usr SimpleText_SIZE 150972
-rw-rw-r--   1 zlaski  admin  18494852 Dec  6 17:35 c

(The PCH was constructed separately from a header containing just 
'#include <Carbon/Carbon.h>'.)

So, we have a 0.5% compile-time regression, with no increase in PCH.

Since all these numbers are below the 1% threshhold, I shall offer the 
patch below on gcc-patches shortly.

--Zem

On 3 Dec 2004, at 21.25, Ziemowit Laski wrote:

> OK, I finally managed to get the C++ numbers Geoff requested; sorry it 
> took so long.
>
> Without patch:
> 20041203 usr FinderFE_COMPILATION 895.07(1.63)
> 20041203 usr FinderFE_SIZE 73695552
> PCH: -rw-rw-r--    1 zlaski  admin  46080420 Dec  3 15:25 c++
>
> With patch:
> 20041203 usr FinderFE_COMPILATION 897.43(9.76)
> 20041203 usr FinderFE_SIZE 73695552
> PCH: -rw-rw-r--    1 zlaski  admin  46080420 Dec  3 18:01 c++
>
> So, compile time regressed by 0.3%, with no increase in PCH size.   
> This was done
> on a 500 MHz G4 Power Mac, should anyone care.
>
> I shall now do the C measurements. Stay tuned.
>
> --Zem
>
>> Index: c-tree.h
>> ===================================================================
>> RCS file: /cvs/gcc/gcc/gcc/c-tree.h,v
>> retrieving revision 1.187
>> diff -u -p -u -p -r1.187 c-tree.h
>> --- c-tree.h    11 Nov 2004 23:13:10 -0000      1.187
>> +++ c-tree.h    23 Nov 2004 18:54:26 -0000
>> @@ -73,6 +73,8 @@ struct lang_type GTY(())
>>    /* In an ENUMERAL_TYPE, the min and max values.  */
>>    tree enum_min;
>>    tree enum_max;
>> +  /* In a RECORD_TYPE, <insert proper comment here>.  */
>> +  tree objc_protocol;
>>  };
>>
>>  /* Record whether a type or decl was written with nonconstant size.
>> Index: cp/cp-tree.h
>> ===================================================================
>> RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
>> retrieving revision 1.1070
>> diff -u -p -u -p -r1.1070 cp-tree.h
>> --- cp/cp-tree.h        10 Nov 2004 17:34:47 -0000      1.1070
>> +++ cp/cp-tree.h        23 Nov 2004 18:54:28 -0000
>> @@ -1060,6 +1060,9 @@ struct lang_type_class GTY(())
>>    tree decl_list;
>>    tree template_info;
>>    tree befriending_classes;
>> +
>> +  /* <insert proper comment here>.  */
>> +  tree objc_protocol;
>>  };
>>
>>  struct lang_type_ptrmem GTY(())
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-07  1:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-23 19:34 objc data structure design Geoffrey Keating
2004-11-23 23:00 ` Ziemowit Laski
2004-11-24 16:12 ` Nathan Sidwell
2004-12-04  5:25 ` Ziemowit Laski
2004-12-07  1:45   ` Ziemowit Laski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).