diff options
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r-- | gcc/ipa-reference.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index 9767eab..f3af47a 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -399,17 +399,17 @@ propagate_bits (ipa_reference_global_vars_info_t x_global, struct cgraph_node *x } } +static bool ipa_init_p = false; + /* The init routine for analyzing global static variable usage. See comments at top for description. */ static void ipa_init (void) { - static bool init_p = false; - - if (init_p) + if (ipa_init_p) return; - init_p = true; + ipa_init_p = true; if (dump_file) reference_vars_to_consider = splay_tree_new (splay_tree_compare_ints, 0, 0); @@ -1173,3 +1173,12 @@ make_pass_ipa_reference (gcc::context *ctxt) { return new pass_ipa_reference (ctxt); } + +/* Reset all state within ipa-reference.c so that we can rerun the compiler + within the same process. For use by toplev::finalize. */ + +void +ipa_reference_c_finalize (void) +{ + ipa_init_p = false; +} |