diff options
author | Martin Liska <marxin@gcc.gnu.org> | 2019-10-30 07:55:39 +0000 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-10-30 07:55:39 +0000 |
commit | a62bfab5d2a332925fcf10c45b4c5d8ca499439d (patch) | |
tree | d0586bccd3e715429ba1c4df5ba680575950b1e7 /gcc/cgraph.c | |
parent | 53289de583e4dfab17ace7b39e102b04eba749e5 (diff) |
Remove cgraph_global_info.
From-SVN: r277600
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index d47d4128b1c..2dc91a3a99b 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -539,7 +539,7 @@ cgraph_node::get_create (tree decl) { cgraph_node *first_clone = cgraph_node::get (decl); - if (first_clone && !first_clone->global.inlined_to) + if (first_clone && !first_clone->inlined_to) return first_clone; cgraph_node *node = cgraph_node::create (decl); @@ -659,7 +659,7 @@ cgraph_node::get_for_asmname (tree asmname) node = node->next_sharing_asm_name) { cgraph_node *cn = dyn_cast <cgraph_node *> (node); - if (cn && !cn->global.inlined_to) + if (cn && !cn->inlined_to) return cn; } return NULL; @@ -1786,7 +1786,7 @@ cgraph_node::remove (void) { cgraph_node *n = cgraph_node::get (decl); if (!n - || (!n->clones && !n->clone_of && !n->global.inlined_to + || (!n->clones && !n->clone_of && !n->inlined_to && ((symtab->global_info_ready || in_lto_p) && (TREE_ASM_WRITTEN (n->decl) || DECL_EXTERNAL (n->decl) @@ -1817,7 +1817,7 @@ cgraph_node::mark_address_taken (void) { /* Indirect inlining can figure out that all uses of the address are inlined. */ - if (global.inlined_to) + if (inlined_to) { gcc_assert (cfun->after_inlining); gcc_assert (callers->indirect_inlining_edge); @@ -1944,10 +1944,10 @@ cgraph_node::dump (FILE *f) dump_base (f); - if (global.inlined_to) + if (inlined_to) fprintf (f, " Function %s is inline copy in %s\n", dump_name (), - global.inlined_to->dump_name ()); + inlined_to->dump_name ()); if (clone_of) fprintf (f, " Clone of %s\n", clone_of->dump_asm_name ()); if (symtab->function_flags_ready) @@ -2096,7 +2096,7 @@ cgraph_node::dump (FILE *f) if (dyn_cast <cgraph_node *> (ref->referring)->count.initialized_p ()) sum += dyn_cast <cgraph_node *> (ref->referring)->count.ipa (); - if (global.inlined_to + if (inlined_to || (symtab->state < EXPANSION && ultimate_alias_target () == this && only_called_directly_p ())) ok = !count.ipa ().differs_from_p (sum); @@ -2212,14 +2212,14 @@ cgraph_node::get_availability (symtab_node *ref) { cgraph_node *cref = dyn_cast <cgraph_node *> (ref); if (cref) - ref = cref->global.inlined_to; + ref = cref->inlined_to; } enum availability avail; if (!analyzed) avail = AVAIL_NOT_AVAILABLE; else if (local.local) avail = AVAIL_LOCAL; - else if (global.inlined_to) + else if (inlined_to) avail = AVAIL_AVAILABLE; else if (transparent_alias) ultimate_alias_target (&avail, ref); @@ -2828,7 +2828,7 @@ bool cgraph_node::will_be_removed_from_program_if_no_direct_calls_p (bool will_inline) { - gcc_assert (!global.inlined_to); + gcc_assert (!inlined_to); if (DECL_EXTERNAL (decl)) return true; @@ -3015,7 +3015,7 @@ cgraph_edge::verify_corresponds_to_fndecl (tree decl) { cgraph_node *node; - if (!decl || callee->global.inlined_to) + if (!decl || callee->inlined_to) return false; if (symtab->state == LTO_STREAMING) return false; @@ -3085,7 +3085,7 @@ cgraph_node::verify_node (void) error ("cgraph count invalid"); error_found = true; } - if (global.inlined_to && same_comdat_group) + if (inlined_to && same_comdat_group) { error ("inline clone in same comdat group list"); error_found = true; @@ -3095,17 +3095,17 @@ cgraph_node::verify_node (void) error ("local symbols must be defined"); error_found = true; } - if (global.inlined_to && externally_visible) + if (inlined_to && externally_visible) { error ("externally visible inline clone"); error_found = true; } - if (global.inlined_to && address_taken) + if (inlined_to && address_taken) { error ("inline clone with address taken"); error_found = true; } - if (global.inlined_to && force_output) + if (inlined_to && force_output) { error ("inline clone is forced to output"); error_found = true; @@ -3142,9 +3142,9 @@ cgraph_node::verify_node (void) } if (!e->inline_failed) { - if (global.inlined_to - != (e->caller->global.inlined_to - ? e->caller->global.inlined_to : e->caller)) + if (inlined_to + != (e->caller->inlined_to + ? e->caller->inlined_to : e->caller)) { error ("inlined_to pointer is wrong"); error_found = true; @@ -3156,7 +3156,7 @@ cgraph_node::verify_node (void) } } else - if (global.inlined_to) + if (inlined_to) { error ("inlined_to pointer set for noninline callers"); error_found = true; @@ -3167,7 +3167,7 @@ cgraph_node::verify_node (void) if (e->verify_count ()) error_found = true; if (gimple_has_body_p (e->caller->decl) - && !e->caller->global.inlined_to + && !e->caller->inlined_to && !e->speculative /* Optimized out calls are redirected to __builtin_unreachable. */ && (e->count.nonzero_p () @@ -3192,7 +3192,7 @@ cgraph_node::verify_node (void) if (e->verify_count ()) error_found = true; if (gimple_has_body_p (e->caller->decl) - && !e->caller->global.inlined_to + && !e->caller->inlined_to && !e->speculative && e->count.ipa_p () && count @@ -3209,12 +3209,12 @@ cgraph_node::verify_node (void) error_found = true; } } - if (!callers && global.inlined_to) + if (!callers && inlined_to) { error ("inlined_to pointer is set but no predecessors found"); error_found = true; } - if (global.inlined_to == this) + if (inlined_to == this) { error ("inlined_to pointer refers to itself"); error_found = true; @@ -3303,7 +3303,7 @@ cgraph_node::verify_node (void) error ("More than one edge out of thunk node"); error_found = true; } - if (gimple_has_body_p (decl) && !global.inlined_to) + if (gimple_has_body_p (decl) && !inlined_to) { error ("Thunk is not supposed to have body"); error_found = true; @@ -3311,7 +3311,7 @@ cgraph_node::verify_node (void) } else if (analyzed && gimple_has_body_p (decl) && !TREE_ASM_WRITTEN (decl) - && (!DECL_EXTERNAL (decl) || global.inlined_to) + && (!DECL_EXTERNAL (decl) || inlined_to) && !flag_wpa) { if (this_cfun->cfg) @@ -3586,7 +3586,7 @@ cgraph_node::get_body (void) early. TODO: Materializing clones here will likely lead to smaller LTRANS footprint. */ - gcc_assert (!global.inlined_to && !clone_of); + gcc_assert (!inlined_to && !clone_of); if (ipa_transforms_to_apply.exists ()) { opt_pass *saved_current_pass = current_pass; @@ -3776,8 +3776,8 @@ cgraph_node::has_thunk_p (cgraph_node *node, void *) sreal cgraph_edge::sreal_frequency () { - return count.to_sreal_scale (caller->global.inlined_to - ? caller->global.inlined_to->count + return count.to_sreal_scale (caller->inlined_to + ? caller->inlined_to->count : caller->count); } |