diff options
author | Gary Oblock <gary@amperecomputing.com> | 2020-07-22 21:31:01 -0700 |
---|---|---|
committer | Gary Oblock <gary@amperecomputing.com> | 2020-07-22 21:31:01 -0700 |
commit | 0b078e460ea82c6cb6788e31151834b73c971e8f (patch) | |
tree | a85945502361a9293c34a1cbb36e56aed4eaee33 | |
parent | 2db1c71b3de3ba589be96272d819407c34bbc487 (diff) |
Put in fairly general wolf_fence mechanism.
-rw-r--r-- | gcc/ipa-structure-reorg.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/gcc/ipa-structure-reorg.c b/gcc/ipa-structure-reorg.c index 46501b090eb..13b8749ee12 100644 --- a/gcc/ipa-structure-reorg.c +++ b/gcc/ipa-structure-reorg.c @@ -225,7 +225,7 @@ final_debug_info ( Info *info) if ( info->reorg_dump_file ) { print_program ( info->reorg_dump_file, PRINT_FORMAT, 0); - //wolf_fence ( info); + wolf_fence ( info); } } @@ -2193,19 +2193,31 @@ handle_debug_indenting ( int amount ) #endif #if DEBUGGING -// This is whatever it needs to be whenever it needss to be it. -// Note, dump_dfa_stats doesn't cause a failure!!!!! +// A Wolf Fence is whatever it needs to be whenever it needs to be it. +int +wf_func ( tree *slot, tree *dummy) +{ + tree t_val = *slot; + gcc_assert( t_val->ssa_name.var); + return 0; +} + void -wolf_fence ( Info *info) +wolf_fence ( + Info *info // Pass level gobal info (might not use it) + ) { struct cgraph_node *node; - fprintf( stderr, "Wolf Fence: Attempting segfault by dumping dfa stats\n"); - FOR_EACH_FUNCTION_WITH_GIMPLE_BODY ( node) { - struct function *func = DECL_STRUCT_FUNCTION ( node->decl); - push_cfun ( func); - dump_dfa_stats ( stderr); - pop_cfun (); - } + fprintf( stderr, + "Wolf Fence: Find wolf via gcc_assert(t_val->ssa_name.var)\n"); + FOR_EACH_FUNCTION_WITH_GIMPLE_BODY ( node) + { + struct function *func = DECL_STRUCT_FUNCTION ( node->decl); + push_cfun ( func); + DEFAULT_DEFS ( func)->traverse_noresize < tree *, wf_func> ( NULL); + pop_cfun (); + } + fprintf( stderr, "Wolf Fence: Didn't find wolf!\n"); } #endif |