[gc-improv] Fix all remaining C testsuite failures

Laurynas Biveinis laurynas.biveinis@gmail.com
Thu Jun 2 15:54:00 GMT 2011


This patch
- Fixes PCH failures by re-initializing struct function after PCH read.
- Allocates couple of global RTXes in the permanent memory.
- Fixes RTL copying by taking source and destination memory areas into account. I.e. RTXes that would be normally shared, if source is in the permanent, and destination is in the function area, then are copied.  Assert that this does not happen in the cases when copying is meaningless.

With this, the C testsuite achieves parity on x86_64-unknown-linux-gnu, but I've lagged significantly behind with merges from trunk. 

My next step is to implement poisoning of function memory area and also I will look into walking GC and checking for non-GTY((skip)) pointers pointing to RTL memory areas. I will do this before I do the next merge, as hopefully this will make merges easier.

This patch took me two months. At this pace, I'm not sure the branch will be ready for consideration for 4.7.

2011-06-02  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* varasm.c (make_decl_rtl): Allocate DECL_RTL in the permanent RTL
	memory.

	* rtl.c: (_obstack_allocated_p): Declare.
	(allocated_in_function_mem_p): New.
	(need_copy_p): New.
	(copy_rtx): Re-enable sharing of CONST_VECTOR rtxes.  Use
	need_copy_p to decide on copying vs. sharing of rtxes.

	* function.c (reinit_struct_function): New.
	(set_cfun, prepare_function_start): Call it.

	* config/i386/i386.c (ix86_expand_split_stack_prologue): Allocate
	split_stack_fn in the permanent RTL memory.
	(ix86_expand_split_stack_prologue): Allocate split_stack_fn_large
	in the permanent RTL memory.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11-c-testsuite-fixes.patch
Type: text/x-patch
Size: 6332 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110602/8a8acc69/attachment.bin>


More information about the Gcc-patches mailing list