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]

[PATCH] [C++] save space in saved_scope


Just like the previous patch for language_function and also changes the size of
x_processing_template_decl to be a short from a HOST_WIDE_INT, 2^15-1 is large
enough for processing C++ templates.


This patch saves any where from 128 bytes to 72 bytes (the reason is HOST_WIDE_INT
can be either 32 or 64 and bool is usually 8 but can be 32 bytes). On
powerpc-apple-darwin7.2.0, it saves the full 128 bytes.



Ok? Bootstrapped on powerpc-apple-darwin7.2.0 with no regressions.


Thanks,
Andrew Pinski


ChangeLog:


	* cp-tree.h (saved_scope) <x_processing_specialization>: Change to a
	char bitfield.
	<x_processing_explicit_instantiation>: Likewise.
	<returns_abnormally>: Likewise.
	<need_pop_function_context>: Likewise.
	<x_processing_template_decl>: Change to a short.


Index: cp-tree.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v retrieving revision 1.945 diff -u -p -r1.945 cp-tree.h --- cp-tree.h 2 Jan 2004 11:41:49 -0000 1.945 +++ cp-tree.h 5 Jan 2004 04:31:03 -0000 @@ -708,10 +708,11 @@ struct saved_scope GTY(()) tree x_saved_tree; tree last_parms;

-  HOST_WIDE_INT x_processing_template_decl;
-  int x_processing_specialization;
-  bool x_processing_explicit_instantiation;
-  int need_pop_function_context;
+  short x_processing_template_decl;
+
+  CHAR_BITFIELD x_processing_explicit_instantiation : 1;
+  CHAR_BITFIELD need_pop_function_context : 1;
+  CHAR_BITFIELD x_processing_specialization : 1;

struct stmt_tree_s x_stmt_tree;


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