On 12/07/15 17:45, Tom de Vries wrote:
Hi,

this patch series implements the forbidding of multi-step garbage
collection liveness dependencies between caches.

The first four patches downgrade 3 caches to non-cache, since they
introduce multi-step dependencies. This allows us to decouple:
- establishing a policy for multi-step dependencies in caches, and
- fixing issues that allow us to use these 3 as caches again.

1. Downgrade debug_args_for_decl to non-cache
2. Add struct tree_decl_map_hasher
3. Downgrade debug_expr_for_decl to non-cache
4. Downgrade value_expr_for_decl to non-cache
5. Don't mark live recursively in gt_cleare_cache

Bootstrapped and reg-tested on x86_64, with ENABLE_CHECKING.

I'll post the patches in response to this email.

This patch downgrade value_expr_for_decl to non-cache.

OK for trunk?

Thanks,
- Tom

[PATCH 4/5] Downgrade value_expr_for_decl to non-cache

Without this patch, but with patch "Don't mark live recursively in
gt_cleare_cache" when compiling soft-fp/divtf3.c -m32 we run into:
...
0x133f37e void gt_cleare_cache<tree_decl_map_cache_hasher>(hash_table<tree_decl_map_cache_hasher, xcallocator>*)
	  /home/vries/gcc_versions/devel/src/gcc/hash-table.h:1114
0x133bfdb gt_clear_caches_gt_tree_h()
	  ./gt-tree.h:475
0x6c8d0f gt_clear_caches()
	 ./gtype-c.h:151
0xa8ef1e ggc_mark_roots()
	 /home/vries/gcc_versions/devel/src/gcc/ggc-common.c:103
0x7f7bfe ggc_collect()
	 /home/vries/gcc_versions/devel/src/gcc/ggc-page.c:2183
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
...

The offending cache entry is:
...
(gdb) call debug_generic_expr ( (*iter).base.from )
<retval>
(gdb) call debug_generic_expr ( (*iter).to )
*.result_ptr
...

2015-07-10  Tom de Vries  <t...@codesourcery.com>

	PR libgomp/66714
	* tree.c (value_expr_for_decl): Use tree_decl_map_hasher instead of
	tree_decl_map_cache_hasher. Don't use cache GTY attribute.
	(init_ttree): Allocate value_expr_for_decl using new type.
---
 gcc/tree.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/tree.c b/gcc/tree.c
index 6038fff..bb4467d 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -253,8 +253,13 @@ static GTY ((cache))
 static GTY (())
      hash_table<tree_decl_map_hasher> *debug_expr_for_decl;
 
+/* TODO: Figure out whether we can declare value_expr_for_decl as:
 static GTY ((cache))
      hash_table<tree_decl_map_cache_hasher> *value_expr_for_decl;
+*/
+
+static GTY (())
+     hash_table<tree_decl_map_hasher> *value_expr_for_decl;
 
 struct tree_vec_map_cache_hasher : ggc_cache_ptr_hash<tree_vec_map>
 {
@@ -667,7 +672,7 @@ init_ttree (void)
     = hash_table<tree_decl_map_hasher>::create_ggc (512);
 
   value_expr_for_decl
-    = hash_table<tree_decl_map_cache_hasher>::create_ggc (512);
+    = hash_table<tree_decl_map_hasher>::create_ggc (512);
 
   int_cst_hash_table = hash_table<int_cst_hasher>::create_ggc (1024);
 
-- 
1.9.1

Reply via email to