gcc/gcc/varpool.c

827 lines
23 KiB
C
Raw Normal View History

Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* Callgraph handling code.
Copyright (C) 2003-2016 Free Software Foundation, Inc.
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
Contributed by Jan Hubicka
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
#include "config.h"
#include "system.h"
#include "coretypes.h"
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include "backend.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "target.h"
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
#include "tree.h"
tree-core.h: Include symtab.h. 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * tree-core.h: Include symtab.h. * rtl.h: Include hard-reg-set.h but not flags.h. (HARD_CONST): Remove condition compilation involving HARD_CONST since hard-reg-set.h is always included. * regs.h: Don't include hard-reg-set.h or rtl.h. * cfg.h: Include dominance.h. * gimple.h: Include tree-ssa-alias.h and gimple-expr.h. * backend.h: New. Aggregate commonly used backend header files. * gimple-ssa.h: Don't include tree-hasher.h. * ssa.h: New. Aggregate commonly used SSA header files. * regset.h: Remove bitmap.h and hard-reg-set.h #includes. * sel-sched-ir.h: Flatten includes. * lra-int.h: Flatten completely. * sel-sched-dump.h: Flatten includes. * ira-int.h: Flatten includes. * gimple-streamer.h: Remove all includes. * cfgloop.h: Remove all #includes except cfgloopmanip.h. * resource.h: Flatten hard-reg-set.h and df.h. * sched-int.h: Flatten insn-arrt.h and df.h. * valtrack.h: flatten bitmap.h, df.h, and rtl.h * df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h. * genattrtab.c (write_header): Adjust generated includes. * genautomata.c (main): Likewise. * genconditions.c (write-header): Likewise. * genemit.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * alias.c: Adjust includes. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcc-plugin.h: Likewise. * gcse-common.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-blocking.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.c: Likewise. * graphite-isl-ast-to-gimple.c: Likewise. * graphite-optimize-isl.c: Likewise. * graphite-poly.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-browser.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * valtrack.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vmsdbgout.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. * config/aarch64/aarch64-builtins.c: Likewise. * config/aarch64/aarch64.c: Likewise. * config/aarch64/cortex-a57-fma-steering.c: Likewise. * config/alpha/alpha.c: Likewise. * config/arc/arc.c: Likewise. * config/arm/aarch-common.c: Likewise. * config/arm/arm-builtins.c: Likewise. * config/arm/arm-c.c: Likewise. * config/arm/arm.c: Likewise. * config/avr/avr-c.c: Likewise. * config/avr/avr-log.c: Likewise. * config/avr/avr.c: Likewise. * config/bfin/bfin.c: Likewise. * config/c6x/c6x.c: Likewise. * config/cr16/cr16.c: Likewise. * config/cris/cris.c: Likewise. * config/darwin-c.c: Likewise. * config/darwin.c: Likewise. * config/epiphany/epiphany.c: Likewise. * config/epiphany/mode-switch-use.c: Likewise. * config/epiphany/resolve-sw-modes.c: Likewise. * config/fr30/fr30.c: Likewise. * config/frv/frv.c: Likewise. * config/ft32/ft32.c: Likewise. * config/h8300/h8300.c: Likewise. * config/i386/i386-c.c: Likewise. * config/i386/i386.c: Likewise. * config/i386/msformat-c.c: Likewise. * config/i386/winnt-cxx.c: Likewise. * config/i386/winnt-stubs.c: Likewise. * config/i386/winnt.c: Likewise. * config/ia64/ia64-c.c: Likewise. * config/ia64/ia64.c: Likewise. * config/iq2000/iq2000.c: Likewise. * config/lm32/lm32.c: Likewise. * config/m32c/m32c-pragma.c: Likewise. * config/m32c/m32c.c: Likewise. * config/m32r/m32r.c: Likewise. * config/m68k/m68k.c: Likewise. * config/mcore/mcore.c: Likewise. * config/mep/mep-pragma.c: Likewise. * config/mep/mep.c: Likewise. * config/microblaze/microblaze-c.c: Likewise. * config/microblaze/microblaze.c: Likewise. * config/mips/mips.c: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.c: Likewise. * config/moxie/moxie.c: Likewise. * config/msp430/msp430-c.c: Likewise. * config/msp430/msp430.c: Likewise. * config/nds32/nds32-cost.c: Likewise. * config/nds32/nds32-fp-as-gp.c: Likewise. * config/nds32/nds32-intrinsic.c: Likewise. * config/nds32/nds32-isr.c: Likewise. * config/nds32/nds32-md-auxiliary.c: Likewise. * config/nds32/nds32-memory-manipulation.c: Likewise. * config/nds32/nds32-pipelines-auxiliary.c: Likewise. * config/nds32/nds32-predicates.c: Likewise. * config/nds32/nds32.c: Likewise. * config/nios2/nios2.c: Likewise. * config/nvptx/nvptx.c: Likewise. * config/pa/pa.c: Likewise. * config/pdp11/pdp11.c: Likewise. * config/rl78/rl78-c.c: Likewise. * config/rl78/rl78.c: Likewise. * config/rs6000/rs6000-c.c: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rx/rx.c: Likewise. * config/s390/s390-c.c: Likewise. * config/s390/s390.c: Likewise. * config/sh/sh-c.c: Likewise. * config/sh/sh-mem.cc: Likewise. * config/sh/sh.c: Likewise. * config/sh/sh_optimize_sett_clrt.cc: Likewise. * config/sh/sh_treg_combine.cc: Likewise. * config/sol2-c.c: Likewise. * config/sol2-cxx.c: Likewise. * config/sol2-stubs.c: Likewise. * config/sol2.c: Likewise. * config/sparc/sparc-c.c: Likewise. * config/sparc/sparc.c: Likewise. * config/spu/spu-c.c: Likewise. * config/spu/spu.c: Likewise. * config/stormy16/stormy16.c: Likewise. * config/tilegx/mul-tables.c: Likewise. * config/tilegx/tilegx-c.c: Likewise. * config/tilegx/tilegx.c: Likewise. * config/tilepro/mul-tables.c: Likewise. * config/tilepro/tilepro-c.c: Likewise. * config/tilepro/tilepro.c: Likewise. * config/v850/v850-c.c: Likewise. * config/v850/v850.c: Likewise. * config/vax/vax.c: Likewise. * config/visium/visium.c: Likewise. * config/vms/vms-c.c: Likewise. * config/vms/vms.c: Likewise. * config/vxworks.c: Likewise. * config/xtensa/xtensa.c: Likewise. ada 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * gcc-interface/cuintp.c: Adjust includes. * gcc-interface/decl.c: Likewise. * gcc-interface/misc.c: Likewise. * gcc-interface/targtyps.c: Likewise. * gcc-interface/trans.c: Likewise. * gcc-interface/utils.c: Likewise. * gcc-interface/utils2.c: Likewise. c 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * c-array-notation.c: Adjust includes. * c-aux-info.c: Likewise. * c-convert.c: Likewise. * c-decl.c: Likewise. * c-errors.c: Likewise. * c-lang.c: Likewise. * c-objc-common.c: Likewise. * c-parser.c: Likewise. * c-typeck.c: Likewise. c-family 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * array-notation-common.c: Adjust includes. * c-ada-spec.c: Likewise. * c-cilkplus.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-dump.c: Likewise. * c-format.c: Likewise. * c-gimplify.c: Likewise. * c-indentation.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-pch.c: Likewise. * c-ppoutput.c: Likewise. * c-pragma.c: Likewise. * c-pretty-print.c: Likewise. * c-semantics.c: Likewise. * c-ubsan.c: Likewise. * cilk.c: Likewise. * stub-objc.c: Likewise. cp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * call.c: Adjust includes. * class.c: Likewise. * constexpr.c: Likewise. * cp-array-notation.c: Likewise. * cp-gimplify.c: Likewise. * cp-lang.c: Likewise. * cp-objcp-common.c: Likewise. * cp-ubsan.c: Likewise. * cvt.c: Likewise. * decl.c: Likewise. * decl2.c: Likewise. * dump.c: Likewise. * error.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * friend.c: Likewise. * init.c: Likewise. * lambda.c: Likewise. * lex.c: Likewise. * mangle.c: Likewise. * method.c: Likewise. * name-lookup.c: Likewise. * optimize.c: Likewise. * parser.c: Likewise. * pt.c: Likewise. * ptree.c: Likewise. * repo.c: Likewise. * rtti.c: Likewise. * search.c: Likewise. * semantics.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. * typeck2.c: Likewise. fortran 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * convert.c: Adjust includes. * cpp.c: Likewise. * decl.c: Likewise. * f95-lang.c: Likewise. * iresolve.c: Likewise. * match.c: Likewise. * module.c: Likewise. * options.c: Likewise. * target-memory.c: Likewise. * trans-array.c: Likewise. * trans-common.c: Likewise. * trans-const.c: Likewise. * trans-decl.c: Likewise. * trans-expr.c: Likewise. * trans-intrinsic.c: Likewise. * trans-io.c: Likewise. * trans-openmp.c: Likewise. * trans-stmt.c: Likewise. * trans-types.c: Likewise. * trans.c: Likewise. go 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * go-backend.c: Adjust includes. * go-gcc.cc: Likewise. * go-lang.c: Likewise. java 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * boehm.c: Adjust includes. * builtins.c: Likewise. * class.c: Likewise. * constants.c: Likewise. * decl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * java-gimplify.c: Likewise. * jcf-dump.c: Likewise. * jcf-io.c: Likewise. * jcf-parse.c: Likewise. * jvgenmain.c: Likewise. * lang.c: Likewise. * mangle.c: Likewise. * mangle_name.c: Likewise. * resource.c: Likewise. * typeck.c: Likewise. * verify-glue.c: Likewise. jit 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * dummy-frontend.c: Adjust includes. * jit-common.h: Likewise. * jit-playback.c: Likewise. lto 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * lto-lang.c: Adjust includes. * lto-object.c: Likewise. * lto-partition.c: Likewise. * lto-symtab.c: Likewise. * lto.c: Likewise. objc 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objc-act.c: Adjust includes. * objc-encoding.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. * objc-lang.c: Likewise. * objc-map.c: Likewise. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. objcp 2015-07-07 Andrew MacLeod <amacleod@redhat.com> * objcp-decl.c: Adjust includes. * objcp-lang.c: Likewise. From-SVN: r225531
2015-07-08 02:53:03 +02:00
#include "gimple.h"
alias.c: Reorder #include statements and remove duplicates. 2015-10-29 Andrew MacLeod <amacleod@redhat.com> * alias.c: Reorder #include statements and remove duplicates. * asan.c: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * auto-profile.c: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * ccmp.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgbuild.c: Likewise. * cfgcleanup.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * cilk-common.c: Likewise. * combine-stack-adj.c: Likewise. * combine.c: Likewise. * compare-elim.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * cppbuiltin.c: Likewise. * cprop.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * debug.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * dfp.c: Likewise. * dojump.c: Likewise. * dominance.c: Likewise. * double-int.c: Likewise. * dse.c: Likewise. * dumpfile.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2cfi.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fixed-value.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * fwprop.c: Likewise. * gcse.c: Likewise. * generic-match-head.c: Likewise. * ggc-common.c: Likewise. * gimple-builder.c: Likewise. * gimple-expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-match-head.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-isolate-paths.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimple-walk.c: Likewise. * gimple.c: Likewise. * gimplify-me.c: Likewise. * gimplify.c: Likewise. * godump.c: Likewise. * graph.c: Likewise. * graphite-poly.c: Likewise. * haifa-sched.c: Likewise. * hw-doloop.c: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * internal-fn.c: Likewise. * ipa-chkp.c: Likewise. * ipa-comdats.c: Likewise. * ipa-cp.c: Likewise. * ipa-devirt.c: Likewise. * ipa-icf-gimple.c: Likewise. * ipa-icf.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-polymorphic-call.c: Likewise. * ipa-profile.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-ref.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ipa-visibility.c: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lra-assigns.c: Likewise. * lra-coalesce.c: Likewise. * lra-constraints.c: Likewise. * lra-eliminations.c: Likewise. * lra-lives.c: Likewise. * lra-remat.c: Likewise. * lra-spills.c: Likewise. * lra.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * real.c: Likewise. * realmpfr.c: Likewise. * recog.c: Likewise. * ree.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regrename.c: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * rtl-chkp.c: Likewise. * rtl-error.c: Likewise. * rtlanal.c: Likewise. * rtlhooks.c: Likewise. * sanopt.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-rgn.c: Likewise. * sese.c: Likewise. * shrink-wrap.c: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * statistics.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * symtab.c: Likewise. * target-globals.c: Likewise. * targhooks.c: Likewise. * toplev.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-affine.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chkp-opt.c: Likewise. * tree-chkp.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.c: Likewise. * tree-diagnostic.c: Likewise. * tree-dump.c: Likewise. * tree-eh.c: Likewise. * tree-emutls.c: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-iterator.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-nested.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-sra.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-scopedtables.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-tail-merge.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-stdarg.c: Likewise. * tree-streamer-in.c: Likewise. * tree-streamer-out.c: Likewise. * tree-streamer.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tsan.c: Likewise. * ubsan.c: Likewise. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. * web.c: Likewise. * wide-int-print.cc: Likewise. * wide-int.cc: Likewise. * xcoffout.c: Likewise. From-SVN: r229526
2015-10-29 14:57:32 +01:00
#include "timevar.h"
#include "cgraph.h"
#include "lto-streamer.h"
Factor unrelated declarations out of tree.h. This patch applies the rule that functions defined in FOO.c must be declared in FOO.h. One of the worst offenders in the code base is tree.h, unsurprisingly. The patch creates several new headers: attribs.h calls.h fold-const.h gcc-symtab.h print-rtl.h print-tree.h stmt.h stor-layout.h stringpool.h tree-nested.h tree-object-size.h varasm.h. Functions in each corresponding .c file got moved to those headers and others that already existed. I wanted to make this patch as mechanical as possible, so I made no attempt to fix problems like having build_addr defined in tree-inline.c. I left that for later. There were some declarations that I could not move out of tree.h because of header poisoning or the use of target macros. We forbid the inclusion of things like expr.h from FE files. While that's a reasonable idea, the FE file *still* manage to at expr.c functionality because the declarations they want to use were defined in tree.h. The affected files are builtins.h, emit-rtl.h and expr.h. If that functionality is allowed to be accessed from the FEs, then I will later move those functions out of expr.c into tree.c. I have moved these declarations to the bottom of tree.h so they are easy to identify later. There is a namespace collision with libcpp. The file gcc/symtab.c cannot use gcc/symtab.h because the #include command picks up libcpp/include/symtab.h first. So I named this file gcc-symtab.h for now. Finally, I added a new header to PLUGIN_HEADERS to account for the tree.h refactoring. I did not add all headers factored out of tree.h because it is unclear (and impossible to tell) what plugins need. This adds the one header used by the plugins in the testsuite. This will be changing quite dramatically as we progress with the header refactoring. This patch should offer some minimal incremental build advantages by reducing the size of tree.h. Changes that would otherwise affected tree.h, will now go to other headers which are less frequently included. * tree.h: Include fold-const.h. (aggregate_value_p): Moved to function.h. (alloca_call_p): Moved to calls.h. (allocate_struct_function): Moved to function.h. (apply_tm_attr): Moved to attribs.h. (array_at_struct_end_p): Moved to expr.h. (array_ref_element_size): Moved to tree-dfa.h. (array_ref_low_bound): Moved to tree-dfa.h. (array_ref_up_bound): Moved to tree.h. (assemble_alias): Moved to cgraph.h. (bit_from_pos): Moved to stor-layout.h. (build_addr): Moved to tree-nested.h. (build_duplicate_type): Moved to tree-inline.h. (build_fold_addr_expr): Moved to fold-const.h. (build_fold_addr_expr_with_type): Moved to fold-const.h. (build_fold_addr_expr_with_type_loc): Moved to fold-const.h. (build_fold_indirect_ref): Moved to fold-const.h. (build_fold_indirect_ref_loc): Moved to fold-const.h. (build_personality_function): Moved to tree.h. (build_range_check): Moved to fold-const.h. (build_simple_mem_ref): Moved to fold-const.h. (build_simple_mem_ref_loc): Moved to fold-const.h. (build_tm_abort_call): Moved to trans-mem.h. (byte_from_pos): Moved to stor-layout.h. (call_expr_flags): Moved to calls.h. (can_move_by_pieces): Moved to expr.h. (categorize_ctor_elements): Moved to expr.h. (change_decl_assembler_name): Moved to gcc-symtab.h. (combine_comparisons): Moved to fold-const.h. (complete_ctor_at_level_p): Moved to tree.h. (component_ref_field_offset): Moved to tree-dfa.h. (compute_builtin_object_size): Moved to tree-object-size.h. (compute_record_mode): Moved to stor-layout.h. (constant_boolean_node): Moved to fold-const.h. (constructor_static_from_elts_p): Moved to varasm.h. (cxx11_attribute_p): Moved to attribs.h. (debug_body): Moved to print-tree.h. (debug_find_tree): Moved to tree-inline.h. (debug_fold_checksum): Moved to fold-const.h. (debug_head): Moved to print-tree.h. (debug_head): Moved to print-tree.h. (debug_raw): Moved to print-tree.h. (debug_tree): Moved to print-tree.h. (debug_vec_tree): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (debug_verbose): Moved to print-tree.h. (decl_attributes): Moved to attribs.h. (decl_binds_to_current_def_p): Moved to varasm.h. (decl_default_tls_model): Moved to varasm.h. (decl_replaceable_p): Moved to varasm.h. (div_if_zero_remainder): Moved to fold-const.h. (double_int mem_ref_offset): Moved to fold-const.h. (dump_addr): Moved to print-tree.h. (element_precision): Moved to machmode.h. (expand_dummy_function_end): Moved to function.h. (expand_function_end): Moved to function.h. (expand_function_start): Moved to function.h. (expand_label): Moved to stmt.h. (expr_first): Moved to tree-iterator.h. (expr_last): Moved to tree-iterator.h. (finalize_size_functions): Moved to stor-layout.h. (finish_builtin_struct): Moved to stor-layout.h. (finish_record_layout): Moved to stor-layout.h. (fixup_signed_type): Moved to stor-layout.h. (fixup_unsigned_type): Moved to stor-layout.h. (flags_from_decl_or_type): Moved to calls.h. (fold): Moved to fold-const.h. (fold_abs_const): Moved to fold-const.h. (fold_binary): Moved to fold-const.h. (fold_binary_loc): Moved to fold-const.h. (fold_binary_to_constant): Moved to fold-const.h. (fold_build1): Moved to fold-const.h. (fold_build1_initializer_loc): Moved to fold-const.h. (fold_build1_loc): Moved to fold-const.h. (fold_build1_stat_loc): Moved to fold-const.h. (fold_build2): Moved to fold-const.h. (fold_build2_initializer_loc): Moved to fold-const.h. (fold_build2_loc): Moved to fold-const.h. (fold_build2_stat_loc): Moved to fold-const.h. (fold_build3): Moved to fold-const.h. (fold_build3_loc): Moved to fold-const.h. (fold_build3_stat_loc): Moved to fold-const.h. (fold_build_call_array): Moved to fold-const.h. (fold_build_call_array_initializer): Moved to fold-const.h. (fold_build_call_array_initializer_loc): Moved to fold-const.h. (fold_build_call_array_loc): Moved to fold-const.h. (fold_build_cleanup_point_expr): Moved to fold-const.h. (fold_convert): Moved to fold-const.h. (fold_convert_loc): Moved to fold-const.h. (fold_convertible_p): Moved to fold-const.h. (fold_defer_overflow_warnings): Moved to fold-const.h. (fold_deferring_overflow_warnings_p): Moved to fold-const.h. (fold_fma): Moved to fold-const.h. (fold_ignored_result): Moved to fold-const.h. (fold_indirect_ref): Moved to fold-const.h. (fold_indirect_ref_1): Moved to fold-const.h. (fold_indirect_ref_loc): Moved to fold-const.h. (fold_read_from_constant_string): Moved to fold-const.h. (fold_real_zero_addition_p): Moved to fold-const.h. (fold_single_bit_test): Moved to fold-const.h. (fold_strip_sign_ops): Moved to fold-const.h. (fold_ternary): Moved to fold-const.h. (fold_ternary_loc): Moved to fold-const.h. (fold_unary): Moved to tree-data-ref.h. (fold_unary_ignore_overflow): Moved to fold-const.h. (fold_unary_ignore_overflow_loc): Moved to fold-const.h. (fold_unary_loc): Moved to fold-const.h. (fold_unary_to_constant): Moved to fold-const.h. (fold_undefer_and_ignore_overflow_warnings): Moved to fold-const.h. (fold_undefer_overflow_warnings): Moved to fold-const.h. (folding_initializer): Moved to fold-const.h. (free_temp_slots): Moved to function.h. (generate_setjmp_warnings): Moved to function.h. (get_attribute_name): Moved to attribs.h. (get_identifier): Moved to stringpool.h. (get_identifier_with_length): Moved to stringpool.h. (get_inner_reference): Moved to tree.h. (gimple_alloca_call_p): Moved to calls.h. (gimplify_parameters): Moved to function.h. (highest_pow2_factor): Moved to expr.h. (indent_to): Moved to print-tree.h. (init_attributes): Moved to attribs.h. (init_dummy_function_start): Moved to function.h. (init_function_start): Moved to function.h. (init_inline_once): Moved to tree-inline.h. (init_object_sizes): Moved to tree-object-size.h. (init_temp_slots): Moved to function.h. (init_tree_optimization_optabs): Moved to optabs.h. (initialize_sizetypes): Moved to stor-layout.h. (initializer_constant_valid_for_bitfield_p): Moved to varasm.h. (initializer_constant_valid_p): Moved to varasm.h. (int_const_binop): Moved to fold-const.h. (internal_reference_types): Moved to stor-layout.h. (invert_tree_comparison): Moved to fold-const.h. (invert_truthvalue): Moved to fold-const.h. (invert_truthvalue_loc): Moved to fold-const.h. (is_tm_ending_fndecl): Moved to trans-mem.h. (is_tm_may_cancel_outer): Moved to trans-mem.h. (is_tm_pure): Moved to trans-mem.h. (is_tm_safe): Moved to trans-mem.h. (layout_decl): Moved to stor-layout.h. (layout_type): Moved to stor-layout.h. (lookup_attribute_spec): Moved to attribs.h. (make_accum_type): Moved to stor-layout.h. (make_decl_one_only): Moved to varasm.h. (make_decl_rtl): Moved to tree.h. (make_decl_rtl_for_debug): Moved to varasm.h. (make_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_sat_unsigned_fract_type): Moved to stor-layout.h. (make_or_reuse_signed_accum_type): Moved to stor-layout.h. (make_or_reuse_signed_fract_type): Moved to stor-layout.h. (make_or_reuse_unsigned_accum_type): Moved to stor-layout.h. (make_or_reuse_unsigned_fract_type): Moved to stor-layout.h. (make_range): Moved to fold-const.h. (make_range_step): Moved to fold-const.h. (make_sat_signed_accum_type): Moved to stor-layout.h. (make_sat_signed_fract_type): Moved to stor-layout.h. (make_sat_unsigned_accum_type): Moved to stor-layout.h. (make_sat_unsigned_fract_type): Moved to stor-layout.h. (make_signed_accum_type): Moved to stor-layout.h. (make_signed_fract_type): Moved to stor-layout.h. (make_signed_type): Moved to stor-layout.h. (make_unsigned_accum_type): Moved to stor-layout.h. (make_unsigned_fract_type): Moved to stor-layout.h. (make_unsigned_type): Moved to stor-layout.h. (mark_decl_referenced): Moved to varasm.h. (mark_referenced): Moved to varasm.h. (may_negate_without_overflow_p): Moved to fold-const.h. (maybe_get_identifier): Moved to stringpool.h. (merge_ranges): Moved to fold-const.h. (merge_weak): Moved to varasm.h. (mode_for_size_tree): Moved to stor-layout.h. (multiple_of_p): Moved to fold-const.h. (must_pass_in_stack_var_size): Moved to calls.h. (must_pass_in_stack_var_size_or_pad): Moved to calls.h. (native_encode_expr): Moved to fold-const.h. (native_interpret_expr): Moved to fold-const.h. (non_lvalue): Moved to fold-const.h. (non_lvalue_loc): Moved to fold-const.h. (normalize_offset): Moved to stor-layout.h. (normalize_rli): Moved to stor-layout.h. (notice_global_symbol): Moved to varasm.h. (omit_one_operand): Moved to fold-const.h. (omit_one_operand_loc): Moved to fold-const.h. (omit_two_operands): Moved to fold-const.h. (omit_two_operands_loc): Moved to fold-const.h. (operand_equal_p): Moved to tree-data-ref.h. (parse_input_constraint): Moved to stmt.h. (parse_output_constraint): Moved to stmt.h. (place_field): Moved to stor-layout.h. (pop_function_context): Moved to function.h. (pop_temp_slots): Moved to function.h. (pos_from_bit): Moved to stor-layout.h. (preserve_temp_slots): Moved to function.h. (print_node): Moved to print-tree.h. (print_node_brief): Moved to print-tree.h. (print_rtl): Moved to rtl.h. (process_pending_assemble_externals): Moved to varasm.h. (ptr_difference_const): Moved to fold-const.h. (push_function_context): Moved to function.h. (push_struct_function): Moved to function.h. (push_temp_slots): Moved to function.h. (record_tm_replacement): Moved to trans-mem.h. (relayout_decl): Moved to stor-layout.h. (resolve_asm_operand_names): Moved to stmt.h. (resolve_unique_section): Moved to varasm.h. (rli_size_so_far): Moved to stor-layout.h. (rli_size_unit_so_far): Moved to stor-layout.h. (round_down): Moved to fold-const.h. (round_down_loc): Moved to fold-const.h. (round_up): Moved to fold-const.h. (round_up_loc): Moved to fold-const.h. (set_decl_incoming_rtl): Moved to emit-rtl.h. (set_decl_rtl): Moved to tree.h. (set_min_and_max_values_for_integral_type): Moved to stor-layout.h. (set_user_assembler_name): Moved to varasm.h. (setjmp_call_p): Moved to calls.h. (size_binop): Moved to fold-const.h. (size_binop_loc): Moved to fold-const.h. (size_diffop): Moved to fold-const.h. (size_diffop_loc): Moved to fold-const.h. (size_int_kind): Moved to fold-const.h. (stack_protect_epilogue): Moved to function.h. (start_record_layout): Moved to stor-layout.h. (supports_one_only): Moved to varasm.h. (swap_tree_comparison): Moved to fold-const.h. (tm_malloc_replacement): Moved to trans-mem.h. (tree build_fold_addr_expr_loc): Moved to fold-const.h. (tree build_invariant_address): Moved to fold-const.h. (tree_binary_nonnegative_warnv_p): Moved to fold-const.h. (tree_binary_nonzero_warnv_p): Moved to fold-const.h. (tree_call_nonnegative_warnv_p): Moved to fold-const.h. (tree_expr_nonnegative_p): Moved to fold-const.h. (tree_expr_nonnegative_warnv_p): Moved to fold-const.h. (tree_output_constant_def): Moved to varasm.h. (tree_overlaps_hard_reg_set): Moved to stmt.h. (tree_single_nonnegative_warnv_p): Moved to fold-const.h. (tree_single_nonzero_warnv_p): Moved to fold-const.h. (tree_swap_operands_p): Moved to fold-const.h. (tree_unary_nonnegative_warnv_p): Moved to fold-const.h. (tree_unary_nonzero_warnv_p): Moved to fold-const.h. (update_alignment_for_field): Moved to stor-layout.h. (use_register_for_decl): Moved to function.h. (variable_size): Moved to rtl.h. (vector_type_mode): Moved to stor-layout.h. * cgraph.h: Corresponding changes. * emit-rtl.h: Corresponding changes. * expr.h: Corresponding changes. * function.h: Corresponding changes. * optabs.h: Corresponding changes. * trans-mem.h: Corresponding changes. Protect against multiple inclusion. * tree-inline.h: Corresponding changes. * tree-iterator.h: Corresponding changes. * tree-dfa.h: Include expr.h. * tree-ssanames.h: Include stringpool.h. * attribs.h: New file. * calls.h: New file. * fold-const.h: New file. * gcc-symtab.h: New file. * print-rtl.h: New file. * print-tree.h: New file. * stmt.h: New file. * stor-layout.h: New file. * strinpool.h: New file. * tree-nested.h: New file * tree-object-size.h: New file. * varasm.h: New file. * Makefile.in (PLUGIN_HEADERS): Add stringpool.h. * alias.c: Include varasm.h. Include expr.h. * asan.c: Include calls.h. Include stor-layout.h. Include varasm.h. * attribs.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. * builtins.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. Include tree-object-size.h. * calls.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include attribs.h. * cfgexpand.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. * cgraph.c: Include varasm.h. Include calls.h. Include print-tree.h. * cgraphclones.c: Include stringpool.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * cgraphunit.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * cilk-common.c: Include stringpool.h. Include stor-layout.h. * combine.c: Include stor-layout.h. * config/aarch64/aarch64-builtins.c: Include stor-layout.h. Include stringpool.h. Include calls.h. * config/aarch64/aarch64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/alpha/alpha.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/arc/arc.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. Include calls.h. * config/arm/arm.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/avr/avr-c.c: Include stor-layout.h. * config/avr/avr-log.c: Include print-tree.h. * config/avr/avr.c: Include print-tree.h. Include calls.h. Include stor-layout.h. Include stringpool.h. * config/bfin/bfin.c: Include varasm.h. Include calls.h. * config/c6x/c6x.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/cr16/cr16.c: Include stor-layout.h. Include calls.h. * config/cris/cris.c: Include varasm.h. Include stor-layout.h. Include calls.h. Include stmt.h. * config/darwin.c: Include stringpool.h. Include varasm.h. Include stor-layout.h. * config/epiphany/epiphany.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/fr30/fr30.c: Include stor-layout.h. Include varasm.h. * config/frv/frv.c: Include varasm.h. Include stor-layout.h. Include stringpool.h. * config/h8300/h8300.c: Include stor-layout.h. Include varasm.h. Include calls.h. Include stringpool.h. * config/i386/i386.c: Include stringpool.h. Include attribs.h. Include calls.h. Include stor-layout.h. Include varasm.h. * config/i386/winnt-cxx.c: Include stringpool.h. Include attribs.h. * config/i386/winnt.c: Include stringpool.h. Include varasm.h. * config/ia64/ia64-c.c: Include stringpool.h. * config/ia64/ia64.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/iq2000/iq2000.c: Include stor-layout.h. Include calls.h. Include varasm.h. * config/lm32/lm32.c: Include calls.h. * config/m32c/m32c.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/m32r/m32r.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/m68k/m68k.c: Include calls.h. Include stor-layout.h. Include varasm.h. * config/mcore/mcore.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. Include calls.h. * config/mep/mep.c: Include varasm.h. Include calls.h. Include stringpool.h. Include stor-layout.h. * config/microblaze/microblaze.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mips/mips.c: Include varasm.h. Include stringpool.h. Include stor-layout.h. Include calls.h. * config/mmix/mmix.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/mn10300/mn10300.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/moxie/moxie.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/msp430/msp430.c: Include stor-layout.h. Include calls.h. * config/nds32/nds32.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/pa/pa.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include calls.h. * config/pdp11/pdp11.c: Include stor-layout.h. Include varasm.h. Include calls.h. * config/picochip/picochip.c: Include calls.h. Include stor-layout.h. Include stringpool.h. Include varasm.h. * config/rl78/rl78.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/rs6000/rs6000-c.c: Include stor-layout.h. Include stringpool.h. * config/rs6000/rs6000.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include print-tree.h. Include varasm.h. * config/rx/rx.c: Include varasm.h. Include stor-layout.h. Include calls.h. * config/s390/s390.c: Include print-tree.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/score/score.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. * config/sh/sh-c.c: Include stringpool.h. Include attribs.h.h. * config/sh/sh.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/sol2-c.c: Include stringpool.h. Include attribs.h. * config/sol2-cxx.c: Include stringpool.h. * config/sol2.c: Include stringpool.h. Include varasm.h. * config/sparc/sparc.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/spu/spu-c.c: Include stringpool.h. * config/spu/spu.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * config/stormy16/stormy16.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilegx/tilegx.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/tilepro/tilepro.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/v850/v850-c.c: Include stringpool.h. Include attribs.h. * config/v850/v850.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include calls.h. * config/vax/vax.c: Include calls.h. Include varasm.h. * config/vms/vms.c: Include stringpool.h. * config/vxworks.c: Include stringpool.h. * config/xtensa/xtensa.c: Include stringpool.h. Include stor-layout.h. Include calls.h. Include varasm.h. * convert.c: Include stor-layout.h. * coverage.c: Include stringpool.h. Include stor-layout.h. * dbxout.c: Include varasm.h. Include stor-layout.h. * dojump.c: Include stor-layout.h. * dse.c: Include stor-layout.h. * dwarf2asm.c: Include stringpool.h. Include varasm.h. * dwarf2cfi.c: Include stor-layout.h. * dwarf2out.c: Include rtl.h. Include stringpool.h. Include stor-layout.h. Include varasm.h. Include function.h. Include emit-rtl.h. Move inclusion of rtl.h earlier in the file. * emit-rtl.c: Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * explow.c: Include stor-layout.h. * expmed.c: Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. Include varasm.h. * final.c: Include varasm.h. * fold-const.c: Include stor-layout.h. Include calls.h. Include tree-iterator.h. * function.c: Include stor-layout.h. Include varasm.h. Include stringpool.h. * genattrtab.c (write_header): Emit includes for varasm.h, stor-layout.h and calls.h. * genautomata.c (main): Likewise. * genemit.c: Likewise. * genopinit.c: Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c: Likewise. * genpreds.c (write_insn_preds_c): Likewise. * gengtype.c (open_base_files): Add stringpool.h. * gimple-expr.c: Include stringpool.h. Include stor-layout.h. * gimple-fold.c: Include stringpool.h. Include expr.h. Include stmt.h. Include stor-layout.h. * gimple-low.c: Include tree-nested.h. Include calls.h. * gimple-pretty-print.c: Include stringpool.h. * gimple-ssa-strength-reduction.c: Include stor-layout.h. Include expr.h. * gimple-walk.c: Include stmt.h. * gimple.c: Include calls.h. Include stmt.h. Include stor-layout.h. * gimplify.c: Include stringpool.h. Include calls.h. Include varasm.h. Include stor-layout.h. Include stmt.h. Include print-tree.h. Include expr.h. * gimplify-me.c: Include stmt.h Include stor-layout.h * internal-fn.c: Include stor-layout.h. * ipa-devirt.c: Include print-tree.h. Include calls.h. * ipa-inline-analysis.c: Include stor-layout.h. Include stringpool.h. Include print-tree.h. * ipa-inline.c: Include trans-mem.h. Include calls.h. * ipa-prop.c: Include expr.h. Include stor-layout.h. Include print-tree.h. * ipa-pure-const.c: Include print-tree.h. Include calls.h. * ipa-reference.c: Include calls.h. * ipa-split.c: Include stringpool.h. Include expr.h. Include calls.h. * ipa.c: Include calls.h. Include stringpool.h. * langhooks.c: Include stringpool.h. Include attribs.h. * lto-cgraph.c: Include stringpool.h. * lto-streamer-in.c: Include stringpool.h. * lto-streamer-out.c: Include stor-layout.h. Include stringpool.h. * omp-low.c: Include stringpool.h. Include stor-layout.h. Include expr.h. * optabs.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * passes.c: Include varasm.h. * predict.c: Include calls.h. * print-rtl.c: Include print-tree.h. * print-tree.c: Include varasm.h. Include print-rtl.h. Include stor-layout.h. * realmpfr.c: Include stor-layout.h. * reg-stack.c: Include varasm.h. * sdbout.c: Include varasm.h. Include stor-layout.h. * simplify-rtx.c: Include varasm.h. * stmt.c: Include varasm.h. Include stor-layout.h. * stor-layout.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. Include print-tree.h. * symtab.c: Include rtl.h. Include print-tree.h. Include varasm.h. Include function.h. Include emit-rtl.h. * targhooks.c: Include stor-layout.h. Include varasm.h. * toplev.c: Include varasm.h. Include tree-inline.h. * trans-mem.c: Include calls.h. Include function.h. Include rtl.h. Include emit-rtl.h. * tree-affine.c: Include expr.h. * tree-browser.c: Include print-tree.h. * tree-call-cdce.c: Include stor-layout.h. * tree-cfg.c: Include trans-mem.h. Include stor-layout.h. Include print-tree.h. * tree-complex.c: Include stor-layout.h. * tree-data-ref.c: Include expr.h. * tree-dfa.c: Include stor-layout.h. * tree-eh.c: Include expr.h. Include calls.h. * tree-emutls.c: Include stor-layout.h. Include varasm.h. * tree-if-conv.c: Include stor-layout.h. * tree-inline.c: Include stor-layout.h. Include calls.h. * tree-loop-distribution.c: Include stor-layout.h. * tree-nested.c: Include stringpool.h. Include stor-layout.h. * tree-object-size.c: Include tree-object-size.h. * tree-outof-ssa.c: Include stor-layout.h. * tree-parloops.c: Include stor-layout.h. Include tree-nested.h. * tree-pretty-print.c: Include stor-layout.h. Include expr.h. * tree-profile.c: Include varasm.h. Include tree-nested.h. * tree-scalar-evolution.c: Include expr.h. * tree-sra.c: Include stor-layout.h. * tree-ssa-address.c: Include stor-layout.h. * tree-ssa-ccp.c: Include stor-layout.h. * tree-ssa-dce.c: Include calls.h. * tree-ssa-dom.c: Include stor-layout.h. * tree-ssa-forwprop.c: Include stor-layout.h. * tree-ssa-ifcombine.c: Include stor-layout.h. * tree-ssa-loop-ivopts.c: Include stor-layout.h. * tree-ssa-loop-niter.c: Include calls.h. Include expr.h. * tree-ssa-loop-prefetch.c: Include stor-layout.h. * tree-ssa-math-opts.c: Include stor-layout.h. * tree-ssa-operands.c: Include stmt.h. Include print-tree.h. * tree-ssa-phiopt.c: Include stor-layout.h. * tree-ssa-reassoc.c: Include stor-layout.h. * tree-ssa-sccvn.c: Include stor-layout.h. * tree-ssa-sink.c: Include stor-layout.h. * tree-ssa-strlen.c: Include stor-layout.h. * tree-ssa-structalias.c: Include stor-layout.h. Include stmt.h. * tree-ssa-tail-merge.c: Include stor-layout.h. Include trans-mem.h. * tree-ssa-uncprop.c: Include stor-layout.h. * tree-ssa.c: Include stor-layout.h. * tree-ssanames.c: Include stor-layout.h. * tree-streamer-in.c: Include stringpool.h. * tree-streamer-out.c: Include stor-layout.h. * tree-switch-conversion.c: Include varasm.h. Include stor-layout.h. * tree-tailcall.c: Include stor-layout.h. * tree-vect-data-refs.c: Include stor-layout.h. * tree-vect-generic.c: Include stor-layout.h. * tree-vect-loop.c: Include stor-layout.h. * tree-vect-patterns.c: Include stor-layout.h. * tree-vect-slp.c: Include stor-layout.h. * tree-vect-stmts.c: Include stor-layout.h. * tree-vectorizer.c: Include stor-layout.h. * tree-vrp.c: Include stor-layout.h. Include calls.h. * tree.c: Include stor-layout.h. Include calls.h. Include attribs.h. Include varasm.h. * tsan.c: Include expr.h. * ubsan.c: Include stor-layout.h. Include stringpool.h. * value-prof.c: Include tree-nested.h. Include calls.h. * var-tracking.c: Include varasm.h. Include stor-layout.h. * varasm.c: Include stor-layout.h. Include stringpool.h. Include gcc-symtab.h. Include varasm.h. * varpool.c: Include varasm.h. * vmsdbgout.c: Include varasm.h. * xcoffout.c: Include varasm.h. ada/ChangeLog * gcc-interface/decl.c: Include stringpool.h Include stor-layout.h * gcc-interface/misc.c: Include stor-layout.h Include print-tree.h * gcc-interface/trans.c: Include stringpool.h Include stor-layout.h Include stmt.h Include varasm.h * gcc-interface/utils.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h * gcc-interface/utils2.c: Include stringpool.h Include stor-layout.h Include attribs.h Include varasm.h c-family/ChangeLog * c-common.c: Include fold-const.h. Include stor-layout.h. Include calls.h. Include stringpool.h. Include attribs.h. Include varasm.h. Include trans-mem.h. * c-cppbuiltin.c: Include stor-layout.h. Include stringpool.h. * c-format.c: Include stringpool.h. * c-lex.c: Include stringpool.h. Include stor-layout.h. * c-pragma.c: Include stringpool.h. Include attribs.h. Include varasm.h. Include gcc-symtab.h. * c-pretty-print.c: Include stor-layout.h. Include attribs.h. * cilk.c: Include stringpool.h. Include calls.h. c/ChangeLog * c-decl.c: Include print-tree.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include stringpool.h. * c-lang.c: Include fold-const.h. * c-parser.c: Include stringpool.h. Include attribs.h. Include stor-layout.h. Include varasm.h. Include trans-mem.h. * c-typeck.c: Include stor-layout.h. Include trans-mem.h. Include varasm.h. Include stmt.h. cp/ChangeLog * call.c: Include stor-layout.h. Include trans-mem.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * cp-gimplify.c: Include stor-layout.h. * cvt.c: Include stor-layout.h. * decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. Include calls.h. * decl2.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. Include calls.h. * error.c: Include stringpool.h. * except.c: Include stringpool.h. Include trans-mem.h. Include attribs.h. * init.c: Include stringpool.h. Include varasm.h. * lambda.c: Include stringpool.h. * lex.c: Include stringpool.h. * mangle.c: Include stor-layout.h. Include stringpool.h. * method.c: Include stringpool.h. Include varasm.h. * name-lookup.c: Include stringpool.h. Include print-tree.h. Include attribs.h. * optimize.c: Include stringpool.h. * parser.c: Include print-tree.h. Include stringpool.h. Include attribs.h. Include trans-mem.h. * pt.c: Include stringpool.h. Include varasm.h. Include attribs.h. Include stor-layout.h. * ptree.c: Include print-tree.h. * repo.c: Include stringpool.h. * rtti.c: Include stringpool.h. Include stor-layout.h. * semantics.c: Include stmt.h. Include varasm.h. Include stor-layout.h. Include stringpool.h. * tree.c: Include stor-layout.h. Include print-tree.h. Include tree-iterator.h. * typeck.c: Include stor-layout.h. Include varasm.h. * typeck2.c: Include stor-layout.h. Include varasm.h. * vtable-class-hierarchy.c: Include stringpool.h. Include stor-layout.h. fortran/ChangeLog * decl.c: Include stringpool.h. * iresolve.c: Include stringpool.h. * match.c: Include stringpool.h. * module.c: Include stringpool.h. * target-memory.c: Include stor-layout.h. * trans-common.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * trans-const.c: Include stor-layout.h. * trans-decl.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. Include attribs.h. * trans-expr.c: Include stringpool.h. * trans-intrinsic.c: Include stringpool.h. Include tree-nested.h. Include stor-layout.h. * trans-io.c: Include stringpool.h. Include stor-layout.h. * trans-openmp.c: Include stringpool.h. * trans-stmt.c: Include stringpool.h. * trans-types.c: Include stor-layout.h. Include stringpool.h. * trans.c: Include stringpool.h. go/ChangeLog * go-backend.c: Include stor-layout.h. * go-gcc.cc: Include stringpool.h. Include stor-layout.h. Include varasm.h. * go-lang.c: Include stor-layout.h. java/ChangeLog * builtins.c: Include stor-layout.h. Include stringpool.h. * class.c: Include stringpool.h. Include stor-layout.h. Include varasm.h. * constants.c: Include stringpool.h. Include stor-layout.h. * decl.c: Include stor-layout.h. Include stringpool.h. Include varasm.h. * except.c: Include stringpool.h. Include stor-layout.h. * expr.c: Include stringpool.h. Include stor-layout.h. * jcf-parse.c: Include stringpool.h. * mangle.c: Include stringpool.h. * resource.c: Include stringpool.h. Include stor-layout.h. * typeck.c: Include stor-layout.h. Include stringpool.h. * verify-glue.c: Include stringpool.h. lto/ChangeLog * lto-lang.c: Include stringpool.h. Include stor-layout.h. * lto-partition.c: Include gcc-symtab.h. * lto.c: Include stor-layout.h. objc/ChangeLog * objc-act.c: Include stringpool.h. Include stor-layout.h. Include attribs.h. * objc-encoding.c: Include stringpool.h. Include stor-layout.h. * objc-gnu-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-01.c: Include stringpool.h. * objc-next-runtime-abi-02.c: Include stringpool.h. * objc-runtime-shared-support.c: Include stringpool.h. testsuite/ChangeLog * gcc.dg/plugin/selfassign.c: Include stringpool.h. * gcc.dg/plugin/start_unit_plugin.c: Likewise. From-SVN: r205023
2013-11-19 13:31:09 +01:00
#include "varasm.h"
Remove trailing white spaces. 2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-11-25 11:55:54 +01:00
#include "debug.h"
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
#include "output.h"
#include "omp-low.h"
#include "context.h"
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
const char * const tls_model_names[]={"none", "emulated",
"global-dynamic", "local-dynamic",
"initial-exec", "local-exec"};
/* List of hooks triggered on varpool_node events. */
struct varpool_node_hook_list {
varpool_node_hook hook;
void *data;
struct varpool_node_hook_list *next;
};
/* Register HOOK to be called with DATA on each removed node. */
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list *
symbol_table::add_varpool_removal_hook (varpool_node_hook hook, void *data)
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list *entry;
varpool_node_hook_list **ptr = &m_first_varpool_removal_hook;
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
entry = (varpool_node_hook_list *) xmalloc (sizeof (*entry));
entry->hook = hook;
entry->data = data;
entry->next = NULL;
while (*ptr)
ptr = &(*ptr)->next;
*ptr = entry;
return entry;
}
/* Remove ENTRY from the list of hooks called on removing nodes. */
void
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
symbol_table::remove_varpool_removal_hook (varpool_node_hook_list *entry)
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list **ptr = &m_first_varpool_removal_hook;
while (*ptr != entry)
ptr = &(*ptr)->next;
*ptr = entry->next;
free (entry);
}
/* Call all node removal hooks. */
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
void
symbol_table::call_varpool_removal_hooks (varpool_node *node)
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list *entry = m_first_varpool_removal_hook;
while (entry)
{
entry->hook (node, entry->data);
entry = entry->next;
}
}
/* Register HOOK to be called with DATA on each inserted node. */
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list *
symbol_table::add_varpool_insertion_hook (varpool_node_hook hook, void *data)
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list *entry;
varpool_node_hook_list **ptr = &m_first_varpool_insertion_hook;
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
entry = (varpool_node_hook_list *) xmalloc (sizeof (*entry));
entry->hook = hook;
entry->data = data;
entry->next = NULL;
while (*ptr)
ptr = &(*ptr)->next;
*ptr = entry;
return entry;
}
/* Remove ENTRY from the list of hooks called on inserted nodes. */
void
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
symbol_table::remove_varpool_insertion_hook (varpool_node_hook_list *entry)
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list **ptr = &m_first_varpool_insertion_hook;
while (*ptr != entry)
ptr = &(*ptr)->next;
*ptr = entry->next;
free (entry);
}
/* Call all node insertion hooks. */
void
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
symbol_table::call_varpool_insertion_hooks (varpool_node *node)
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node_hook_list *entry = m_first_varpool_insertion_hook;
while (entry)
{
entry->hook (node, entry->data);
entry = entry->next;
}
}
/* Allocate new callgraph node and insert it into basic data structures. */
varpool_node *
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::create_empty (void)
{
use templates instead of gengtype for typed allocation functions gcc/ChangeLog: * alias.c (record_alias_subset): Adjust. * bitmap.c (bitmap_element_allocate): Likewise. (bitmap_gc_alloc_stat): Likewise. * cfg.c (init_flow): Likewise. (alloc_block): Likewise. (unchecked_make_edge): Likewise. * cfgloop.c (alloc_loop): Likewise. (flow_loops_find): Likewise. (rescan_loop_exit): Likewise. * cfgrtl.c (init_rtl_bb_info): Likewise. * cgraph.c (insert_new_cgraph_node_version): Likewise. (cgraph_allocate_node): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_allocate_init_indirect_info): Likewise. * cgraphclones.c (cgraph_clone_edge): Likewise. * cgraphunit.c (add_asm_node): Likewise. (init_lowered_empty_function): Likewise. * config/aarch64/aarch64.c (aarch64_init_machine_status): Likewise. * config/alpha/alpha.c (alpha_init_machine_status): Likewise. (alpha_use_linkage): Likewise. * config/arc/arc.c (arc_init_machine_status): Likewise. * config/arm/arm.c (arm_init_machine_status): Likewise. * config/avr/avr.c (avr_init_machine_status): Likewise. * config/bfin/bfin.c (bfin_init_machine_status): Likewise. * config/c6x/c6x.c (c6x_init_machine_status): Likewise. * config/cris/cris.c (cris_init_machine_status): Likewise. * config/darwin.c (machopic_indirection_name): Likewise. (darwin_build_constant_cfstring): Likewise. (darwin_enter_string_into_cfstring_table): Likewise. * config/epiphany/epiphany.c (epiphany_init_machine_status): * Likewise. * config/frv/frv.c (frv_init_machine_status): Likewise. * config/i386/i386.c (get_dllimport_decl): Likewise. (ix86_init_machine_status): Likewise. (assign_386_stack_local): Likewise. * config/i386/winnt.c (i386_pe_record_external_function): Likewise. (i386_pe_maybe_record_exported_symbol): Likewise. (i386_pe_record_stub): Likewise. * config/ia64/ia64.c (ia64_init_machine_status): Likewise. * config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise. * config/m32c/m32c.c (m32c_init_machine_status): Likewise. (m32c_note_pragma_address): Likewise. * config/mep/mep.c (mep_init_machine_status): Likewise. (mep_note_pragma_flag): Likewise. * config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise. (mips16_local_alias): Likewise. (mips_init_machine_status): Likewise. * config/mmix/mmix.c (mmix_init_machine_status): Likewise. * config/moxie/moxie.c (moxie_init_machine_status): Likewise. * config/msp430/msp430.c (msp430_init_machine_status): Likewise. * config/nds32/nds32.c (nds32_init_machine_status): Likewise. * config/nios2/nios2.c (nios2_init_machine_status): Likewise. * config/pa/pa.c (pa_init_machine_status): Likewise. (pa_get_deferred_plabel): Likewise. * config/rl78/rl78.c (rl78_init_machine_status): Likewise. * config/rs6000/rs6000.c (builtin_function_type): Likewise. (rs6000_init_machine_status): Likewise. (output_toc): Likewise. * config/s390/s390.c (s390_init_machine_status): Likewise. * config/score/score.c (score_output_external): Likewise. * config/sparc/sparc.c (sparc_init_machine_status): Likewise. * config/spu/spu.c (spu_init_machine_status): Likewise. * config/tilegx/tilegx.c (tilegx_init_machine_status): Likewise. * config/tilepro/tilepro.c (tilepro_init_machine_status): * Likewise. * config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise. * coverage.c (coverage_end_function): Likewise. * dbxout.c (dbxout_init): Likewise. * doc/gty.texi: Don't mention variable_size attribute. * dwarf2cfi.c (new_cfi): Adjust. (new_cfi_row): Likewise. (copy_cfi_row): Likewise. (create_cie_data): Likewise. * dwarf2out.c (dwarf2out_alloc_current_fde): Likewise. (new_loc_descr): Likewise. (find_AT_string_in_table): Likewise. (add_addr_table_entry): Likewise. (new_die): Likewise. (add_var_loc_to_decl): Likewise. (clone_die): Likewise. (clone_as_declaration): Likewise. (break_out_comdat_types): Likewise. (new_loc_list): Likewise. (add_loc_descr_to_each): Likewise. (add_location_or_const_value_attribute): Likewise. (add_linkage_name): Likewise. (lookup_filename): Likewise. (dwarf2out_var_location): Likewise. (new_line_info_table): Likewise. (dwarf2out_init): Likewise. (mem_loc_descriptor): Likewise. (loc_descriptor): Likewise. (add_const_value_attribute): Likewise. (tree_add_const_value_attribute): Likewise. (comp_dir_string): Likewise. (dwarf2out_vms_debug_main_pointer): Likewise. (string_cst_pool_decl): Likewise. * emit-rtl.c (set_mem_attrs): Likewise. (get_reg_attrs): Likewise. (start_sequence): Likewise. (init_emit): Likewise. (init_emit_regs): Likewise. * except.c (init_eh_for_function): Likewise. (gen_eh_region): Likewise. (gen_eh_region_catch): Likewise. (gen_eh_landing_pad): Likewise. (add_call_site): Likewise. * function.c (add_frame_space): Likewise. (insert_temp_slot_address): Likewise. (assign_stack_temp_for_type): Likewise. (get_hard_reg_initial_val): Likewise. (allocate_struct_function): Likewise. (prepare_function_start): Likewise. (types_used_by_var_decl_insert): Likewise. * gengtype.c (variable_size_p): Remove function. (enum alloc_quantity): Remove enum. (write_typed_alloc_def): Remove function. (write_typed_struct_alloc_def): Likewise. (write_typed_typedef_alloc_def): Likewise. (write_typed_alloc_defns): Likewise. (main): Adjust. * ggc-common.c (ggc_cleared_alloc_htab_ignore_args): Adjust. (ggc_cleared_alloc_ptr_array_two_args): Likewise. * ggc.h (ggc_alloc): new function. (ggc_cleared_alloc): Likewise. (ggc_vec_alloc): Template on type of vector element, and remove element size argument. (ggc_cleared_vec_alloc): Likewise. * gimple.c (gimple_build_omp_for): Adjust. (gimple_copy): Likewise. * ipa-cp.c (get_replacement_map): Likewise. (find_aggregate_values_for_callers_subset): Likewise. (known_aggs_to_agg_replacement_list): Likewise. * ipa-devirt.c (get_odr_type): Likewise. * ipa-prop.c (ipa_node_duplication_hook): Likewise. (read_agg_replacement_chain): Likewise. * loop-iv.c (get_simple_loop_desc): Likewise. * lto-cgraph.c (input_node_opt_summary): Likewise. * lto-section-in.c (lto_new_in_decl_state): Likewise. * lto-streamer-in.c (lto_input_eh_catch_list): Likewise. (input_eh_region): Likewise. (input_eh_lp): Likewise. (input_cfg): Likewise. * optabs.c (set_optab_libfunc): Likewise. (init_tree_optimization_optabs): Likewise. (set_conv_libfunc): Likewise. * passes.c (do_per_function_toporder): Likewise. * rtl.h: Don't use variable_size gty attribute. * sese.c (if_region_set_false_region): Adjust. * stringpool.c (gt_pch_save_stringpool): Likewise. * target-globals.c (save_target_globals): Likewise. * toplev.c (general_init): Likewise. * trans-mem.c (record_tm_replacement): Likewise. (split_bb_make_tm_edge): Likewise. * tree-cfg.c (move_sese_region_to_fn): Likewise. * tree-data-ref.h (lambda_vector_new): Likewise. * tree-eh.c (add_stmt_to_eh_lp_fn): Likewise. * tree-iterator.c (tsi_link_before): Likewise. (tsi_link_after): Likewise. * tree-scalar-evolution.c (new_scev_info_str): Likewise. * tree-ssa-loop-niter.c (record_estimate): Likewise. * tree-ssa-operands.c (ssa_operand_alloc): Likewise. * tree-ssa-operands.h: Don't use variable_size gty attribute. * tree-ssa.c (init_tree_ssa): Adjust. * tree-ssanames.c (set_range_info): Likewise. (get_ptr_info): Likewise. (duplicate_ssa_name_ptr_info): Likewise. (duplicate_ssa_name_range_info): Likewise. * tree-streamer-in.c (unpack_ts_real_cst_value_fields): Likewise. (unpack_ts_fixed_cst_value_fields): Likewise. * tree.c (build_fixed): Likewise. (build_real): Likewise. (build_string): Likewise. (decl_priority_info): Likewise. (decl_debug_expr_insert): Likewise. (decl_value_expr_insert): Likewise. (decl_debug_args_insert): Likewise. (type_hash_add): Likewise. (build_omp_clause): Likewise. * ubsan.c (decl_for_type_insert): Likewise. * varasm.c (get_unnamed_section): Likewise. (get_noswitch_section): Likewise. (get_section): Likewise. (get_block_for_section): Likewise. (create_block_symbol): Likewise. (build_constant_desc): Likewise. (create_constant_pool): Likewise. (force_const_mem): Likewise. (record_tm_clone_pair): Likewise. * varpool.c (varpool_create_empty_node): Likewise. gcc/c/ChangeLog: * c-decl.c (finish_struct): Adjust. (finish_enum): Likewise. (bind): Adjust. (record_inline_static): Likewise. (push_scope): Likewise. (make_label): Likewise. (lookup_label_for_goto): Likewise. (finish_struct): Likewise. (finish_enum): Likewise. (store_parm_decls): Likewise. (c_push_function_context): Likewise. * c-lang.h: Remove usage of variable_size gty attribute. * c-parser.c (c_parse_init): Adjust. (c_parse_file): Likewise. gcc/java/ChangeLog: * class.c (add_method_1): Adjust. (java_treetreehash_new): Likewise. * constants.c (set_constant_entry): Likewise. (cpool_for_class): Likewise. * decl.c (make_binding_level): Likewise. (java_dup_lang_specific_decl): Likewise. * expr.c (add_type_assertion): Likewise. * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise. (lang_decl): don't use variable_size gty attribute. (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust. (lang_type): Don't use variable_size gty attribute. * jcf-parse.c (java_parse_file): Adjust. (process_zip_dir): Likewise. * jcf.h: Remove usage of variable_size gty attribute. * jcf-reader.c (jcf_parse_constant_pool): Adjust. (jcf_parse_bootstrap_methods): Likewise. gcc/objc/ChangeLog: * objc-act.c (objc_build_string_object): Adjust. (continue_class): Likewise. * objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise. * objc-map.c (objc_map_alloc_ggc): Likewise. (objc_map_private_resize): Likewise. * objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init): Likewise. (hash_name_enter): Likewise. gcc/cp/ChangeLog: * class.c (sorted_fields_type_new): Adjust. * cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise. * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise. * cp-tree.h: Remove usage of variable_size gty attribute. * decl.c (make_label_decl): Adjust. (check_goto): Likewise. (start_preparsed_function): Likewise. (save_function_data): Likewise. * lex.c (init_reswords): Likewise. (retrofit_lang_decl): Likewise. (cxx_dup_lang_specific_decl): Likewise. (copy_lang_type): Likewise. (cxx_make_type): Likewise. * name-lookup.c (binding_entry_make): Likewise. (binding_table_construct): Likewise. (binding_table_new): Likewise. (cxx_binding_make): Likewise. (pushdecl_maybe_friend_1): Likewise. (begin_scope): Likewise. (push_to_top_level): Likewise. * parser.c (cp_lexer_alloc): Likewise. (cp_lexer_new_from_tokens): Likewise. (cp_token_cache_new): Likewise. (cp_parser_context_new): Likewise. (cp_parser_new): Likewise. (cp_parser_nested_name_specifier_opt): Likewise. (cp_parser_template_id): Likewise. * pt.c (maybe_process_partial_specialization): Likewise. (register_specialization): Likewise. (add_pending_template): Likewise. (lookup_template_class_1): Likewise. (push_tinst_level): Likewise. * semantics.c (register_constexpr_fundef): Likewise. (cxx_eval_call_expression): Likewise. * typeck2.c (abstract_virtuals_error_sfinae): Likewise. gcc/fortran/ChangeLog: * f95-lang.c (pushlevel): Adjust. * trans-decl.c (gfc_allocate_lang_decl): Adjust. (gfc_find_module): Likewise. * trans-types.c (gfc_get_nodesc_array_type): Likewise. (gfc_get_array_type_bounds): Likewise. (gfc_nonrestricted_type): Likewise. * trans.h: Don't use variable_size gty attribute. gcc/ada/ChangeLog: * gcc-interface/ada-tree.h: Remove usage of variable_size gty annotation. * gcc-interface/decl.c (annotate_value): Adjust. * gcc-interface/trans.c (Attribute_to_gnu): Likewise. (push_range_check_info): Likewise. (Loop_Statement_to_gnu): Likewise. (Subprogram_Body_to_gnu): Likewise. (Compilation_Unit_to_gnu): Likewise. (start_stmt_group): Likewise. * gcc-interface/utils.c (init_gnat_utils): Likewise. (gnat_pushlevel): Likewise. (maybe_pad_type): Likewise. gcc/go/ChangeLog: * go-lang.c (struct GTY): Don't use variable_size gty attribute. gcc/c-family/ChangeLog: * c-common.h (sorted_fields_type): Remove variable_size GTY attribute. * c-pragma.c (push_alignment): Adjust. (handle_pragma_push_options): Likewise. gcc/lto/ChangeLog: * lto-tree.h: Don't use variable_size gty attribute. * lto.c (lto_read_in_decl_state): Adjust. (create_subid_section_table): Likewise. (lto_flatten_files): Likewise. (read_cgraph_and_symbols): Likewise. gcc/objcp/ChangeLog: * objcp-decl.h: Adjust. From-SVN: r210566
2014-05-18 01:07:23 +02:00
varpool_node *node = ggc_cleared_alloc<varpool_node> ();
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
node->type = SYMTAB_VARIABLE;
return node;
}
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* Return varpool node assigned to DECL. Create new one when needed. */
varpool_node *
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::get_create (tree decl)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node *node = varpool_node::get (decl);
gcc_checking_assert (TREE_CODE (decl) == VAR_DECL);
cgraph.c (cgraph_hash, [...]): Remove. * cgraph.c (cgraph_hash, assembler_name_hash): Remove. (hash_node, eq_node): Remove. (cgraph_create_node): Do not handle hashtable. (cgraph_get_node): Remove. (cgraph_insert_node_to_hashtable): Remove. (hash_node_by_assembler_name): Remove. (eq_assembler_name): Remove. (cgraph_node_for_asm): Rewrite. (cgraph_find_replacement_node): Break out from ... (cgraph_remove_node): ... here; do not maintain hashtables. (change_decl_assembler_name): Remove. (cgraph_clone_node): Do not maintain hashtables. * cgraph.h (const_symtab_node): New typedef. (cgraph_insert_node_to_hashtable): Remove. (symtab_get_node, symtab_node_for_asm, symtab_insert_node_to_hashtable): Declare. (cgraph_find_replacement_node): Declare. (cgraph_get_node, varpool_get_node): Turn into inlines. (cgraph, varpool): Work sanely on NULL pointers. (FOR_EACH_SYMBOL): New walker. * ipa-inline-transform.c (save_inline_function_body): Use symtab_insert_node_to_hashtable. * symtab.c: Include ggc.h and diagnostics.h (symtab_hash, assembler_name_hash): New static vars; (hash_node, eq_node, hash_node_by_assembler_name, eq_assembler_name, insert_to_assembler_name_hash, unlink_from_assembler_name_hash): New. (symtab_register_node): Update hashtables. (symtab_insert_node_to_hashtable): New. (symtab_unregister_node): Update hashtables. (symtab_get_node): New. (symtab_node_for_asm): New. (change_decl_assembler_name): New. * Makefile.in (symtab.o): Needs GTY. * varpool.c (varpool_hash): Remove. (hash_varpool_node, eq_varpool_node, varpool_get_node): Remove. (varpool_node): Rewrite using varpool_get_node. (varpool_remove_node): DO not maintain hashtables. (varpool_node_for_asm); Rewrite. From-SVN: r186525
2012-04-17 12:53:22 +02:00
if (node)
return node;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
node = varpool_node::create_empty ();
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
node->decl = decl;
[PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming. gcc/ * cgraph.c: Include context.h. (cgraph_node::create): Set node->offloadable and g->have_offload if decl have "omp declare target" attribute. * cgraph.h (symtab_node): Add need_lto_streaming and offloadable flags. * cgraphunit.c: Include lto-section-names.h. (ipa_passes): Call ipa_write_summaries if there is something to write to OFFLOAD_SECTION_NAME_PREFIX sections. (symbol_table::compile): Set flag_generate_lto if there is something to offload. Replace flag_lto with flag_generate_lto before lto_streamer_hooks_init. * context.c (gcc::context::context): Initialize have_offload with false. * context.h (class context): Add have_offload flag. * ipa-inline-analysis.c (inline_generate_summary): Do not exit under flag_generate_lto. (inline_free_summary): Always remove hooks. * lto-cgraph.c (referenced_from_other_partition_p): Ignore references from non-offloadable nodes while streaming a node into offload section. (reachable_from_other_partition_p): Likewise. (select_what_to_stream): New function. (compute_ltrans_boundary): Do not call lto_set_symtab_encoder_in_partition if the node should not be streamed. * lto-section-names.h (OFFLOAD_SECTION_NAME_PREFIX): Define. (section_name_prefix): Declare. * lto-streamer.c (section_name_prefix): New variable. (lto_get_section_name): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. * lto-streamer.h (select_what_to_stream): Declare. * omp-low.c: Include context.h. (is_targetreg_ctx): New function. (scan_sharing_clauses): Use offloadable flag, instead of an attribute. (create_omp_child_function, check_omp_nesting_restrictions): Use new is_targetreg_ctx function. Replace usage of "omp declare target" attribute with a cgraph_node flag offloadable. (expand_omp_target): Set mark_force_output for offloadable functions. (lower_omp_critical): Set offloadable flag for omp critical symbol. * passes.c (ipa_write_summaries): New argument offload_lto_mode. Call select_what_to_stream. Do not call lto_set_symtab_encoder_in_partition if the node should not be streamed out. * tree-pass.h (ipa_write_summaries): New bool argument. * varpool.c: Include context.h. (varpool_node::get_create): Set node->offloadable and g->have_offload if decl have "omp declare target" attribute. gcc/lto/ * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. * lto-partition.c (lto_promote_cross_file_statics): Call select_what_to_stream. * lto.c (lto_section_with_id): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if being built as an offload compiler. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com> Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com> From-SVN: r217486
2014-11-13 14:37:38 +01:00
if ((flag_openacc || flag_openmp) && !DECL_EXTERNAL (decl)
[PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming. gcc/ * cgraph.c: Include context.h. (cgraph_node::create): Set node->offloadable and g->have_offload if decl have "omp declare target" attribute. * cgraph.h (symtab_node): Add need_lto_streaming and offloadable flags. * cgraphunit.c: Include lto-section-names.h. (ipa_passes): Call ipa_write_summaries if there is something to write to OFFLOAD_SECTION_NAME_PREFIX sections. (symbol_table::compile): Set flag_generate_lto if there is something to offload. Replace flag_lto with flag_generate_lto before lto_streamer_hooks_init. * context.c (gcc::context::context): Initialize have_offload with false. * context.h (class context): Add have_offload flag. * ipa-inline-analysis.c (inline_generate_summary): Do not exit under flag_generate_lto. (inline_free_summary): Always remove hooks. * lto-cgraph.c (referenced_from_other_partition_p): Ignore references from non-offloadable nodes while streaming a node into offload section. (reachable_from_other_partition_p): Likewise. (select_what_to_stream): New function. (compute_ltrans_boundary): Do not call lto_set_symtab_encoder_in_partition if the node should not be streamed. * lto-section-names.h (OFFLOAD_SECTION_NAME_PREFIX): Define. (section_name_prefix): Declare. * lto-streamer.c (section_name_prefix): New variable. (lto_get_section_name): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. * lto-streamer.h (select_what_to_stream): Declare. * omp-low.c: Include context.h. (is_targetreg_ctx): New function. (scan_sharing_clauses): Use offloadable flag, instead of an attribute. (create_omp_child_function, check_omp_nesting_restrictions): Use new is_targetreg_ctx function. Replace usage of "omp declare target" attribute with a cgraph_node flag offloadable. (expand_omp_target): Set mark_force_output for offloadable functions. (lower_omp_critical): Set offloadable flag for omp critical symbol. * passes.c (ipa_write_summaries): New argument offload_lto_mode. Call select_what_to_stream. Do not call lto_set_symtab_encoder_in_partition if the node should not be streamed out. * tree-pass.h (ipa_write_summaries): New bool argument. * varpool.c: Include context.h. (varpool_node::get_create): Set node->offloadable and g->have_offload if decl have "omp declare target" attribute. gcc/lto/ * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. * lto-partition.c (lto_promote_cross_file_statics): Call select_what_to_stream. * lto.c (lto_section_with_id): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if being built as an offload compiler. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com> Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com> From-SVN: r217486
2014-11-13 14:37:38 +01:00
&& lookup_attribute ("omp declare target", DECL_ATTRIBUTES (decl)))
{
node->offloadable = 1;
if (ENABLE_OFFLOADING)
{
g->have_offload = true;
if (!in_lto_p)
vec_safe_push (offload_vars, decl);
}
[PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming. gcc/ * cgraph.c: Include context.h. (cgraph_node::create): Set node->offloadable and g->have_offload if decl have "omp declare target" attribute. * cgraph.h (symtab_node): Add need_lto_streaming and offloadable flags. * cgraphunit.c: Include lto-section-names.h. (ipa_passes): Call ipa_write_summaries if there is something to write to OFFLOAD_SECTION_NAME_PREFIX sections. (symbol_table::compile): Set flag_generate_lto if there is something to offload. Replace flag_lto with flag_generate_lto before lto_streamer_hooks_init. * context.c (gcc::context::context): Initialize have_offload with false. * context.h (class context): Add have_offload flag. * ipa-inline-analysis.c (inline_generate_summary): Do not exit under flag_generate_lto. (inline_free_summary): Always remove hooks. * lto-cgraph.c (referenced_from_other_partition_p): Ignore references from non-offloadable nodes while streaming a node into offload section. (reachable_from_other_partition_p): Likewise. (select_what_to_stream): New function. (compute_ltrans_boundary): Do not call lto_set_symtab_encoder_in_partition if the node should not be streamed. * lto-section-names.h (OFFLOAD_SECTION_NAME_PREFIX): Define. (section_name_prefix): Declare. * lto-streamer.c (section_name_prefix): New variable. (lto_get_section_name): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. * lto-streamer.h (select_what_to_stream): Declare. * omp-low.c: Include context.h. (is_targetreg_ctx): New function. (scan_sharing_clauses): Use offloadable flag, instead of an attribute. (create_omp_child_function, check_omp_nesting_restrictions): Use new is_targetreg_ctx function. Replace usage of "omp declare target" attribute with a cgraph_node flag offloadable. (expand_omp_target): Set mark_force_output for offloadable functions. (lower_omp_critical): Set offloadable flag for omp critical symbol. * passes.c (ipa_write_summaries): New argument offload_lto_mode. Call select_what_to_stream. Do not call lto_set_symtab_encoder_in_partition if the node should not be streamed out. * tree-pass.h (ipa_write_summaries): New bool argument. * varpool.c: Include context.h. (varpool_node::get_create): Set node->offloadable and g->have_offload if decl have "omp declare target" attribute. gcc/lto/ * lto-object.c (lto_obj_add_section): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. * lto-partition.c (lto_promote_cross_file_statics): Call select_what_to_stream. * lto.c (lto_section_with_id): Use section_name_prefix instead of LTO_SECTION_NAME_PREFIX. (read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if being built as an offload compiler. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com> Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com> From-SVN: r217486
2014-11-13 14:37:38 +01:00
}
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
node->register_symbol ();
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
return node;
}
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
/* Remove variable from symbol table. */
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
void
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
varpool_node::remove (void)
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
symtab->call_varpool_removal_hooks (this);
if (lto_file_data)
{
lto_free_function_in_decl_state_for_node (this);
lto_file_data = NULL;
}
cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... * cgraph.h (symtab_node_base): Add definition, alias and analyzed flags; reorder rest of fields in more consistent way. (varpool_node): Remove analyzed, finalized and alias. (cgraph_ndoe): Likewise. (symtab_alias_ultimate_target): New function. (cgraph_function_node): Move offline. (cgraph_reset_node): Declare. (cgraph_comdat_can_be_unshared_p): Remove. (varpool_remove_initializer): Declare. (varpool_first_defined_variable, varpool_next_defined_variable cgraph_first_defined_function, cgraph_next_defined_function): Update. (cgraph_function_with_gimple_body_p): Update. (varpool_all_refs_explicit_p): Update. (symtab_alias_target): New function. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Rename to ... (cgraph_alias_target, varpool_alias_target): .. this one; simplify. (cgraph_function_or_thunk_node): Simplify using symtab_alias_ultimate_target. (varpool_variable_node): Likewise. * cgraph.c (cgraph_create_function_alias): Update. (cgraph_add_thunk): Update. (cgraph_remove_node): Update. (dump_cgraph_node): Do not dump removed flags. (cgraph_function_body_availability): Update. (cgraph_propagate_frequency): Update. (verify_cgraph_node): Check sanity of local flag. (cgraph_function_node): Move here from cgraph.h; revamp for cgraph_function_or_thunk_node. * lto-symtab.c (lto_varpool_replace_node): Update. (lto_symtab_resolve_can_prevail_p): Update. (lto_symtab_merge_cgraph_nodes): Update. * ipa-cp.c (determine_versionability, initialize_node_lattices, propagate_constants_accross_call, devirtualization_time_bonus, ipcp_propagate_stage): Update. * tree-emutls.c (create_emultls_var, ipa_lower_emutls): Update. * ipa-inline-transform.c (clone_inlined_nodes, preserve_function_body_p): Update. * ipa-reference.c (propagate): Update. (write_node_summary_p): Update. * toplev.c (wrapup_global_declaration_2): Update. * cgraphunit.c (cgraph_analyze_function): Rename to ... (analyze_function) ... this one. (cgraph_process_new_functions): Update. (cgraph_reset_node): Export. (cgraph_finalize_function): Update. (cgraph_add_new_function): Update. (process_function_and_variable_attributes): Update. (varpool_finalize_decl): Update. (symbol_finalized): Remove. (symbol_finalized_and_needed): Rename to ... (symbol_defined_and_needed): ... update. (cgraph_analyze_functions): Update. (handle_alias_pairs): Update. (mark_functions_to_output): Update. (assemble_thunk): Update. (output_in_order): Update. (output_weakrefs): Update. (finalize_compilation_unit): Update. * lto-cgraph.c (reachable_from_other_partition_p, lto_output_node, lto_output_varpool_node, compute_ltrans_boundary, input_overwrite_node, input_node, input_varpool_node): Update. * dbxout.c (dbxout_expand_expr): Update. * cgraphclones.c (cgraph_clone_node): Update. (cgraph_copy_node_for_versioning): Update. (cgraph_materialize_clone): Update. (cgraph_materialize_all_clones): Update. * ipa-pure-const.c (analyze_function, pure_const_write_summary, propagate_pure_const, propagate_nothrow): Update. * lto-streamer-out.c (lto_output, write_symbol): Update. * ipa-utils.c (ipa_reverse_postorder): Update. * ipa-inline.c (can_inline_edge_p): Update. (update_caller_keys, ipa_inline): Update. * dwarf2out.c (reference_to_unused, premark_types_used_by_global_vars_helper): Update. * tree-eh.c (tree_could_trap_p): Update. * ipa-split.c (consider_split, execute_split_functions): Update. * ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p, has_addr_references_p): Update; move ahead in file for better readability. (process_references): Simplify. (symtab_remove_unreachable_nodes): Update; cleanup way function/var bodies are removed. (cgraph_comdat_can_be_unshared_p): Make static. (cgraph_externally_visible_p): Update. (varpool_externally_visible_p): Update. (function_and_variable_visibility): Update. * trans-mem.c (get_cg_data, ipa_tm_mayenterirr_function, ipa_tm_mark_force_output_node): Update. * ipa-inline-analysis.c (dump_inline_summary, initialize_inline_failed, estimate_edge_devirt_benefit, inline_generate_summary, inline_write_summary): Update. * gimple-fold.c (can_refer_decl_in_current_unit_p): Update. * ipa-prop.c (ipa_compute_jump_functions): Update. (ipa_print_node_params, ipa_prop_read_section, ipa_update_after_lto_read, read_replacements_section): Update. * varasm.c (mark_decl_referenced): Update. (assemble_alias, dump_tm_clone_pairs): Update. * tree-inline.c (copy_bb): Update. (estimate_num_insns, optimize_inline_calls, tree_function_versioning): Update. * symtab.c (dump_symtab_base): Print new flags. (verify_symtab_base): Verify new flags. (symtab_alias_ultimate_target): New function. * tree-ssa-structalias.c (get_constraint_for_ssa_var, create_variable_info_for, associate_varinfo_to_alias, ipa_pta_execute): Update. * passes.c (ipa_write_summaries, ipa_write_optimization_summaries): Update. * i386.c (ix86_get_function_versions_dispatcher, ix86_generate_version_dispatcher_body): Update. (fold_builtin_cpu): Use varpool_add_new_variable. * varpool.c (varpool_remove_initializer): Break out from ... (varpool_remove_node): ... this one. (dump_varpool_node, varpool_node_for_asm, cgraph_variable_initializer_availability, varpool_analyze_node, varpool_assemble_decl, varpool_remove_unreferenced_decls, varpool_finalize_named_section_flags, varpool_create_variable_alias): Update * decl.c (java_mark_decl_local): Update for new symtab flags. * tree.c (cp_fix_function_decl_p): Update for new symtab flags. * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise. * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab flags. * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise. From-SVN: r199422
2013-05-29 22:42:50 +02:00
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
/* When streaming we can have multiple nodes associated with decl. */
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (symtab->state == LTO_STREAMING)
;
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
/* Keep constructor when it may be used for folding. We remove
references to external variables before final compilation. */
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
else if (DECL_INITIAL (decl) && DECL_INITIAL (decl) != error_mark_node
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
&& !ctor_useable_for_folding_p ())
remove_initializer ();
unregister ();
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
ggc_free (this);
cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... * cgraph.h (symtab_node_base): Add definition, alias and analyzed flags; reorder rest of fields in more consistent way. (varpool_node): Remove analyzed, finalized and alias. (cgraph_ndoe): Likewise. (symtab_alias_ultimate_target): New function. (cgraph_function_node): Move offline. (cgraph_reset_node): Declare. (cgraph_comdat_can_be_unshared_p): Remove. (varpool_remove_initializer): Declare. (varpool_first_defined_variable, varpool_next_defined_variable cgraph_first_defined_function, cgraph_next_defined_function): Update. (cgraph_function_with_gimple_body_p): Update. (varpool_all_refs_explicit_p): Update. (symtab_alias_target): New function. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Rename to ... (cgraph_alias_target, varpool_alias_target): .. this one; simplify. (cgraph_function_or_thunk_node): Simplify using symtab_alias_ultimate_target. (varpool_variable_node): Likewise. * cgraph.c (cgraph_create_function_alias): Update. (cgraph_add_thunk): Update. (cgraph_remove_node): Update. (dump_cgraph_node): Do not dump removed flags. (cgraph_function_body_availability): Update. (cgraph_propagate_frequency): Update. (verify_cgraph_node): Check sanity of local flag. (cgraph_function_node): Move here from cgraph.h; revamp for cgraph_function_or_thunk_node. * lto-symtab.c (lto_varpool_replace_node): Update. (lto_symtab_resolve_can_prevail_p): Update. (lto_symtab_merge_cgraph_nodes): Update. * ipa-cp.c (determine_versionability, initialize_node_lattices, propagate_constants_accross_call, devirtualization_time_bonus, ipcp_propagate_stage): Update. * tree-emutls.c (create_emultls_var, ipa_lower_emutls): Update. * ipa-inline-transform.c (clone_inlined_nodes, preserve_function_body_p): Update. * ipa-reference.c (propagate): Update. (write_node_summary_p): Update. * toplev.c (wrapup_global_declaration_2): Update. * cgraphunit.c (cgraph_analyze_function): Rename to ... (analyze_function) ... this one. (cgraph_process_new_functions): Update. (cgraph_reset_node): Export. (cgraph_finalize_function): Update. (cgraph_add_new_function): Update. (process_function_and_variable_attributes): Update. (varpool_finalize_decl): Update. (symbol_finalized): Remove. (symbol_finalized_and_needed): Rename to ... (symbol_defined_and_needed): ... update. (cgraph_analyze_functions): Update. (handle_alias_pairs): Update. (mark_functions_to_output): Update. (assemble_thunk): Update. (output_in_order): Update. (output_weakrefs): Update. (finalize_compilation_unit): Update. * lto-cgraph.c (reachable_from_other_partition_p, lto_output_node, lto_output_varpool_node, compute_ltrans_boundary, input_overwrite_node, input_node, input_varpool_node): Update. * dbxout.c (dbxout_expand_expr): Update. * cgraphclones.c (cgraph_clone_node): Update. (cgraph_copy_node_for_versioning): Update. (cgraph_materialize_clone): Update. (cgraph_materialize_all_clones): Update. * ipa-pure-const.c (analyze_function, pure_const_write_summary, propagate_pure_const, propagate_nothrow): Update. * lto-streamer-out.c (lto_output, write_symbol): Update. * ipa-utils.c (ipa_reverse_postorder): Update. * ipa-inline.c (can_inline_edge_p): Update. (update_caller_keys, ipa_inline): Update. * dwarf2out.c (reference_to_unused, premark_types_used_by_global_vars_helper): Update. * tree-eh.c (tree_could_trap_p): Update. * ipa-split.c (consider_split, execute_split_functions): Update. * ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p, has_addr_references_p): Update; move ahead in file for better readability. (process_references): Simplify. (symtab_remove_unreachable_nodes): Update; cleanup way function/var bodies are removed. (cgraph_comdat_can_be_unshared_p): Make static. (cgraph_externally_visible_p): Update. (varpool_externally_visible_p): Update. (function_and_variable_visibility): Update. * trans-mem.c (get_cg_data, ipa_tm_mayenterirr_function, ipa_tm_mark_force_output_node): Update. * ipa-inline-analysis.c (dump_inline_summary, initialize_inline_failed, estimate_edge_devirt_benefit, inline_generate_summary, inline_write_summary): Update. * gimple-fold.c (can_refer_decl_in_current_unit_p): Update. * ipa-prop.c (ipa_compute_jump_functions): Update. (ipa_print_node_params, ipa_prop_read_section, ipa_update_after_lto_read, read_replacements_section): Update. * varasm.c (mark_decl_referenced): Update. (assemble_alias, dump_tm_clone_pairs): Update. * tree-inline.c (copy_bb): Update. (estimate_num_insns, optimize_inline_calls, tree_function_versioning): Update. * symtab.c (dump_symtab_base): Print new flags. (verify_symtab_base): Verify new flags. (symtab_alias_ultimate_target): New function. * tree-ssa-structalias.c (get_constraint_for_ssa_var, create_variable_info_for, associate_varinfo_to_alias, ipa_pta_execute): Update. * passes.c (ipa_write_summaries, ipa_write_optimization_summaries): Update. * i386.c (ix86_get_function_versions_dispatcher, ix86_generate_version_dispatcher_body): Update. (fold_builtin_cpu): Use varpool_add_new_variable. * varpool.c (varpool_remove_initializer): Break out from ... (varpool_remove_node): ... this one. (dump_varpool_node, varpool_node_for_asm, cgraph_variable_initializer_availability, varpool_analyze_node, varpool_assemble_decl, varpool_remove_unreferenced_decls, varpool_finalize_named_section_flags, varpool_create_variable_alias): Update * decl.c (java_mark_decl_local): Update for new symtab flags. * tree.c (cp_fix_function_decl_p): Update for new symtab flags. * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise. * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab flags. * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise. From-SVN: r199422
2013-05-29 22:42:50 +02:00
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
/* Remove node initializer when it is no longer needed. */
cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... * cgraph.h (symtab_node_base): Add definition, alias and analyzed flags; reorder rest of fields in more consistent way. (varpool_node): Remove analyzed, finalized and alias. (cgraph_ndoe): Likewise. (symtab_alias_ultimate_target): New function. (cgraph_function_node): Move offline. (cgraph_reset_node): Declare. (cgraph_comdat_can_be_unshared_p): Remove. (varpool_remove_initializer): Declare. (varpool_first_defined_variable, varpool_next_defined_variable cgraph_first_defined_function, cgraph_next_defined_function): Update. (cgraph_function_with_gimple_body_p): Update. (varpool_all_refs_explicit_p): Update. (symtab_alias_target): New function. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Rename to ... (cgraph_alias_target, varpool_alias_target): .. this one; simplify. (cgraph_function_or_thunk_node): Simplify using symtab_alias_ultimate_target. (varpool_variable_node): Likewise. * cgraph.c (cgraph_create_function_alias): Update. (cgraph_add_thunk): Update. (cgraph_remove_node): Update. (dump_cgraph_node): Do not dump removed flags. (cgraph_function_body_availability): Update. (cgraph_propagate_frequency): Update. (verify_cgraph_node): Check sanity of local flag. (cgraph_function_node): Move here from cgraph.h; revamp for cgraph_function_or_thunk_node. * lto-symtab.c (lto_varpool_replace_node): Update. (lto_symtab_resolve_can_prevail_p): Update. (lto_symtab_merge_cgraph_nodes): Update. * ipa-cp.c (determine_versionability, initialize_node_lattices, propagate_constants_accross_call, devirtualization_time_bonus, ipcp_propagate_stage): Update. * tree-emutls.c (create_emultls_var, ipa_lower_emutls): Update. * ipa-inline-transform.c (clone_inlined_nodes, preserve_function_body_p): Update. * ipa-reference.c (propagate): Update. (write_node_summary_p): Update. * toplev.c (wrapup_global_declaration_2): Update. * cgraphunit.c (cgraph_analyze_function): Rename to ... (analyze_function) ... this one. (cgraph_process_new_functions): Update. (cgraph_reset_node): Export. (cgraph_finalize_function): Update. (cgraph_add_new_function): Update. (process_function_and_variable_attributes): Update. (varpool_finalize_decl): Update. (symbol_finalized): Remove. (symbol_finalized_and_needed): Rename to ... (symbol_defined_and_needed): ... update. (cgraph_analyze_functions): Update. (handle_alias_pairs): Update. (mark_functions_to_output): Update. (assemble_thunk): Update. (output_in_order): Update. (output_weakrefs): Update. (finalize_compilation_unit): Update. * lto-cgraph.c (reachable_from_other_partition_p, lto_output_node, lto_output_varpool_node, compute_ltrans_boundary, input_overwrite_node, input_node, input_varpool_node): Update. * dbxout.c (dbxout_expand_expr): Update. * cgraphclones.c (cgraph_clone_node): Update. (cgraph_copy_node_for_versioning): Update. (cgraph_materialize_clone): Update. (cgraph_materialize_all_clones): Update. * ipa-pure-const.c (analyze_function, pure_const_write_summary, propagate_pure_const, propagate_nothrow): Update. * lto-streamer-out.c (lto_output, write_symbol): Update. * ipa-utils.c (ipa_reverse_postorder): Update. * ipa-inline.c (can_inline_edge_p): Update. (update_caller_keys, ipa_inline): Update. * dwarf2out.c (reference_to_unused, premark_types_used_by_global_vars_helper): Update. * tree-eh.c (tree_could_trap_p): Update. * ipa-split.c (consider_split, execute_split_functions): Update. * ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p, has_addr_references_p): Update; move ahead in file for better readability. (process_references): Simplify. (symtab_remove_unreachable_nodes): Update; cleanup way function/var bodies are removed. (cgraph_comdat_can_be_unshared_p): Make static. (cgraph_externally_visible_p): Update. (varpool_externally_visible_p): Update. (function_and_variable_visibility): Update. * trans-mem.c (get_cg_data, ipa_tm_mayenterirr_function, ipa_tm_mark_force_output_node): Update. * ipa-inline-analysis.c (dump_inline_summary, initialize_inline_failed, estimate_edge_devirt_benefit, inline_generate_summary, inline_write_summary): Update. * gimple-fold.c (can_refer_decl_in_current_unit_p): Update. * ipa-prop.c (ipa_compute_jump_functions): Update. (ipa_print_node_params, ipa_prop_read_section, ipa_update_after_lto_read, read_replacements_section): Update. * varasm.c (mark_decl_referenced): Update. (assemble_alias, dump_tm_clone_pairs): Update. * tree-inline.c (copy_bb): Update. (estimate_num_insns, optimize_inline_calls, tree_function_versioning): Update. * symtab.c (dump_symtab_base): Print new flags. (verify_symtab_base): Verify new flags. (symtab_alias_ultimate_target): New function. * tree-ssa-structalias.c (get_constraint_for_ssa_var, create_variable_info_for, associate_varinfo_to_alias, ipa_pta_execute): Update. * passes.c (ipa_write_summaries, ipa_write_optimization_summaries): Update. * i386.c (ix86_get_function_versions_dispatcher, ix86_generate_version_dispatcher_body): Update. (fold_builtin_cpu): Use varpool_add_new_variable. * varpool.c (varpool_remove_initializer): Break out from ... (varpool_remove_node): ... this one. (dump_varpool_node, varpool_node_for_asm, cgraph_variable_initializer_availability, varpool_analyze_node, varpool_assemble_decl, varpool_remove_unreferenced_decls, varpool_finalize_named_section_flags, varpool_create_variable_alias): Update * decl.c (java_mark_decl_local): Update for new symtab flags. * tree.c (cp_fix_function_decl_p): Update for new symtab flags. * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise. * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab flags. * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise. From-SVN: r199422
2013-05-29 22:42:50 +02:00
void
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::remove_initializer (void)
cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... * cgraph.h (symtab_node_base): Add definition, alias and analyzed flags; reorder rest of fields in more consistent way. (varpool_node): Remove analyzed, finalized and alias. (cgraph_ndoe): Likewise. (symtab_alias_ultimate_target): New function. (cgraph_function_node): Move offline. (cgraph_reset_node): Declare. (cgraph_comdat_can_be_unshared_p): Remove. (varpool_remove_initializer): Declare. (varpool_first_defined_variable, varpool_next_defined_variable cgraph_first_defined_function, cgraph_next_defined_function): Update. (cgraph_function_with_gimple_body_p): Update. (varpool_all_refs_explicit_p): Update. (symtab_alias_target): New function. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Rename to ... (cgraph_alias_target, varpool_alias_target): .. this one; simplify. (cgraph_function_or_thunk_node): Simplify using symtab_alias_ultimate_target. (varpool_variable_node): Likewise. * cgraph.c (cgraph_create_function_alias): Update. (cgraph_add_thunk): Update. (cgraph_remove_node): Update. (dump_cgraph_node): Do not dump removed flags. (cgraph_function_body_availability): Update. (cgraph_propagate_frequency): Update. (verify_cgraph_node): Check sanity of local flag. (cgraph_function_node): Move here from cgraph.h; revamp for cgraph_function_or_thunk_node. * lto-symtab.c (lto_varpool_replace_node): Update. (lto_symtab_resolve_can_prevail_p): Update. (lto_symtab_merge_cgraph_nodes): Update. * ipa-cp.c (determine_versionability, initialize_node_lattices, propagate_constants_accross_call, devirtualization_time_bonus, ipcp_propagate_stage): Update. * tree-emutls.c (create_emultls_var, ipa_lower_emutls): Update. * ipa-inline-transform.c (clone_inlined_nodes, preserve_function_body_p): Update. * ipa-reference.c (propagate): Update. (write_node_summary_p): Update. * toplev.c (wrapup_global_declaration_2): Update. * cgraphunit.c (cgraph_analyze_function): Rename to ... (analyze_function) ... this one. (cgraph_process_new_functions): Update. (cgraph_reset_node): Export. (cgraph_finalize_function): Update. (cgraph_add_new_function): Update. (process_function_and_variable_attributes): Update. (varpool_finalize_decl): Update. (symbol_finalized): Remove. (symbol_finalized_and_needed): Rename to ... (symbol_defined_and_needed): ... update. (cgraph_analyze_functions): Update. (handle_alias_pairs): Update. (mark_functions_to_output): Update. (assemble_thunk): Update. (output_in_order): Update. (output_weakrefs): Update. (finalize_compilation_unit): Update. * lto-cgraph.c (reachable_from_other_partition_p, lto_output_node, lto_output_varpool_node, compute_ltrans_boundary, input_overwrite_node, input_node, input_varpool_node): Update. * dbxout.c (dbxout_expand_expr): Update. * cgraphclones.c (cgraph_clone_node): Update. (cgraph_copy_node_for_versioning): Update. (cgraph_materialize_clone): Update. (cgraph_materialize_all_clones): Update. * ipa-pure-const.c (analyze_function, pure_const_write_summary, propagate_pure_const, propagate_nothrow): Update. * lto-streamer-out.c (lto_output, write_symbol): Update. * ipa-utils.c (ipa_reverse_postorder): Update. * ipa-inline.c (can_inline_edge_p): Update. (update_caller_keys, ipa_inline): Update. * dwarf2out.c (reference_to_unused, premark_types_used_by_global_vars_helper): Update. * tree-eh.c (tree_could_trap_p): Update. * ipa-split.c (consider_split, execute_split_functions): Update. * ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p, has_addr_references_p): Update; move ahead in file for better readability. (process_references): Simplify. (symtab_remove_unreachable_nodes): Update; cleanup way function/var bodies are removed. (cgraph_comdat_can_be_unshared_p): Make static. (cgraph_externally_visible_p): Update. (varpool_externally_visible_p): Update. (function_and_variable_visibility): Update. * trans-mem.c (get_cg_data, ipa_tm_mayenterirr_function, ipa_tm_mark_force_output_node): Update. * ipa-inline-analysis.c (dump_inline_summary, initialize_inline_failed, estimate_edge_devirt_benefit, inline_generate_summary, inline_write_summary): Update. * gimple-fold.c (can_refer_decl_in_current_unit_p): Update. * ipa-prop.c (ipa_compute_jump_functions): Update. (ipa_print_node_params, ipa_prop_read_section, ipa_update_after_lto_read, read_replacements_section): Update. * varasm.c (mark_decl_referenced): Update. (assemble_alias, dump_tm_clone_pairs): Update. * tree-inline.c (copy_bb): Update. (estimate_num_insns, optimize_inline_calls, tree_function_versioning): Update. * symtab.c (dump_symtab_base): Print new flags. (verify_symtab_base): Verify new flags. (symtab_alias_ultimate_target): New function. * tree-ssa-structalias.c (get_constraint_for_ssa_var, create_variable_info_for, associate_varinfo_to_alias, ipa_pta_execute): Update. * passes.c (ipa_write_summaries, ipa_write_optimization_summaries): Update. * i386.c (ix86_get_function_versions_dispatcher, ix86_generate_version_dispatcher_body): Update. (fold_builtin_cpu): Use varpool_add_new_variable. * varpool.c (varpool_remove_initializer): Break out from ... (varpool_remove_node): ... this one. (dump_varpool_node, varpool_node_for_asm, cgraph_variable_initializer_availability, varpool_analyze_node, varpool_assemble_decl, varpool_remove_unreferenced_decls, varpool_finalize_named_section_flags, varpool_create_variable_alias): Update * decl.c (java_mark_decl_local): Update for new symtab flags. * tree.c (cp_fix_function_decl_p): Update for new symtab flags. * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise. * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab flags. * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise. From-SVN: r199422
2013-05-29 22:42:50 +02:00
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (DECL_INITIAL (decl)
&& !DECL_IN_CONSTANT_POOL (decl)
/* Keep vtables for BINFO folding. */
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
&& !DECL_VIRTUAL_P (decl)
/* FIXME: http://gcc.gnu.org/PR55395 */
lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. 2013-06-17 Richard Biener <rguenther@suse.de> * lto-streamer.h (enum LTO_tags): Add LTO_tree_scc. (lto_input_scc): Declare. (lto_input_tree_1): Likewise. (struct lto_stats_d): Add num_tree_bodies_output and num_pickle_refs_output. * lto-streamer-in.c (lto_read_body): Use streamer_tree_cache_get_tree. (lto_read_tree_1): Split out from ... (lto_read_tree): ... this. (lto_input_scc): New function. (lto_input_tree_1): Split out from ... (lto_input_tree): ... this. Handle LTO_tree_scc. (lto_data_in_create): Create the streamer cache without hashes. * lto-streamer-out.c (create_output_block): Create the streamer cache with hashes when not doing WPA. (lto_write_tree_1): Split out from ... (lto_write_tree): ... this. (get_symbol_initial_value): New function. (lto_output_tree_1): Split out from ... (lto_output_tree): ... this. Write trees as series of SCCs using a DFS walk via DFS_write_tree. (struct sccs, struct scc_entry): New types. (next_dfs_num, sccstack, sccstate, sccstate_obstack): New globals. (DFS_write_tree_body): New function. (DFS_write_tree): Likewise. (hash_tree): Likewise. (scc_entry_compare): Likewise. (hash_scc): Likewise. (tree_is_indexable): DEBUG_EXPR_DECLs are local entities. * tree-streamer-in.c (lto_input_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. (streamer_read_integer_cst): Remove. (streamer_get_pickled_tree): Adjust. * tree-streamer-out.c (streamer_write_chain): Disable streaming of DECL_EXTERNALs in BLOCK_VARS for now. (write_ts_list_tree_pointers): Stream TREE_CHAIN as regular reference. * tree-streamer.c (streamer_tree_cache_add_to_node_array): Add hash value argument and record that if hashes are recorded in the cache. (streamer_tree_cache_insert_1): Adjust. (streamer_tree_cache_insert): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_append): Adjust. (record_common_node): Likewise. (streamer_tree_cache_create): Add argument whether to record hash values together with trees. (streamer_tree_cache_delete): Adjust. * tree-streamer.h (struct streamer_tree_cache_d): Add vector of hashes. (streamer_read_integer_cst): Remove. (streamer_tree_cache_insert): Adjust. (streamer_tree_cache_append): Likewise. (streamer_tree_cache_insert_at): Rename to ... (streamer_tree_cache_replace_tree): ... this and adjust. (streamer_tree_cache_create): Add argument whether to record hashes. (streamer_tree_cache_get): Rename to ... (streamer_tree_cache_get_tree): ... this. (streamer_tree_cache_get_hash): New function. * tree.c (cache_integer_cst): New function. * tree.h (cache_integer_cst): Declare. (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move here from cp/cp-tree.h. * lto-symtab.c (lto_varpool_replace_node): Only release DECL_INITIAL of non-prevailing decls. * varpool.c (varpool_remove_initializer): Do not release DECL_INITIAL when we are still in CGRAPH_LTO_STREAMING. cp/ * cp-tree.h (ANON_AGGRNAME_FORMAT, ANON_AGGRNAME_P): Move to tree.h. lto/ * Make-lang.in (lto.o): Add $(DATA_STREAMER_H) dependency. * lto.c: Include data-streamer.h. (lto_read_in_decl_state): Use streamer_tree_cache_get_tree. (gimple_type_leader_entry_s, gimple_type_leader, gimple_lookup_type_leader): Remove. (gtc_visit): Simplify. (gimple_types_compatible_p): Likewise. (gimple_register_type_1): Likewise. Merge into ... (gimple_register_type): ... this. Keep it as legacy for statistics purposes for now. (fixup_integer_cst): Remove. (LTO_FIXUP_TREE, lto_fixup_types, lto_ft_*): Simplify and rename to ... (MAYBE_REMEMBER_WITH_VARS, maybe_remember_with_vars, maybe_remember_with_vars_*): ... these. (uniquify_nodes): Remove. (lto_fixup_prevailing_type): New function. (struct tree_scc, struct tree_scc_hasher): New type and hasher. (tree_scc_hash, tree_scc_hash_obstack): New globals. (num_merged_types, num_prevailing_types, num_not_merged_types, num_not_merged_types_in_same_scc, total_scc_size, num_sccs_read, total_scc_size_merged, num_sccs_merged, num_scc_compares, num_scc_compare_collisions): New global counters. (compare_tree_sccs_1): New function. (compare_tree_sccs): Likewise. (unify_scc): Likewise. (lto_read_decls): Stream in tree SCCs and unify them on the way in. Finalize prevailing SCC tree members. (read_cgraph_and_symbols): Do not initialize or free gimple_type_leader. Allocate and free tree_scc_hash_obstack and tree_scc_hash, do not bother to ggc-collect during merging. (print_lto_report_1): Adjust for new merging code. From-SVN: r200151
2013-06-17 17:08:24 +02:00
&& debug_info_level == DINFO_LEVEL_NONE
/* When doing declaration merging we have duplicate
entries for given decl. Do not attempt to remove
the boides, or we will end up remiving
wrong one. */
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
&& symtab->state != LTO_STREAMING)
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
DECL_INITIAL (decl) = error_mark_node;
* lto-symtab.c (lto_symtab_entry_def) Add vnode. (lto_varpool_replace_node): New. (lto_symtab_resolve_symbols): Resolve varpool nodes. (lto_symtab_merge_decls_1): Prefer decls with varpool node. (lto_symtab_merge_cgraph_nodes_1): Merge varpools. * cgraph.h (varpool_node_ptr): New type. (varpool_node_ptr): New vector. (varpool_node_set_def): New structure. (varpool_node_set): New type. (varpool_node_set): New vector. (varpool_node_set_element_def): New structure. (varpool_node_set_element, const_varpool_node_set_element): New types. (varpool_node_set_iterator): New type. (varpool_node): Add prev pointers, add used_from_other_partition, in_other_partition. (varpool_node_set_new, varpool_node_set_find, varpool_node_set_add, varpool_node_set_remove, dump_varpool_node_set, debug_varpool_node_set, varpool_get_node, varpool_remove_node): Declare. (vsi_end_p, vsi_next, vsi_node, vsi_start, varpool_node_in_set_p, varpool_node_set_size): New inlines. * cgraph.c (dump_cgraph_node): Dump asm names of aliases. * tree-pass.h (varpool_node_set_def): Forward declare. (ipa_opt_pass_d): Summary writting takes vnode sets too. (ipa_write_optimization_summaries): Update prototype. * ipa-cp.c (ipcp_write_summary): Update. * ipa-reference.c (ipa_reference_write_summary): Update. * lto-cgraph.c (lto_output_varpool_node): New static function. (output_varpool): New function. (input_varpool_node): New static function. (input_varpool_1): New function. (input_cgraph): Input varpool. * ipa-pure-const.c (pure_const_write_summary): Update. * lto-streamer-out.c (lto_output): Update, output varpool too. (write_global_stream): Kill WPA hack. (produce_asm_for_decls): Update. (output_alias_pair_p): Handle variables. (output_unreferenced_globals): Output only needed partition of varpool. * ipa-inline.c (inline_write_summary): Update. * lto-streamer-in.c (lto_input_tree_ref, lto_input_tree): Do not build cgraph. * lto-section-in.c (lto_section_name): Add varpool and jump funcs. * ipa.c (hash_varpool_node_set_element, eq_varpool_node_set_element, varpool_node_set_new, varpool_node_set_add, varpool_node_set_remove, varpool_node_set_find, dump_varpool_node_set, debug_varpool_node_set): New functions. * passes.c (rest_of_decl_compilation): when in LTO do not finalize. (execute_one_pass): Process new decls too. (ipa_write_summaries_2): Pass around vsets. (ipa_write_summaries_1): Likewise. (ipa_write_summaries): Build vset; be more selective about cgraph nodes to add. (ipa_write_optimization_summaries_1): Pass around vsets. (ipa_write_optimization_summaries): Likewise. * varpool.c (varpool_get_node): New. (varpool_node): Update doubly linked lists. (varpool_remove_node): New. (dump_varpool_node): More dumping. (varpool_enqueue_needed_node): Update doubly linked lists. (decide_is_variable_needed): Kill ltrans hack. (varpool_finalize_decl): Kill lto hack. (varpool_assemble_decl): Skip decls in other partitions. (varpool_assemble_pending_decls): Update doubly linkes lists. (varpool_empty_needed_queue): Likewise. (varpool_extra_name_alias): Likewise. * lto-streamer.c (lto_get_section_name): Add vars section. * lto-streamer.h (lto_section_type): Update. (output_varpool, input_varpool): Declare. * lto.c (lto_varpool_node_sets): New. (lto_1_to_1_map): Partition varpool too. (globalize_context_t, globalize_cross_file_statics, lto_scan_statics_in_ref_table, lto_scan_statics_in_cgraph_node, lto_scan_statics_in_remaining_global_vars): Remove. (lto_promote_cross_file_statics): Rewrite. (get_filename_for_set): Take vset argument. (lto_wpa_write_files): Pass around vsets. From-SVN: r158854
2010-04-29 09:10:38 +02:00
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
/* Dump given varpool node to F. */
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
void
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
varpool_node::dump (FILE *f)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
dump_base (f);
2012-04-18 08:54:33 +02:00
fprintf (f, " Availability: %s\n",
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
symtab->function_flags_ready
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
? cgraph_availability_names[get_availability ()]
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
: "not-ready");
2012-04-18 08:54:33 +02:00
fprintf (f, " Varpool flags:");
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
if (DECL_INITIAL (decl))
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
fprintf (f, " initialized");
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
if (output)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
fprintf (f, " output");
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
if (used_by_single_function)
fprintf (f, " used-by-single-function");
ipa-chkp.c: New. gcc/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * ipa-chkp.c: New. * ipa-chkp.h: New. * tree-chkp.c: New. * tree-chkp.h: New. * tree-chkp-opt.c: New. * rtl-chkp.c: New. * rtl-chkp.h: New. * Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o tree-chkp-opt.o. (GTFILES): Add tree-chkp.c. * mode-classes.def (MODE_POINTER_BOUNDS): New. * tree.def (POINTER_BOUNDS_TYPE): New. * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): New. (make_pointer_bounds_mode): New. * machmode.h (POINTER_BOUNDS_MODE_P): New. * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS. (layout_type): Support POINTER_BOUNDS_TYPE. * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE. * tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE. * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE. (type_contains_placeholder_1): Likewise. (build_common_tree_nodes): Initialize pointer_bounds_type_node. * tree.h (POINTER_BOUNDS_TYPE_P): New. (pointer_bounds_type_node): New. (POINTER_BOUNDS_P): New. (BOUNDED_TYPE_P): New. (BOUNDED_P): New. (CALL_WITH_BOUNDS_P): New. * gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS. (gimple_call_with_bounds_p): New. (gimple_call_set_with_bounds): New. (gimple_return_retbnd): New. (gimple_return_set_retbnd): New * gimple.c (gimple_build_return): Increase number of ops for return statement. (gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P flag. * gimple-pretty-print.c (dump_gimple_return): Print second op. * rtl.h (CALL_EXPR_WITH_BOUNDS_P): New. * gimplify.c (gimplify_init_constructor): Avoid infinite loop during gimplification of bounds initializer. * calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h. (special_function_p): Use original decl name when analyzing instrumentation clone. (arg_data): Add fields special_slot, pointer_arg and pointer_offset. (store_bounds): New. (emit_call_1): Propagate instrumentation flag for CALL. (initialize_argument_information): Compute pointer_arg, pointer_offset and special_slot for pointer bounds arguments. (finalize_must_preallocate): Preallocate when storing bounds in bounds table. (compute_argument_addresses): Skip pointer bounds. (expand_call): Store bounds into tables separately. Return result joined with resulting bounds. * cfgexpand.c: Include tree-chkp.h, rtl-chkp.h. (expand_call_stmt): Propagate bounds flag for CALL_EXPR. (expand_return): Add returned bounds arg. Handle returned bounds. (expand_gimple_stmt_1): Adjust to new expand_return signature. (gimple_expand_cfg): Reset rtx bounds map. * expr.c: Include tree-chkp.h, rtl-chkp.h. (expand_assignment): Handle returned bounds. (store_expr_with_bounds): New. Replaces store_expr with new bounds target argument. Handle bounds returned by calls. (store_expr): Now wraps store_expr_with_bounds. * expr.h (store_expr_with_bounds): New. * function.c: Include tree-chkp.h, rtl-chkp.h. (bounds_parm_data): New. (use_register_for_decl): Do not registerize decls used for bounds stores and loads. (assign_parms_augmented_arg_list): Add bounds of the result structure pointer as the second argument. (assign_parm_find_entry_rtl): Mark bounds are never passed on the stack. (assign_parm_is_stack_parm): Likewise. (assign_parm_load_bounds): New. (assign_bounds): New. (assign_parms): Load bounds and determine a location for returned bounds. (diddle_return_value_1): New. (diddle_return_value): Handle returned bounds. * function.h (rtl_data): Add field for returned bounds. * varasm.c: Include tree-chkp.h. (output_constant): Support POINTER_BOUNDS_TYPE. (output_constant_pool_2): Support MODE_POINTER_BOUNDS. (ultimate_transparent_alias_target): Move up. (make_decl_rtl): For instrumented function use name of the original decl. (assemble_start_function): Mark function as global in case it is instrumentation clone of the global function. (do_assemble_alias): Follow transparent alias chain for identifier. Check if original alias is public. (maybe_assemble_visibility): Use visibility of the original function for instrumented version. (default_unique_section): Likewise. * emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS. (init_emit_once): Build pointer bounds zero constants. * explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS. * target.def (builtin_chkp_function): New. (chkp_bound_type): New. (chkp_bound_mode): New. (chkp_make_bounds_constant): New. (chkp_initialize_bounds): New. (load_bounds_for_arg): New. (store_bounds_for_arg): New. (load_returned_bounds): New. (store_returned_bounds): New. (chkp_function_value_bounds): New. (setup_incoming_vararg_bounds): New. (function_arg): Update hook description with new possible return value CONST_INT. * targhooks.h (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode): New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * targhooks.c (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode); New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * builtin-types.def (BT_BND): New. (BT_FN_PTR_CONST_PTR): New. (BT_FN_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR): New. (BT_FN_CONST_PTR_BND): New. (BT_FN_PTR_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_VOID_PTRPTR_CONST_PTR): New. (BT_FN_VOID_CONST_PTR_SIZE): New. (BT_FN_VOID_PTR_BND): New. (BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New. (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New. * chkp-builtins.def: New. * builtins.def: include chkp-builtins.def. (DEF_CHKP_BUILTIN): New. * builtins.c: Include tree-chkp.h and rtl-chkp.h. (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS, BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS, BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS, BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS, BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS, BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND, BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL, BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET, BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW, BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER. (std_expand_builtin_va_start): Init bounds for va_list. * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add __CHKP__ macro when Pointer Bounds Checker is on. * params.def (PARAM_CHKP_MAX_CTOR_SIZE): New. * passes.def (pass_ipa_chkp_versioning): New. (pass_early_local_passes): Renamed to pass_build_ssa_passes. (pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes. (pass_chkp_instrumentation_passes): New. (pass_ipa_chkp_produce_thunks): New. (pass_local_optimization_passes): New. (pass_chkp_opt): New. * tree-pass.h (make_pass_ipa_chkp_versioning): New. (make_pass_ipa_chkp_produce_thunks): New. (make_pass_chkp): New. (make_pass_chkp_opt): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * passes.c (pass_manager::execute_early_local_passes): Execute early passes in three steps. (execute_all_early_local_passes): Renamed to ... (execute_build_ssa_passes): This. (pass_data_early_local_passes): Renamed to ... (pass_data_build_ssa_passes): This. (pass_early_local_passes): Renamed to ... (pass_build_ssa_passes): This. (pass_data_chkp_instrumentation_passes): New. (pass_chkp_instrumentation_passes): New. (pass_data_local_optimization_passes): New. (pass_local_optimization_passes): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * c-family/c.opt (fcheck-pointer-bounds): New. (fchkp-check-incomplete-type): New. (fchkp-zero-input-bounds-for-main): New. (fchkp-first-field-has-own-bounds): New. (fchkp-narrow-bounds): New. (fchkp-narrow-to-innermost-array): New. (fchkp-optimize): New. (fchkp-use-fast-string-functions): New. (fchkp-use-nochk-string-functions): New. (fchkp-use-static-bounds): New. (fchkp-use-static-const-bounds): New. (fchkp-treat-zero-dynamic-size-as-infinite): New. (fchkp-check-read): New. (fchkp-check-write): New. (fchkp-store-bounds): New. (fchkp-instrument-calls): New. (fchkp-instrument-marked-only): New. (Wchkp): New. * c-family/c-common.c (handle_bnd_variable_size_attribute): New. (handle_bnd_legacy): New. (handle_bnd_instrument): New. (c_common_attribute_table): Add bnd_variable_size, bnd_legacy and bnd_instrument. Fix documentation. (c_common_format_attribute_table): Likewsie. * toplev.c: include tree-chkp.h. (process_options): Check Pointer Bounds Checker is supported. (compile_file): Add chkp_finish_file call. * ipa-cp.c (initialize_node_lattices): Use cgraph_local_p to handle instrumentation clones properly. (propagate_constants_accross_call): Do not propagate through instrumentation thunks. * ipa-pure-const.c (propagate_pure_const): Support IPA_REF_CHKP. * ipa-inline.c (early_inliner): Check edge has summary allocated. * ipa-split.c: Include tree-chkp.h. (find_retbnd): New. (split_part_set_ssa_name_p): New. (consider_split): Do not split retbnd and retval producers. (insert_bndret_call_after): new. (split_function): Propagate Pointer Bounds Checker instrumentation marks and handle returned bounds. * tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode into bit field and add with_bounds field. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Set with_bounds field for instrumented calls. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore CALL_WITH_BOUNDS_P flag for calls. * tree-ssa-ccp.c: Include tree-chkp.h. (insert_clobber_before_stack_restore): Handle BUILT_IN_CHKP_BNDRET calls. * tree-ssa-dce.c: Include tree-chkp.h. (propagate_necessity): For free call fed by alloc check bounds are also provided by the same alloc. (eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET used by free calls. * tree-inline.c: Include tree-chkp.h. (declare_return_variable): Add arg holding returned bounds slot. Create and initialize returned bounds var. (remap_gimple_stmt): Handle returned bounds. Return sequence of statements instead of a single statement. (insert_init_stmt): Add declaration. (remap_gimple_seq): Adjust to new remap_gimple_stmt signature. (copy_bb): Adjust to changed return type of remap_gimple_stmt. Properly handle bounds in va_arg_pack and va_arg_pack_len. (expand_call_inline): Handle returned bounds. Add bounds copy for generated mem to mem assignments. * tree-inline.h (copy_body_data): Add fields retbnd and assign_stmts. * value-prof.c: Include tree-chkp.h. (gimple_ic): Support returned bounds. * ipa.c (cgraph_build_static_cdtor_1): Support contructors with "chkp ctor" and "bnd_legacy" attributes. (symtab_remove_unreachable_nodes): Keep initial values for pointer bounds to be used for checks eliminations. (process_references): Handle IPA_REF_CHKP. (walk_polymorphic_call_targets): Likewise. * ipa-visibility.c (cgraph_externally_visible_p): Mark instrumented 'main' as externally visible. (function_and_variable_visibility): Filter instrumentation thunks. * cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args field. (cgraph_node): Add instrumented_version, orig_decl and instrumentation_clone fields. (symtab_node::get_alias_target): Allow IPA_REF_CHKP reference. (varpool_node): Add need_bounds_init field. (cgraph_local_p): New. * cgraph.c: Include tree-chkp.h. (cgraph_node::remove): Fix instrumented_version of the referenced node if any. (cgraph_node::dump): Dump instrumentation_clone and instrumented_version fields. (cgraph_node::verify_node): Check correctness of IPA_REF_CHKP references and instrumentation thunks. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep all not instrumented instrumentation clones alive. (cgraph_redirect_edge_call_stmt_to_callee): Support returned bounds. * cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP reference. (cgraph_rebuild_references): Likewise. * cgraphunit.c: Include tree-chkp.h. (assemble_thunks_and_aliases): Skip thunks calling instrumneted function version. (varpool_finalize_decl): Register statically initialized decls in Pointer Bounds Checker. (walk_polymorphic_call_targets): Do not mark generated call to __builtin_unreachable as with_bounds. (output_weakrefs): If there are both instrumented and original versions, output only one of them. (cgraph_node::expand_thunk): Set with_bounds flag for created call statement. * ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP. (ipa_ref): increase size of use field. * symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP. * varpool.c (dump_varpool_node): Dump need_bounds_init field. (ctor_for_folding): Do not fold constant bounds vars. * lto-streamer.h (LTO_minor_version): Change minor version from 0 to 1. * lto-cgraph.c (compute_ltrans_boundary): Keep initial values for pointer bounds. (lto_output_node): Output instrumentation_clone, thunk.add_pointer_bounds_args and orig_decl field. (lto_output_ref): Adjust to new ipa_ref::use field size. (input_overwrite_node): Read instrumentation_clone field. (input_node): Read thunk.add_pointer_bounds_args and orig_decl fields. (input_ref): Adjust to new ipa_ref::use field size. (input_cgraph_1): Compute instrumented_version fields and restore IDENTIFIER_TRANSPARENT_ALIAS chains. (lto_output_varpool_node): Output need_bounds_init value. (input_varpool_node): Read need_bounds_init value. * lto-partition.c (add_symbol_to_partition_1): Keep original and instrumented versions together. (privatize_symbol_name): Restore transparent alias chain if required. (add_references_to_partition): Add references to pointer bounds vars. * dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE. * dwarf2out.c (gen_subprogram_die): Ignore bound args. (gen_type_die_with_usage): Skip pointer bounds. (dwarf2out_global_decl): Likewise. (is_base_type): Support POINTER_BOUNDS_TYPE. (gen_formal_types_die): Skip pointer bounds. (gen_decl_die): Likewise. * var-tracking.c (vt_add_function_parameters): Skip bounds parameters. * ipa-icf.c (sem_function::merge): Do not merge when instrumentation thunk still exists. (sem_variable::merge): Reset need_bounds_init flag. * doc/extend.texi: Document Pointer Bounds Checker built-in functions and attributes. * doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_BOUND_TYPE): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. * doc/tm.texi: Regenerated. * doc/rtl.texi (MODE_POINTER_BOUNDS): New. (BND32mode): New. (BND64mode): New. * doc/invoke.texi (-mmpx): New. (-mno-mpx): New. (chkp-max-ctor-size): New. * config/i386/constraints.md (w): New. (Ti): New. (Tb): New. * config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__. * config/i386/i386-modes.def (BND32): New. (BND64): New. * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New. * config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h. (regclass_map): Add bound registers. (dbx_register_map): Likewise. (dbx64_register_map): Likewise. (svr4_dbx_register_map): Likewise. (isa_opts): Add -mmpx. (PTA_MPX): New. (ix86_option_override_internal): Support MPX ISA. (ix86_conditional_register_usage): Support bound registers. (ix86_code_end): Add MPX bnd prefix. (output_set_got): Likewise. (print_reg): Avoid prefixes for bound registers. (ix86_print_operand): Add '!' (MPX bnd) print prefix support. (ix86_print_operand_punct_valid_p): Likewise. (ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and UNSPEC_BNDLDX_ADDR. (ix86_output_call_insn): Add MPX bnd prefix to branch instructions. (ix86_class_likely_spilled_p): Add bound regs support. (ix86_hard_regno_mode_ok): Likewise. (x86_order_regs_for_local_alloc): Likewise. (ix86_bnd_prefixed_insn_p): New. (ix86_builtins): Add IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (builtin_isa): Add leaf_p and nothrow_p fields. (def_builtin): Initialize leaf_p and nothrow_p. (ix86_add_new_builtins): Handle leaf_p and nothrow_p flags. (bdesc_mpx): New. (bdesc_mpx_const): New. (ix86_init_mpx_builtins): New. (ix86_init_builtins): Call ix86_init_mpx_builtins. (ix86_emit_cmove): New. (ix86_emit_move_max): New. (ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (ix86_function_value_bounds): New. (ix86_builtin_mpx_function): New. (ix86_get_arg_address_for_bt): New. (ix86_load_bounds): New. (ix86_store_bounds): New. (ix86_load_returned_bounds): New. (ix86_store_returned_bounds): New. (ix86_mpx_bound_mode): New. (ix86_make_bounds_constant): New. (ix86_initialize_bounds): (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. (ix86_option_override_internal): Do not support x32 with MPX. (init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt and force_bnd_pass. (function_arg_advance_32): Return number of used integer registers. (function_arg_advance_64): Likewise. (function_arg_advance_ms_64): Likewise. (ix86_function_arg_advance): Handle pointer bounds. (ix86_function_arg): Likewise. (ix86_function_value_regno_p): Mark fisrt bounds registers as possible function value. (ix86_function_value_1): Handle pointer bounds type/mode (ix86_return_in_memory): Likewise. (ix86_print_operand): Analyse insn to decide abounf "bnd" prefix. (ix86_expand_call): Generate returned bounds. (ix86_setup_incoming_vararg_bounds): New. (ix86_va_start): Initialize bounds for pointers in va_list. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. * config/i386/i386.h (TARGET_MPX): New. (TARGET_MPX_P): New. (FIRST_PSEUDO_REGISTER): Fix to new value. (FIXED_REGISTERS): Add bound registers. (CALL_USED_REGISTERS): Likewise. (REG_ALLOC_ORDER): Likewise. (HARD_REGNO_NREGS): Likewise. (VALID_BND_REG_MODE): New. (FIRST_BND_REG): New. (LAST_BND_REG): New. (reg_class): Add BND_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (BND_REGNO_P): New. (ANY_BND_REG_P): New. (BNDmode): New. (HI_REGISTER_NAMES): Add bound registers. (ix86_args): Add bnd_regno, bnds_in_bt, force_bnd_pass and stdarg fields. * config/i386/i386.md (UNSPEC_BNDMK): New. (UNSPEC_BNDMK_ADDR): New. (UNSPEC_BNDSTX): New. (UNSPEC_BNDLDX): New. (UNSPEC_BNDLDX_ADDR): New. (UNSPEC_BNDCL): New. (UNSPEC_BNDCU): New. (UNSPEC_BNDCN): New. (UNSPEC_MPX_FENCE): New. (UNSPEC_SIZEOF): New. (BND0_REG): New. (BND1_REG): New. (type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (prefix_rep): Check for bnd prefix. (prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_nobnd): New. (length): Use length_nobnd when specified. (memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (BND): New. (bnd_ptr): New. (BNDCHECK): New. (bndcheck): New. (*jcc_1): Add MPX bnd prefix. (*jcc_2): Likewise. (jump): Likewise. (*indirect_jump): Likewise. (*tablejump_1): Likewise. (simple_return_internal): Likewise. (simple_return_internal_long): Likewise. (simple_return_pop_internal): Likewise. (simple_return_indirect_internal): Likewise. (<mode>_mk): New. (*<mode>_mk): New. (mov<mode>): New. (*mov<mode>_internal_mpx): New. (<mode>_<bndcheck>): New. (*<mode>_<bndcheck>): New. (<mode>_ldx): New. (*<mode>_ldx): New. (<mode>_stx): New. (*<mode>_stx): New. move_size_reloc_<mode>): New. * config/i386/predicates.md (address_mpx_no_base_operand): New. (address_mpx_no_index_operand): New. (bnd_mem_operator): New. (symbol_operand): New. (x86_64_immediate_size_operand): New. * config/i386/i386.opt (mmpx): New. * config/i386/i386-builtin-types.def (BND): New. (ULONG): New. (BND_FTYPE_PCVOID_ULONG): New. (VOID_FTYPE_BND_PCVOID): New. (VOID_FTYPE_PCVOID_PCVOID_BND): New. (BND_FTYPE_PCVOID_PCVOID): New. (BND_FTYPE_PCVOID): New. (BND_FTYPE_BND_BND): New. (PVOID_FTYPE_PVOID_PVOID_ULONG): New. (PVOID_FTYPE_PCVOID_BND_ULONG): New. (ULONG_FTYPE_VOID): New. (PVOID_FTYPE_BND): New. gcc/testsuite/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * gcc.target/i386/chkp-builtins-1.c: New. * gcc.target/i386/chkp-builtins-2.c: New. * gcc.target/i386/chkp-builtins-3.c: New. * gcc.target/i386/chkp-builtins-4.c: New. * gcc.target/i386/chkp-remove-bndint-1.c: New. * gcc.target/i386/chkp-remove-bndint-2.c: New. * gcc.target/i386/chkp-const-check-1.c: New. * gcc.target/i386/chkp-const-check-2.c: New. * gcc.target/i386/chkp-lifetime-1.c: New. * gcc.dg/pr37858.c: Replace early_local_cleanups pass name with build_ssa_passes. From-SVN: r217125
2014-11-05 13:42:03 +01:00
if (need_bounds_init)
fprintf (f, " need-bounds-init");
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
if (TREE_READONLY (decl))
fprintf (f, " read-only");
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (ctor_useable_for_folding_p ())
fprintf (f, " const-value-known");
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
if (writeonly)
fprintf (f, " write-only");
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
if (tls_model)
fprintf (f, " tls-%s", tls_model_names [tls_model]);
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
fprintf (f, "\n");
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
/* Dump given varpool node to stderr. */
void varpool_node::debug (void)
{
varpool_node::dump (stderr);
}
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
/* Dump the variable pool to F. */
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
void
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::dump_varpool (FILE *f)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
varpool_node *node;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
fprintf (f, "variable pool:\n\n");
cgraph.h (FOR_EACH_VARIABLE, [...]): New macros. * cgraph.h (FOR_EACH_VARIABLE, FOR_EACH_VARIABLE, FOR_EACH_FUNCTION): New macros. * lto-symtab.c (lto_symtab_merge_cgraph_nodes): Use FOR_EACH walkers to walk cgraph and varpool. * cgraph.c (cgraph_node_for_asm): Likewise. (dump_cgraph): Likewise. * value-prof.c (init_node_map): Likewise. * tree.c (free_lang_data_in_cgraph): Likewise. * tree-emutls.c: (ipa_lower_emutls): Likewise. * ipa-reference.c (generate_summary, propagate): Likewise. * cgraphunit.c (verify_cgraph, cgraph_process_same_body_aliases, cgraph_mark_functions_to_output, cgraph_output_in_order, output_weakrefs, cgraph_materialize_all_clones, cgraph_optimize): Likewise. * lto-cgraph.c (merge_profile_summaries): Likewise. (input_cgraph): Likewise. * ipa-pure-const.c (generate_summary): Likewise. (propagate): Likwise. * ipa-utils.c (ipa_reduced_postorder): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reverse_postorder): Likewise. * ipa-inline.c (ipa_inline): Likewise. * matrix-reorg.c (find_matrices_decl): Likewise. (matrix_reorg): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * ipa.c (cgraph_remove_unreachable_nodes): Likewise. (function_and_variable_visibility): Likewise. (whole_program_function_and_variable_visibility): Likewise. (ipa_cdtor_merge): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. * ipa-inline-analysis.c (dump_inline_summaries): Likewise. * ipa-prop.c (ipa_print_all_jump_functions): Likewise. (ipa_print_all_params): Likewise. (ipa_update_after_lto_read): Likewise. * tree-profie.c (tree_profiling): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. * passes.c (dump_passes): Likewise. (do_per_function): Likewise. (ipa_write_summaries): Likewise. * varpool.c (dump_varpool): Likewise. (varpool_node_for_asm): Likewise. (varpool_assemble_pending_decls): Likewise. * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH walkers to walk cgraph and varpool. * lto.c (read_cgraph_and_symbols): Use FOR_EACH walkers to walk cgraph and varpool. (materialize_cgraph): Likewise. * lto-partition.c (lto_1_to_1_map): Likewise. (lto_balanced_map): Likewise. (lto_promote_cross_file_statics): Likewise. From-SVN: r186492
2012-04-16 14:04:17 +02:00
FOR_EACH_VARIABLE (node)
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
node->dump (f);
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
}
/* Dump the variable pool to stderr. */
tree-vrp.c (debug_value_range, [...]): Annotate with DEBUG_FUNCTION. * tree-vrp.c (debug_value_range, debug_all_value_ranges, debug_asserts_for, debug_all_asserts): Annotate with DEBUG_FUNCTION. * tree-into-ssa.c (debug_decl_set, debug_defs_stack, debug_currdefs, debug_tree_ssa, debug_tree_ssa_stats, debug_def_blocks, debug_names_replaced_by, debug_update_ssa): Likewise. * sbitmap.c (debug_sbitmap): Likewise. * genrecog.c (debug_decision, debug_decision_list): Likewise. * tree-pretty-print.c (debug_generic_expr, debug_generic_stmt, debug_tree_chain): Likewise. * tree-loop-distribution.c (debug_rdg_partitions): Likewise. * cgraph.c (debug_cgraph_node, debug_cgraph): Likewise. * optabs.c (debug_optab_libfuncs): Likewise. (verify_loop_closed_ssa): Likewise. * value-prof.c (verify_histograms): Likewise. * reload.c (debug_reload_to_stream, debug_reload): Likewise. * bitmap.c (debug_bitmap_file, debug_bitmap, bitmap_print): Likewise. * cfghooks.c (verify_flow_info): Likewise. * fold-const.c (debug_fold_checksum): Likewise. * omp-low.c (debug_omp_region, debug_all_omp_regions): Likewise. * cfg.c (debug_regset, debug_flow_info, debug_bb, debug_bb_n): Likewise. * omega.c (debug_omega_problem): Likewise. * cgraphunit.c (verify_cgraph_node, verify_cgraph): Likewise. * tree-ssa-ccp.c (debug_lattice_value): Likewise. * dominance.c (verify_dominators, debug_dominance_info, debug_dominance_tree): Likewise. * df-core.c (df_insn_uid_debug, df_insn_debug, df_insn_debug_regno, * df_regno_debug, df_ref_debug, debug_df_insn, debug_df_reg, debug_df_regno, debug_df_ref, debug_df_defno, debug_df_useno, debug_df_chain): Likewise. * tree-ssa-dom.c (debug_dominator_optimization_stats): Likewise. * sel-sched.c (debug_state): Likewise. * tree-ssa-alias.c (debug_alias_info, debug_points_to_info_for): Likewise. * cfganal.c (print_edge_list, verify_edge_list): Likewise. * dwarf2out.c (debug_dwarf_die, debug_dwarf): Likewise. * tree-eh.c (verify_eh_edges, verify_eh_dispatch_edge): Likewise. * gimple-pretty-print.c (debug_gimple_stmt, debug_gimple_seq): Likewise. * c-pretty-print.c (debug_c_tree): Likewise. * sel-sched-dump.c (debug_insn_rtx, debug_vinsn, debug_expr, debug_insn debug_av_set, debug_lv_set, debug_ilist, debug_blist, debug_insn_vector, debug_hard_reg_set, debug_mem_addr_value): Likewise. * ebitmap.c (debug_ebitmap): Likewise. * function.c (debug_find_var_in_block_tree): Likewise. * print-rtl.c (debug_rtx): Likewise. (debug_rtx_count): Likewise. (debug_rtx_list, debug_rtx_range, debug_rtx_find): Likewise. * stor-layout.c (debug_rli): Likewise. * ipa.c (debug_cgraph_node_set, debug_varpool_node_set): Likewise. * tree-data-ref.c (debug_data_references, debug_data_dependence_relations, debug_data_reference, debug_data_dependence_relation, debug_rdg_vertex, debug_rdg_component, debug_rdg): Likewise. * tree-affine.c (debug_aff): Likewise. * tree-dfa.c (debug_referenced_vars, debug_variable, debug_dfa_stats): Likewise. * except.c (debug_eh_tree, verify_eh_tree): Likewise. * emit-rtl.c (verify_rtl_sharing): Likewise. * tree-ssa-pre.c (debug_pre_expr, debug_bitmap_set, debug_value_expressions): Likewise. * tree-ssa-live.c (debug_scope_block, debug_scope_blocks): Likewise. * sese.c (debug_rename_map, debug_ivtype_map): Likewise. * print-tree.c (debug_tree, debug_vec_tree): Likewise. * cfglayout.c (verify_insn_chain): Likewise. * graphite-clast-to-gimple.c (debug_clast_name_indexes, debug_clast_stmt, debug_generated_program): Likewise. * ggc-page.c (debug_print_page_list): Likewise. * tree-ssa-ter.c (debug_ter): Likewise. * graphite-dependences.c (debug_pddr): Likewise. * sched-deps.c (debug_ds): Likewise. * tree-ssa.c (verify_ssa): Likewise. * graphite-poly.c (debug_scattering_function, debug_iteration_domain, debug_scattering_functions, debug_iteration_domains, debug_pdr, debug_pdrs, debug_pbb_domain, debug_pbb, debug_scop_context, debug_scop, debug_cloog, debug_scop_params, debug_lst): Likewise. * tree-inline.c (debug_find_tree): Likewise. * graphite-ppl.c (debug_ppl_linear_expr, debug_ppl_polyhedron_matrix, debug_ppl_powerset_matrix): Likewise. * var-tracking.c (debug_dv): Likewise. * system.h (DEBUG_FUNCTION, DEBUG_VARIABLE): Define. * cfgloop.c (verify_loop_structure): Likewise. * plugin.c (dump_active_plugins, debug_active_plugins): Likewise. * c-common.c (verify_sequence_points): Likewise. * sched-rgn.c (debug_regions, debug_region, debug_candidate, debug_candidates, debug_rgn_dependencies): Likewise. * tree-ssa-structalias.c (debug_constraint, debug_constraints, * debug_constraint_graph, debug_solution_for_var, debug_sa_points_to_info): Likewise. * sched-vis.c (debug_insn_slim, debug_bb_slim, debug_bb_n_slim): Likewie. * tree-cfg.c (debug_cfg_stats, verify_stmts, debug_function, debug_loops, debug_loop, debug_loop_num): Likewise. * passes.c (debug_pass): Likewise. (dump_properties): Likewise; add cfglayout property. (debug_properties): Likewise. * tree-ssa-reassoc.c (debug_ops_vector): Likewise. * varpool.c (debug_varpool): Likewise. * regcprop.c (debug_value_data): Likewise. * tree-ssa-operands.c (verify_imm_links, debug_immediate_uses, debug_immediate_uses_for): Likewise. From-SVN: r160036
2010-05-29 22:31:45 +02:00
DEBUG_FUNCTION void
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::debug_varpool (void)
{
dump_varpool (stderr);
}
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* Given an assembler name, lookup node. */
varpool_node *
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::get_for_asmname (tree asmname)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (symtab_node *node = symtab_node::get_for_asmname (asmname))
Change is-a.h to support typedefs of pointers gcc/ * is-a.h: Update comments to reflect the following changes to the "pointerness" of the API, making the template parameter match the return type, allowing use of is-a.h with typedefs of pointers. (is_a_helper::cast): Return a T rather then a pointer to a T, so that the return type matches the parameter to the is_a_helper. (as_a): Likewise. (dyn_cast): Likewise. * cgraph.c (cgraph_node_for_asm): Update for removal of implicit pointer from the is-a.h API. * cgraph.h (is_a_helper <cgraph_node>::test): Convert to... (is_a_helper <cgraph_node *>::test): ...this, matching change to is-a.h API. (is_a_helper <varpool_node>::test): Likewise, convert to... (is_a_helper <varpool_node *>::test): ...this. (varpool_first_variable): Update for removal of implicit pointer from the is-a.h API. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_alias_target): Likewise. (varpool_alias_target): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_variable_node): Likewise. (symtab_real_symbol_p): Likewise. * cgraphunit.c (referred_to_p): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimple-ssa.h (gimple_vuse_op): Likewise. (gimple_vdef_op): Likewise. * gimple-streamer-in.c (input_gimple_stmt): Likewise. * gimple.c (gimple_build_asm_1): Likewise. (gimple_build_try): Likewise. (gimple_build_resx): Likewise. (gimple_build_eh_dispatch): Likewise. (gimple_build_omp_for): Likewise. (gimple_omp_for_set_clauses): Likewise. * gimple.h (is_a_helper <gimple_statement_asm>::test): Convert to... (is_a_helper <gimple_statement_asm *>::test): ...this. (is_a_helper <gimple_statement_bind>::test): Convert to... (is_a_helper <gimple_statement_bind *>::test): ...this. (is_a_helper <gimple_statement_call>::test): Convert to... (is_a_helper <gimple_statement_call *>::test): ...this. (is_a_helper <gimple_statement_catch>::test): Convert to... (is_a_helper <gimple_statement_catch *>::test): ...this. (is_a_helper <gimple_statement_resx>::test): Convert to... (is_a_helper <gimple_statement_resx *>::test): ...this. (is_a_helper <gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <gimple_statement_eh_else>::test): Convert to... (is_a_helper <gimple_statement_eh_else *>::test): ...this. (is_a_helper <gimple_statement_eh_filter>::test): Convert to... (is_a_helper <gimple_statement_eh_filter *>::test): ...this. (is_a_helper <gimple_statement_eh_mnt>::test): Convert to... (is_a_helper <gimple_statement_eh_mnt *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <gimple_statement_omp_return>::test): Convert to... (is_a_helper <gimple_statement_omp_return *>::test): ...this. (is_a_helper <gimple_statement_omp_continue>::test): Convert to... (is_a_helper <gimple_statement_omp_continue *>::test): ...this. (is_a_helper <gimple_statement_omp_critical>::test): Convert to... (is_a_helper <gimple_statement_omp_critical *>::test): ...this. (is_a_helper <gimple_statement_omp_for>::test): Convert to... (is_a_helper <gimple_statement_omp_for *>::test): ...this. (is_a_helper <gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <gimple_statement_omp_target>::test): Convert to... (is_a_helper <gimple_statement_omp_target *>::test): ...this. (is_a_helper <gimple_statement_omp_sections>::test): Convert to... (is_a_helper <gimple_statement_omp_sections *>::test): ...this. (is_a_helper <gimple_statement_omp_single>::test): Convert to... (is_a_helper <gimple_statement_omp_single *>::test): ...this. (is_a_helper <gimple_statement_omp_teams>::test): Convert to... (is_a_helper <gimple_statement_omp_teams *>::test): ...this. (is_a_helper <gimple_statement_omp_task>::test): Convert to... (is_a_helper <gimple_statement_omp_task *>::test): ...this. (is_a_helper <gimple_statement_phi>::test): Convert to... (is_a_helper <gimple_statement_phi *>::test): ...this. (is_a_helper <gimple_statement_transaction>::test): Convert to... (is_a_helper <gimple_statement_transaction *>::test): ...this. (is_a_helper <gimple_statement_try>::test): Convert to... (is_a_helper <gimple_statement_try *>::test): ...this. (is_a_helper <gimple_statement_wce>::test): Convert to... (is_a_helper <gimple_statement_wce *>::test): ...this. (is_a_helper <const gimple_statement_asm>::test): Convert to... (is_a_helper <const gimple_statement_asm *>::test): ...this. (is_a_helper <const gimple_statement_bind>::test): Convert to... (is_a_helper <const gimple_statement_bind *>::test): ...this. (is_a_helper <const gimple_statement_call>::test): Convert to... (is_a_helper <const gimple_statement_call *>::test): ...this. (is_a_helper <const gimple_statement_catch>::test): Convert to... (is_a_helper <const gimple_statement_catch *>::test): ...this. (is_a_helper <const gimple_statement_resx>::test): Convert to... (is_a_helper <const gimple_statement_resx *>::test): ...this. (is_a_helper <const gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <const gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <const gimple_statement_eh_filter>::test): Convert to... (is_a_helper <const gimple_statement_eh_filter *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <const gimple_statement_omp_return>::test): Convert to... (is_a_helper <const gimple_statement_omp_return *>::test): ...this. (is_a_helper <const gimple_statement_omp_continue>::test): Convert to... (is_a_helper <const gimple_statement_omp_continue *>::test): ...this. (is_a_helper <const gimple_statement_omp_critical>::test): Convert to... (is_a_helper <const gimple_statement_omp_critical *>::test): ...this. (is_a_helper <const gimple_statement_omp_for>::test): Convert to... (is_a_helper <const gimple_statement_omp_for *>::test): ...this. (is_a_helper <const gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <const gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <const gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <const gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <const gimple_statement_omp_target>::test): Convert to... (is_a_helper <const gimple_statement_omp_target *>::test): ...this. (is_a_helper <const gimple_statement_omp_sections>::test): Convert to... (is_a_helper <const gimple_statement_omp_sections *>::test): ...this. (is_a_helper <const gimple_statement_omp_single>::test): Convert to... (is_a_helper <const gimple_statement_omp_single *>::test): ...this. (is_a_helper <const gimple_statement_omp_teams>::test): Convert to... (is_a_helper <const gimple_statement_omp_teams *>::test): ...this. (is_a_helper <const gimple_statement_omp_task>::test): Convert to... (is_a_helper <const gimple_statement_omp_task *>::test): ...this. (is_a_helper <const gimple_statement_phi>::test): Convert to... (is_a_helper <const gimple_statement_phi *>::test): ...this. (is_a_helper <const gimple_statement_transaction>::test): Convert to... (is_a_helper <const gimple_statement_transaction *>::test): ...this. (is_a_helper <const gimple_statement_with_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_ops *>::test): ...this. (is_a_helper <gimple_statement_with_ops>::test): Convert to... (is_a_helper <gimple_statement_with_ops *>::test): ...this. (is_a_helper <const gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_memory_ops *>::test): ...this. (is_a_helper <gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <gimple_statement_with_memory_ops *>::test): ...this. (gimple_use_ops): Update for removal of implicit pointer from the is-a.h API. (gimple_set_use_ops): Likewise. (gimple_vuse): Likewise. (gimple_vdef): Likewise. (gimple_vuse_ptr): Likewise. (gimple_vdef_ptr): Likewise. (gimple_set_vuse): Likewise. (gimple_set_vdef): Likewise. (gimple_omp_return_set_lhs): Likewise. (gimple_omp_return_lhs): Likewise. (gimple_omp_return_lhs_ptr): Likewise. (gimple_call_fntype): Likewise. (gimple_call_set_fntype): Likewise. (gimple_call_set_internal_fn): Likewise. (gimple_call_use_set): Likewise. (gimple_call_clobber_set): Likewise. (gimple_bind_vars): Likewise. (gimple_bind_set_vars): Likewise. (gimple_bind_body_ptr): Likewise. (gimple_bind_set_body): Likewise. (gimple_bind_add_stmt): Likewise. (gimple_bind_block): Likewise. (gimple_bind_set_block): Likewise. (gimple_asm_ninputs): Likewise. (gimple_asm_noutputs): Likewise. (gimple_asm_nclobbers): Likewise. (gimple_asm_nlabels): Likewise. (gimple_asm_input_op): Likewise. (gimple_asm_input_op_ptr): Likewise. (gimple_asm_output_op): Likewise. (gimple_asm_output_op_ptr): Likewise. (gimple_asm_set_output_op): Likewise. (gimple_asm_clobber_op): Likewise. (gimple_asm_set_clobber_op): Likewise. (gimple_asm_label_op): Likewise. (gimple_asm_set_label_op): Likewise. (gimple_asm_string): Likewise. (gimple_catch_types): Likewise. (gimple_catch_types_ptr): Likewise. (gimple_catch_handler_ptr): Likewise. (gimple_catch_set_types): Likewise. (gimple_catch_set_handler): Likewise. (gimple_eh_filter_types): Likewise. (gimple_eh_filter_types_ptr): Likewise. (gimple_eh_filter_failure_ptr): Likewise. (gimple_eh_filter_set_types): Likewise. (gimple_eh_filter_set_failure): Likewise. (gimple_eh_must_not_throw_fndecl): Likewise. (gimple_eh_must_not_throw_set_fndecl): Likewise. (gimple_eh_else_n_body_ptr): Likewise. (gimple_eh_else_e_body_ptr): Likewise. (gimple_eh_else_set_n_body): Likewise. (gimple_eh_else_set_e_body): Likewise. (gimple_try_eval_ptr): Likewise. (gimple_try_cleanup_ptr): Likewise. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. (gimple_wce_cleanup_ptr): Likewise. (gimple_wce_set_cleanup): Likewise. (gimple_phi_capacity): Likewise. (gimple_phi_num_args): Likewise. (gimple_phi_result): Likewise. (gimple_phi_result_ptr): Likewise. (gimple_phi_set_result): Likewise. (gimple_phi_arg): Likewise. (gimple_phi_set_arg): Likewise. (gimple_resx_region): Likewise. (gimple_resx_set_region): Likewise. (gimple_eh_dispatch_region): Likewise. (gimple_eh_dispatch_set_region): Likewise. (gimple_omp_critical_name): Likewise. (gimple_omp_critical_name_ptr): Likewise. (gimple_omp_critical_set_name): Likewise. (gimple_omp_for_clauses): Likewise. (gimple_omp_for_clauses_ptr): Likewise. (gimple_omp_for_set_clauses): Likewise. (gimple_omp_for_collapse): Likewise. (gimple_omp_for_index): Likewise. (gimple_omp_for_index_ptr): Likewise. (gimple_omp_for_set_index): Likewise. (gimple_omp_for_initial): Likewise. (gimple_omp_for_initial_ptr): Likewise. (gimple_omp_for_set_initial): Likewise. (gimple_omp_for_final): Likewise. (gimple_omp_for_final_ptr): Likewise. (gimple_omp_for_set_final): Likewise. (gimple_omp_for_incr): Likewise. (gimple_omp_for_incr_ptr): Likewise. (gimple_omp_for_set_incr): Likewise. (gimple_omp_for_pre_body_ptr): Likewise. (gimple_omp_for_set_pre_body): Likewise. (gimple_omp_parallel_clauses): Likewise. (gimple_omp_parallel_clauses_ptr): Likewise. (gimple_omp_parallel_set_clauses): Likewise. (gimple_omp_parallel_child_fn): Likewise. (gimple_omp_parallel_child_fn_ptr): Likewise. (gimple_omp_parallel_set_child_fn): Likewise. (gimple_omp_parallel_data_arg): Likewise. (gimple_omp_parallel_data_arg_ptr): Likewise. (gimple_omp_parallel_set_data_arg): Likewise. (gimple_omp_task_clauses): Likewise. (gimple_omp_task_clauses_ptr): Likewise. (gimple_omp_task_set_clauses): Likewise. (gimple_omp_task_child_fn): Likewise. (gimple_omp_task_child_fn_ptr): Likewise. (gimple_omp_task_set_child_fn): Likewise. (gimple_omp_task_data_arg): Likewise. (gimple_omp_task_data_arg_ptr): Likewise. (gimple_omp_task_set_data_arg): Likewise. (gimple_omp_taskreg_clauses): Likewise. (gimple_omp_taskreg_clauses_ptr): Likewise. (gimple_omp_taskreg_set_clauses): Likewise. (gimple_omp_taskreg_child_fn): Likewise. (gimple_omp_taskreg_child_fn_ptr): Likewise. (gimple_omp_taskreg_set_child_fn): Likewise. (gimple_omp_taskreg_data_arg): Likewise. (gimple_omp_taskreg_data_arg_ptr): Likewise. (gimple_omp_taskreg_set_data_arg): Likewise. (gimple_omp_task_copy_fn): Likewise. (gimple_omp_task_copy_fn_ptr): Likewise. (gimple_omp_task_set_copy_fn): Likewise. (gimple_omp_task_arg_size): Likewise. (gimple_omp_task_arg_size_ptr): Likewise. (gimple_omp_task_set_arg_size): Likewise. (gimple_omp_task_arg_align): Likewise. (gimple_omp_task_arg_align_ptr): Likewise. (gimple_omp_task_set_arg_align): Likewise. (gimple_omp_single_clauses): Likewise. (gimple_omp_single_clauses_ptr): Likewise. (gimple_omp_single_set_clauses): Likewise. (gimple_omp_target_clauses): Likewise. (gimple_omp_target_clauses_ptr): Likewise. (gimple_omp_target_set_clauses): Likewise. (gimple_omp_target_child_fn): Likewise. (gimple_omp_target_child_fn_ptr): Likewise. (gimple_omp_target_set_child_fn): Likewise. (gimple_omp_target_data_arg): Likewise. (gimple_omp_target_data_arg_ptr): Likewise. (gimple_omp_target_set_data_arg): Likewise. (gimple_omp_teams_clauses): Likewise. (gimple_omp_teams_clauses_ptr): Likewise. (gimple_omp_teams_set_clauses): Likewise. (gimple_omp_sections_clauses): Likewise. (gimple_omp_sections_clauses_ptr): Likewise. (gimple_omp_sections_set_clauses): Likewise. (gimple_omp_sections_control): Likewise. (gimple_omp_sections_control_ptr): Likewise. (gimple_omp_sections_set_control): Likewise. (gimple_omp_for_set_cond): Likewise. (gimple_omp_for_cond): Likewise. (gimple_omp_atomic_store_set_val): Likewise. (gimple_omp_atomic_store_val): Likewise. (gimple_omp_atomic_store_val_ptr): Likewise. (gimple_omp_atomic_load_set_lhs): Likewise. (gimple_omp_atomic_load_lhs): Likewise. (gimple_omp_atomic_load_lhs_ptr): Likewise. (gimple_omp_atomic_load_set_rhs): Likewise. (gimple_omp_atomic_load_rhs): Likewise. (gimple_omp_atomic_load_rhs_ptr): Likewise. (gimple_omp_continue_control_def): Likewise. (gimple_omp_continue_control_def_ptr): Likewise. (gimple_omp_continue_set_control_def): Likewise. (gimple_omp_continue_control_use): Likewise. (gimple_omp_continue_control_use_ptr): Likewise. (gimple_omp_continue_set_control_use): Likewise. (gimple_transaction_body_ptr): Likewise. (gimple_transaction_label): Likewise. (gimple_transaction_label_ptr): Likewise. (gimple_transaction_set_body): Likewise. (gimple_transaction_set_label): Likewise. * ipa-devirt.c (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. * ipa-reference.c (analyze_function): Likewise. (ipa_reference_write_optimization_summary): Likewise. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. * lto-cgraph.c (lto_output_ref): Likewise. (add_references): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_ref): Likewise. (input_cgraph_1): Likewise. (output_cgraph_opt_summary): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. * lto-streamer.h (lsei_next_function_in_partition): Likewise. (lsei_start_function_in_partition): Likewise. (lsei_next_variable_in_partition): Likewise. (lsei_start_variable_in_partition): Likewise. * symtab.c (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (dump_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (symtab_make_decl_local): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (symtab_get_symbol_partitioning_class): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. (reserve_phi_args_for_new_edge): Likewise. (remove_phi_args): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/lto/ * lto-partition.c (add_references_to_partition): Update for removal of implicit pointer from the is-a.h API. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (undo_partition): Likewise. (lto_balanced_map): Likewise. (promote_symbol): Likewise. * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r209719
2014-04-23 21:06:40 +02:00
return dyn_cast <varpool_node *> (node);
cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... * cgraph.h (symtab_node_base): Add definition, alias and analyzed flags; reorder rest of fields in more consistent way. (varpool_node): Remove analyzed, finalized and alias. (cgraph_ndoe): Likewise. (symtab_alias_ultimate_target): New function. (cgraph_function_node): Move offline. (cgraph_reset_node): Declare. (cgraph_comdat_can_be_unshared_p): Remove. (varpool_remove_initializer): Declare. (varpool_first_defined_variable, varpool_next_defined_variable cgraph_first_defined_function, cgraph_next_defined_function): Update. (cgraph_function_with_gimple_body_p): Update. (varpool_all_refs_explicit_p): Update. (symtab_alias_target): New function. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Rename to ... (cgraph_alias_target, varpool_alias_target): .. this one; simplify. (cgraph_function_or_thunk_node): Simplify using symtab_alias_ultimate_target. (varpool_variable_node): Likewise. * cgraph.c (cgraph_create_function_alias): Update. (cgraph_add_thunk): Update. (cgraph_remove_node): Update. (dump_cgraph_node): Do not dump removed flags. (cgraph_function_body_availability): Update. (cgraph_propagate_frequency): Update. (verify_cgraph_node): Check sanity of local flag. (cgraph_function_node): Move here from cgraph.h; revamp for cgraph_function_or_thunk_node. * lto-symtab.c (lto_varpool_replace_node): Update. (lto_symtab_resolve_can_prevail_p): Update. (lto_symtab_merge_cgraph_nodes): Update. * ipa-cp.c (determine_versionability, initialize_node_lattices, propagate_constants_accross_call, devirtualization_time_bonus, ipcp_propagate_stage): Update. * tree-emutls.c (create_emultls_var, ipa_lower_emutls): Update. * ipa-inline-transform.c (clone_inlined_nodes, preserve_function_body_p): Update. * ipa-reference.c (propagate): Update. (write_node_summary_p): Update. * toplev.c (wrapup_global_declaration_2): Update. * cgraphunit.c (cgraph_analyze_function): Rename to ... (analyze_function) ... this one. (cgraph_process_new_functions): Update. (cgraph_reset_node): Export. (cgraph_finalize_function): Update. (cgraph_add_new_function): Update. (process_function_and_variable_attributes): Update. (varpool_finalize_decl): Update. (symbol_finalized): Remove. (symbol_finalized_and_needed): Rename to ... (symbol_defined_and_needed): ... update. (cgraph_analyze_functions): Update. (handle_alias_pairs): Update. (mark_functions_to_output): Update. (assemble_thunk): Update. (output_in_order): Update. (output_weakrefs): Update. (finalize_compilation_unit): Update. * lto-cgraph.c (reachable_from_other_partition_p, lto_output_node, lto_output_varpool_node, compute_ltrans_boundary, input_overwrite_node, input_node, input_varpool_node): Update. * dbxout.c (dbxout_expand_expr): Update. * cgraphclones.c (cgraph_clone_node): Update. (cgraph_copy_node_for_versioning): Update. (cgraph_materialize_clone): Update. (cgraph_materialize_all_clones): Update. * ipa-pure-const.c (analyze_function, pure_const_write_summary, propagate_pure_const, propagate_nothrow): Update. * lto-streamer-out.c (lto_output, write_symbol): Update. * ipa-utils.c (ipa_reverse_postorder): Update. * ipa-inline.c (can_inline_edge_p): Update. (update_caller_keys, ipa_inline): Update. * dwarf2out.c (reference_to_unused, premark_types_used_by_global_vars_helper): Update. * tree-eh.c (tree_could_trap_p): Update. * ipa-split.c (consider_split, execute_split_functions): Update. * ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p, has_addr_references_p): Update; move ahead in file for better readability. (process_references): Simplify. (symtab_remove_unreachable_nodes): Update; cleanup way function/var bodies are removed. (cgraph_comdat_can_be_unshared_p): Make static. (cgraph_externally_visible_p): Update. (varpool_externally_visible_p): Update. (function_and_variable_visibility): Update. * trans-mem.c (get_cg_data, ipa_tm_mayenterirr_function, ipa_tm_mark_force_output_node): Update. * ipa-inline-analysis.c (dump_inline_summary, initialize_inline_failed, estimate_edge_devirt_benefit, inline_generate_summary, inline_write_summary): Update. * gimple-fold.c (can_refer_decl_in_current_unit_p): Update. * ipa-prop.c (ipa_compute_jump_functions): Update. (ipa_print_node_params, ipa_prop_read_section, ipa_update_after_lto_read, read_replacements_section): Update. * varasm.c (mark_decl_referenced): Update. (assemble_alias, dump_tm_clone_pairs): Update. * tree-inline.c (copy_bb): Update. (estimate_num_insns, optimize_inline_calls, tree_function_versioning): Update. * symtab.c (dump_symtab_base): Print new flags. (verify_symtab_base): Verify new flags. (symtab_alias_ultimate_target): New function. * tree-ssa-structalias.c (get_constraint_for_ssa_var, create_variable_info_for, associate_varinfo_to_alias, ipa_pta_execute): Update. * passes.c (ipa_write_summaries, ipa_write_optimization_summaries): Update. * i386.c (ix86_get_function_versions_dispatcher, ix86_generate_version_dispatcher_body): Update. (fold_builtin_cpu): Use varpool_add_new_variable. * varpool.c (varpool_remove_initializer): Break out from ... (varpool_remove_node): ... this one. (dump_varpool_node, varpool_node_for_asm, cgraph_variable_initializer_availability, varpool_analyze_node, varpool_assemble_decl, varpool_remove_unreferenced_decls, varpool_finalize_named_section_flags, varpool_create_variable_alias): Update * decl.c (java_mark_decl_local): Update for new symtab flags. * tree.c (cp_fix_function_decl_p): Update for new symtab flags. * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise. * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab flags. * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise. From-SVN: r199422
2013-05-29 22:42:50 +02:00
else
return NULL;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
/* When doing LTO, read variable's constructor from disk if
it is not already present. */
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
tree
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::get_constructor (void)
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
lto_file_decl_data *file_data;
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
const char *data, *name;
size_t len;
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (DECL_INITIAL (decl) != error_mark_node
|| !in_lto_p
|| !lto_file_data)
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
return DECL_INITIAL (decl);
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
timevar_push (TV_IPA_LTO_CTORS_IN);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
file_data = lto_file_data;
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
/* We may have renamed the declaration, e.g., a static function. */
name = lto_get_decl_name_mapping (file_data, name);
struct lto_in_decl_state *decl_state
= lto_get_function_in_decl_state (file_data, decl);
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
data = lto_get_section_data (file_data, LTO_section_function_body,
name, &len, decl_state->compressed);
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
if (!data)
Always pass explicit location to fatal_error. The patch <https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00698.html> adding an overload for fatal_error that passes an explicit location broke gcc.pot regeneration because xgettext cannot handle function overloads with the diagnostic string argument in different positions. As the desired direction is for all diagnostics to have explicit locations, this patch addresses the regression by removing the version of fatal_error that does not pass a location, passing explicit input_location everywhere (in the hope that those will incrementally be changed to other locations, much as with the addition of a location argument to pedwarn some time ago - a lot of cases aren't meaningfully associated with a source file so UNKNOWN_LOCATION may be better). Note that this patch does not attempt to fix any existing issues with these diagnostics (such as wrongly starting with capital letters or ending with '.' or '\n'); it just adds the input_location argument. Bootstrapped with no regressions for x86_64-unknown-linux-gnu (Go excluded). gcc: * diagnostic.c (fatal_error (const char *, ...)): Remove function. * diagnostic-core.h (fatal_error (const char *, ...)): Remove prototype. * toplev.h (init_asm_output): Update comment on use of UNKNOWN_LOCATION with fatal_error. * cgraph.c, collect-utils.c, collect2.c, config/arc/arc.c, config/arc/arc.md, config/avr/avr.c, config/c6x/c6x.h, config/darwin.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/intelmic-mkoffload.c, config/nios2/nios2.c, config/nvptx/mkoffload.c, config/nvptx/nvptx.h, config/rs6000/host-darwin.c, config/rs6000/rs6000.c, config/s390/s390.c, gcc.c, gcov-io.h, gcov-tool.c, ggc-common.c, ggc-page.c, graph.c, ipa-inline-analysis.c, ipa-reference.c, lto-cgraph.c, lto-section-in.c, lto-streamer-in.c, lto-streamer.c, lto-wrapper.c, objc/objc-act.c, opts.c, passes.c, plugin.c, tlink.c, toplev.c, tree-streamer-in.c, varpool.c: All callers of fatal_error changed to pass input_location as first argument. gcc/c-family: * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/cp: * class.c, except.c, parser.c, pt.c: All callers of fatal_error changed to pass input_location as first argument. gcc/fortran: * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All callers of fatal_error changed to pass input_location as first argument. gcc/java: * class.c, expr.c, jcf-parse.c, jvspec.c: All callers of fatal_error changed to pass input_location as first argument. gcc/lto: * lto-object.c, lto-symtab.c, lto.c: All callers of fatal_error changed to pass input_location as first argument. libcc1: * plugin.cc: All callers of fatal_error changed to pass input_location as first argument. From-SVN: r220293
2015-01-30 17:15:00 +01:00
fatal_error (input_location, "%s: section %s is missing",
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
file_data->file_name,
name);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
lto_input_variable_constructor (file_data, this, data);
gcc_assert (DECL_INITIAL (decl) != error_mark_node);
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
lto_stats.num_function_bodies++;
lto_free_section_data (file_data, LTO_section_function_body, name,
data, len, decl_state->compressed);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
lto_free_function_in_decl_state_for_node (this);
timevar_pop (TV_IPA_LTO_CTORS_IN);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
return DECL_INITIAL (decl);
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
/* Return true if variable has constructor that can be used for folding. */
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
bool
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::ctor_useable_for_folding_p (void)
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node *real_node = this;
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
if (real_node->alias && real_node->definition)
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
real_node = ultimate_alias_target ();
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (TREE_CODE (decl) == CONST_DECL
|| DECL_IN_CONSTANT_POOL (decl))
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
return true;
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (TREE_THIS_VOLATILE (decl))
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
return false;
/* If we do not have a constructor, we can't use it. */
if (DECL_INITIAL (real_node->decl) == error_mark_node
&& !real_node->lto_file_data)
return false;
/* Avoid attempts to load constructors that was not streamed. */
if (flag_ltrans && DECL_INITIAL (real_node->decl) == error_mark_node
&& real_node->body_removed)
return false;
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
/* Vtables are defined by their types and must match no matter of interposition
rules. */
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (DECL_VIRTUAL_P (decl))
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
{
/* The C++ front end creates VAR_DECLs for vtables of typeinfo
classes not defined in the current TU so that it can refer
to them from typeinfo objects. Avoid returning NULL_TREE. */
return DECL_INITIAL (real_node->decl) != NULL;
}
/* Alias of readonly variable is also readonly, since the variable is stored
in readonly memory. We also accept readonly aliases of non-readonly
locations assuming that user knows what he is asking for. */
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (!TREE_READONLY (decl) && !TREE_READONLY (real_node->decl))
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
return false;
/* Variables declared 'const' without an initializer
have zero as the initializer if they may not be
overridden at link or run time.
It is actually requirement for C++ compiler to optimize const variables
consistently. As a GNU extension, do not enfore this rule for user defined
weak variables, so we support interposition on:
static const int dummy = 0;
extern const int foo __attribute__((__weak__, __alias__("dummy")));
*/
if ((!DECL_INITIAL (real_node->decl)
|| (DECL_WEAK (decl) && !DECL_COMDAT (decl)))
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
&& (DECL_EXTERNAL (decl) || decl_replaceable_p (decl)))
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
return false;
/* Variables declared `const' with an initializer are considered
to not be overwritable with different initializer by default.
??? Previously we behaved so for scalar variables but not for array
accesses. */
return true;
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
/* If DECLARATION is constant variable and its initial value is known
(so we can do constant folding), return its constructor (DECL_INITIAL).
This may be an expression or NULL when DECL is initialized to 0.
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
Return ERROR_MARK_NODE otherwise.
In LTO this may actually trigger reading the constructor from disk.
For this reason varpool_ctor_useable_for_folding_p should be used when
the actual constructor value is not needed. */
tree
ctor_for_folding (tree decl)
{
varpool_node *node, *real_node;
tree real_decl;
if (TREE_CODE (decl) != VAR_DECL
&& TREE_CODE (decl) != CONST_DECL)
return error_mark_node;
ipa-chkp.c: New. gcc/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * ipa-chkp.c: New. * ipa-chkp.h: New. * tree-chkp.c: New. * tree-chkp.h: New. * tree-chkp-opt.c: New. * rtl-chkp.c: New. * rtl-chkp.h: New. * Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o tree-chkp-opt.o. (GTFILES): Add tree-chkp.c. * mode-classes.def (MODE_POINTER_BOUNDS): New. * tree.def (POINTER_BOUNDS_TYPE): New. * genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS. (POINTER_BOUNDS_MODE): New. (make_pointer_bounds_mode): New. * machmode.h (POINTER_BOUNDS_MODE_P): New. * stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS. (layout_type): Support POINTER_BOUNDS_TYPE. * tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE. * tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE. * tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE. (type_contains_placeholder_1): Likewise. (build_common_tree_nodes): Initialize pointer_bounds_type_node. * tree.h (POINTER_BOUNDS_TYPE_P): New. (pointer_bounds_type_node): New. (POINTER_BOUNDS_P): New. (BOUNDED_TYPE_P): New. (BOUNDED_P): New. (CALL_WITH_BOUNDS_P): New. * gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS. (gimple_call_with_bounds_p): New. (gimple_call_set_with_bounds): New. (gimple_return_retbnd): New. (gimple_return_set_retbnd): New * gimple.c (gimple_build_return): Increase number of ops for return statement. (gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P flag. * gimple-pretty-print.c (dump_gimple_return): Print second op. * rtl.h (CALL_EXPR_WITH_BOUNDS_P): New. * gimplify.c (gimplify_init_constructor): Avoid infinite loop during gimplification of bounds initializer. * calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h. (special_function_p): Use original decl name when analyzing instrumentation clone. (arg_data): Add fields special_slot, pointer_arg and pointer_offset. (store_bounds): New. (emit_call_1): Propagate instrumentation flag for CALL. (initialize_argument_information): Compute pointer_arg, pointer_offset and special_slot for pointer bounds arguments. (finalize_must_preallocate): Preallocate when storing bounds in bounds table. (compute_argument_addresses): Skip pointer bounds. (expand_call): Store bounds into tables separately. Return result joined with resulting bounds. * cfgexpand.c: Include tree-chkp.h, rtl-chkp.h. (expand_call_stmt): Propagate bounds flag for CALL_EXPR. (expand_return): Add returned bounds arg. Handle returned bounds. (expand_gimple_stmt_1): Adjust to new expand_return signature. (gimple_expand_cfg): Reset rtx bounds map. * expr.c: Include tree-chkp.h, rtl-chkp.h. (expand_assignment): Handle returned bounds. (store_expr_with_bounds): New. Replaces store_expr with new bounds target argument. Handle bounds returned by calls. (store_expr): Now wraps store_expr_with_bounds. * expr.h (store_expr_with_bounds): New. * function.c: Include tree-chkp.h, rtl-chkp.h. (bounds_parm_data): New. (use_register_for_decl): Do not registerize decls used for bounds stores and loads. (assign_parms_augmented_arg_list): Add bounds of the result structure pointer as the second argument. (assign_parm_find_entry_rtl): Mark bounds are never passed on the stack. (assign_parm_is_stack_parm): Likewise. (assign_parm_load_bounds): New. (assign_bounds): New. (assign_parms): Load bounds and determine a location for returned bounds. (diddle_return_value_1): New. (diddle_return_value): Handle returned bounds. * function.h (rtl_data): Add field for returned bounds. * varasm.c: Include tree-chkp.h. (output_constant): Support POINTER_BOUNDS_TYPE. (output_constant_pool_2): Support MODE_POINTER_BOUNDS. (ultimate_transparent_alias_target): Move up. (make_decl_rtl): For instrumented function use name of the original decl. (assemble_start_function): Mark function as global in case it is instrumentation clone of the global function. (do_assemble_alias): Follow transparent alias chain for identifier. Check if original alias is public. (maybe_assemble_visibility): Use visibility of the original function for instrumented version. (default_unique_section): Likewise. * emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS. (init_emit_once): Build pointer bounds zero constants. * explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS. * target.def (builtin_chkp_function): New. (chkp_bound_type): New. (chkp_bound_mode): New. (chkp_make_bounds_constant): New. (chkp_initialize_bounds): New. (load_bounds_for_arg): New. (store_bounds_for_arg): New. (load_returned_bounds): New. (store_returned_bounds): New. (chkp_function_value_bounds): New. (setup_incoming_vararg_bounds): New. (function_arg): Update hook description with new possible return value CONST_INT. * targhooks.h (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode): New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * targhooks.c (default_load_bounds_for_arg): New. (default_store_bounds_for_arg): New. (default_load_returned_bounds): New. (default_store_returned_bounds): New. (default_chkp_bound_type): New. (default_chkp_bound_mode); New. (default_builtin_chkp_function): New. (default_chkp_function_value_bounds): New. (default_chkp_make_bounds_constant): New. (default_chkp_initialize_bounds): New. (default_setup_incoming_vararg_bounds): New. * builtin-types.def (BT_BND): New. (BT_FN_PTR_CONST_PTR): New. (BT_FN_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR): New. (BT_FN_CONST_PTR_BND): New. (BT_FN_PTR_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_VOID_PTRPTR_CONST_PTR): New. (BT_FN_VOID_CONST_PTR_SIZE): New. (BT_FN_VOID_PTR_BND): New. (BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New. (BT_FN_BND_CONST_PTR_SIZE): New. (BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New. (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New. * chkp-builtins.def: New. * builtins.def: include chkp-builtins.def. (DEF_CHKP_BUILTIN): New. * builtins.c: Include tree-chkp.h and rtl-chkp.h. (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS, BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS, BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS, BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS, BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS, BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND, BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL, BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET, BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW, BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER. (std_expand_builtin_va_start): Init bounds for va_list. * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add __CHKP__ macro when Pointer Bounds Checker is on. * params.def (PARAM_CHKP_MAX_CTOR_SIZE): New. * passes.def (pass_ipa_chkp_versioning): New. (pass_early_local_passes): Renamed to pass_build_ssa_passes. (pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes. (pass_chkp_instrumentation_passes): New. (pass_ipa_chkp_produce_thunks): New. (pass_local_optimization_passes): New. (pass_chkp_opt): New. * tree-pass.h (make_pass_ipa_chkp_versioning): New. (make_pass_ipa_chkp_produce_thunks): New. (make_pass_chkp): New. (make_pass_chkp_opt): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * passes.c (pass_manager::execute_early_local_passes): Execute early passes in three steps. (execute_all_early_local_passes): Renamed to ... (execute_build_ssa_passes): This. (pass_data_early_local_passes): Renamed to ... (pass_data_build_ssa_passes): This. (pass_early_local_passes): Renamed to ... (pass_build_ssa_passes): This. (pass_data_chkp_instrumentation_passes): New. (pass_chkp_instrumentation_passes): New. (pass_data_local_optimization_passes): New. (pass_local_optimization_passes): New. (make_pass_early_local_passes): Renamed to ... (make_pass_build_ssa_passes): This. (make_pass_chkp_instrumentation_passes): New. (make_pass_local_optimization_passes): New. * c-family/c.opt (fcheck-pointer-bounds): New. (fchkp-check-incomplete-type): New. (fchkp-zero-input-bounds-for-main): New. (fchkp-first-field-has-own-bounds): New. (fchkp-narrow-bounds): New. (fchkp-narrow-to-innermost-array): New. (fchkp-optimize): New. (fchkp-use-fast-string-functions): New. (fchkp-use-nochk-string-functions): New. (fchkp-use-static-bounds): New. (fchkp-use-static-const-bounds): New. (fchkp-treat-zero-dynamic-size-as-infinite): New. (fchkp-check-read): New. (fchkp-check-write): New. (fchkp-store-bounds): New. (fchkp-instrument-calls): New. (fchkp-instrument-marked-only): New. (Wchkp): New. * c-family/c-common.c (handle_bnd_variable_size_attribute): New. (handle_bnd_legacy): New. (handle_bnd_instrument): New. (c_common_attribute_table): Add bnd_variable_size, bnd_legacy and bnd_instrument. Fix documentation. (c_common_format_attribute_table): Likewsie. * toplev.c: include tree-chkp.h. (process_options): Check Pointer Bounds Checker is supported. (compile_file): Add chkp_finish_file call. * ipa-cp.c (initialize_node_lattices): Use cgraph_local_p to handle instrumentation clones properly. (propagate_constants_accross_call): Do not propagate through instrumentation thunks. * ipa-pure-const.c (propagate_pure_const): Support IPA_REF_CHKP. * ipa-inline.c (early_inliner): Check edge has summary allocated. * ipa-split.c: Include tree-chkp.h. (find_retbnd): New. (split_part_set_ssa_name_p): New. (consider_split): Do not split retbnd and retval producers. (insert_bndret_call_after): new. (split_function): Propagate Pointer Bounds Checker instrumentation marks and handle returned bounds. * tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode into bit field and add with_bounds field. * tree-ssa-sccvn.c (copy_reference_ops_from_call): Set with_bounds field for instrumented calls. * tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore CALL_WITH_BOUNDS_P flag for calls. * tree-ssa-ccp.c: Include tree-chkp.h. (insert_clobber_before_stack_restore): Handle BUILT_IN_CHKP_BNDRET calls. * tree-ssa-dce.c: Include tree-chkp.h. (propagate_necessity): For free call fed by alloc check bounds are also provided by the same alloc. (eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET used by free calls. * tree-inline.c: Include tree-chkp.h. (declare_return_variable): Add arg holding returned bounds slot. Create and initialize returned bounds var. (remap_gimple_stmt): Handle returned bounds. Return sequence of statements instead of a single statement. (insert_init_stmt): Add declaration. (remap_gimple_seq): Adjust to new remap_gimple_stmt signature. (copy_bb): Adjust to changed return type of remap_gimple_stmt. Properly handle bounds in va_arg_pack and va_arg_pack_len. (expand_call_inline): Handle returned bounds. Add bounds copy for generated mem to mem assignments. * tree-inline.h (copy_body_data): Add fields retbnd and assign_stmts. * value-prof.c: Include tree-chkp.h. (gimple_ic): Support returned bounds. * ipa.c (cgraph_build_static_cdtor_1): Support contructors with "chkp ctor" and "bnd_legacy" attributes. (symtab_remove_unreachable_nodes): Keep initial values for pointer bounds to be used for checks eliminations. (process_references): Handle IPA_REF_CHKP. (walk_polymorphic_call_targets): Likewise. * ipa-visibility.c (cgraph_externally_visible_p): Mark instrumented 'main' as externally visible. (function_and_variable_visibility): Filter instrumentation thunks. * cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args field. (cgraph_node): Add instrumented_version, orig_decl and instrumentation_clone fields. (symtab_node::get_alias_target): Allow IPA_REF_CHKP reference. (varpool_node): Add need_bounds_init field. (cgraph_local_p): New. * cgraph.c: Include tree-chkp.h. (cgraph_node::remove): Fix instrumented_version of the referenced node if any. (cgraph_node::dump): Dump instrumentation_clone and instrumented_version fields. (cgraph_node::verify_node): Check correctness of IPA_REF_CHKP references and instrumentation thunks. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep all not instrumented instrumentation clones alive. (cgraph_redirect_edge_call_stmt_to_callee): Support returned bounds. * cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP reference. (cgraph_rebuild_references): Likewise. * cgraphunit.c: Include tree-chkp.h. (assemble_thunks_and_aliases): Skip thunks calling instrumneted function version. (varpool_finalize_decl): Register statically initialized decls in Pointer Bounds Checker. (walk_polymorphic_call_targets): Do not mark generated call to __builtin_unreachable as with_bounds. (output_weakrefs): If there are both instrumented and original versions, output only one of them. (cgraph_node::expand_thunk): Set with_bounds flag for created call statement. * ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP. (ipa_ref): increase size of use field. * symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP. * varpool.c (dump_varpool_node): Dump need_bounds_init field. (ctor_for_folding): Do not fold constant bounds vars. * lto-streamer.h (LTO_minor_version): Change minor version from 0 to 1. * lto-cgraph.c (compute_ltrans_boundary): Keep initial values for pointer bounds. (lto_output_node): Output instrumentation_clone, thunk.add_pointer_bounds_args and orig_decl field. (lto_output_ref): Adjust to new ipa_ref::use field size. (input_overwrite_node): Read instrumentation_clone field. (input_node): Read thunk.add_pointer_bounds_args and orig_decl fields. (input_ref): Adjust to new ipa_ref::use field size. (input_cgraph_1): Compute instrumented_version fields and restore IDENTIFIER_TRANSPARENT_ALIAS chains. (lto_output_varpool_node): Output need_bounds_init value. (input_varpool_node): Read need_bounds_init value. * lto-partition.c (add_symbol_to_partition_1): Keep original and instrumented versions together. (privatize_symbol_name): Restore transparent alias chain if required. (add_references_to_partition): Add references to pointer bounds vars. * dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE. * dwarf2out.c (gen_subprogram_die): Ignore bound args. (gen_type_die_with_usage): Skip pointer bounds. (dwarf2out_global_decl): Likewise. (is_base_type): Support POINTER_BOUNDS_TYPE. (gen_formal_types_die): Skip pointer bounds. (gen_decl_die): Likewise. * var-tracking.c (vt_add_function_parameters): Skip bounds parameters. * ipa-icf.c (sem_function::merge): Do not merge when instrumentation thunk still exists. (sem_variable::merge): Reset need_bounds_init flag. * doc/extend.texi: Document Pointer Bounds Checker built-in functions and attributes. * doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_BOUND_TYPE): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. * doc/tm.texi: Regenerated. * doc/rtl.texi (MODE_POINTER_BOUNDS): New. (BND32mode): New. (BND64mode): New. * doc/invoke.texi (-mmpx): New. (-mno-mpx): New. (chkp-max-ctor-size): New. * config/i386/constraints.md (w): New. (Ti): New. (Tb): New. * config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__. * config/i386/i386-modes.def (BND32): New. (BND64): New. * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New. * config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h. (regclass_map): Add bound registers. (dbx_register_map): Likewise. (dbx64_register_map): Likewise. (svr4_dbx_register_map): Likewise. (isa_opts): Add -mmpx. (PTA_MPX): New. (ix86_option_override_internal): Support MPX ISA. (ix86_conditional_register_usage): Support bound registers. (ix86_code_end): Add MPX bnd prefix. (output_set_got): Likewise. (print_reg): Avoid prefixes for bound registers. (ix86_print_operand): Add '!' (MPX bnd) print prefix support. (ix86_print_operand_punct_valid_p): Likewise. (ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and UNSPEC_BNDLDX_ADDR. (ix86_output_call_insn): Add MPX bnd prefix to branch instructions. (ix86_class_likely_spilled_p): Add bound regs support. (ix86_hard_regno_mode_ok): Likewise. (x86_order_regs_for_local_alloc): Likewise. (ix86_bnd_prefixed_insn_p): New. (ix86_builtins): Add IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (builtin_isa): Add leaf_p and nothrow_p fields. (def_builtin): Initialize leaf_p and nothrow_p. (ix86_add_new_builtins): Handle leaf_p and nothrow_p flags. (bdesc_mpx): New. (bdesc_mpx_const): New. (ix86_init_mpx_builtins): New. (ix86_init_builtins): Call ix86_init_mpx_builtins. (ix86_emit_cmove): New. (ix86_emit_move_max): New. (ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER. (ix86_function_value_bounds): New. (ix86_builtin_mpx_function): New. (ix86_get_arg_address_for_bt): New. (ix86_load_bounds): New. (ix86_store_bounds): New. (ix86_load_returned_bounds): New. (ix86_store_returned_bounds): New. (ix86_mpx_bound_mode): New. (ix86_make_bounds_constant): New. (ix86_initialize_bounds): (TARGET_LOAD_BOUNDS_FOR_ARG): New. (TARGET_STORE_BOUNDS_FOR_ARG): New. (TARGET_LOAD_RETURNED_BOUNDS): New. (TARGET_STORE_RETURNED_BOUNDS): New. (TARGET_CHKP_BOUND_MODE): New. (TARGET_BUILTIN_CHKP_FUNCTION): New. (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New. (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New. (TARGET_CHKP_INITIALIZE_BOUNDS): New. (ix86_option_override_internal): Do not support x32 with MPX. (init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt and force_bnd_pass. (function_arg_advance_32): Return number of used integer registers. (function_arg_advance_64): Likewise. (function_arg_advance_ms_64): Likewise. (ix86_function_arg_advance): Handle pointer bounds. (ix86_function_arg): Likewise. (ix86_function_value_regno_p): Mark fisrt bounds registers as possible function value. (ix86_function_value_1): Handle pointer bounds type/mode (ix86_return_in_memory): Likewise. (ix86_print_operand): Analyse insn to decide abounf "bnd" prefix. (ix86_expand_call): Generate returned bounds. (ix86_setup_incoming_vararg_bounds): New. (ix86_va_start): Initialize bounds for pointers in va_list. (TARGET_SETUP_INCOMING_VARARG_BOUNDS): New. * config/i386/i386.h (TARGET_MPX): New. (TARGET_MPX_P): New. (FIRST_PSEUDO_REGISTER): Fix to new value. (FIXED_REGISTERS): Add bound registers. (CALL_USED_REGISTERS): Likewise. (REG_ALLOC_ORDER): Likewise. (HARD_REGNO_NREGS): Likewise. (VALID_BND_REG_MODE): New. (FIRST_BND_REG): New. (LAST_BND_REG): New. (reg_class): Add BND_REGS. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (BND_REGNO_P): New. (ANY_BND_REG_P): New. (BNDmode): New. (HI_REGISTER_NAMES): Add bound registers. (ix86_args): Add bnd_regno, bnds_in_bt, force_bnd_pass and stdarg fields. * config/i386/i386.md (UNSPEC_BNDMK): New. (UNSPEC_BNDMK_ADDR): New. (UNSPEC_BNDSTX): New. (UNSPEC_BNDLDX): New. (UNSPEC_BNDLDX_ADDR): New. (UNSPEC_BNDCL): New. (UNSPEC_BNDCU): New. (UNSPEC_BNDCN): New. (UNSPEC_MPX_FENCE): New. (UNSPEC_SIZEOF): New. (BND0_REG): New. (BND1_REG): New. (type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (prefix_rep): Check for bnd prefix. (prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (length_nobnd): New. (length): Use length_nobnd when specified. (memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst. (BND): New. (bnd_ptr): New. (BNDCHECK): New. (bndcheck): New. (*jcc_1): Add MPX bnd prefix. (*jcc_2): Likewise. (jump): Likewise. (*indirect_jump): Likewise. (*tablejump_1): Likewise. (simple_return_internal): Likewise. (simple_return_internal_long): Likewise. (simple_return_pop_internal): Likewise. (simple_return_indirect_internal): Likewise. (<mode>_mk): New. (*<mode>_mk): New. (mov<mode>): New. (*mov<mode>_internal_mpx): New. (<mode>_<bndcheck>): New. (*<mode>_<bndcheck>): New. (<mode>_ldx): New. (*<mode>_ldx): New. (<mode>_stx): New. (*<mode>_stx): New. move_size_reloc_<mode>): New. * config/i386/predicates.md (address_mpx_no_base_operand): New. (address_mpx_no_index_operand): New. (bnd_mem_operator): New. (symbol_operand): New. (x86_64_immediate_size_operand): New. * config/i386/i386.opt (mmpx): New. * config/i386/i386-builtin-types.def (BND): New. (ULONG): New. (BND_FTYPE_PCVOID_ULONG): New. (VOID_FTYPE_BND_PCVOID): New. (VOID_FTYPE_PCVOID_PCVOID_BND): New. (BND_FTYPE_PCVOID_PCVOID): New. (BND_FTYPE_PCVOID): New. (BND_FTYPE_BND_BND): New. (PVOID_FTYPE_PVOID_PVOID_ULONG): New. (PVOID_FTYPE_PCVOID_BND_ULONG): New. (ULONG_FTYPE_VOID): New. (PVOID_FTYPE_BND): New. gcc/testsuite/ 2014-11-05 Ilya Enkovich <ilya.enkovich@intel.com> * gcc.target/i386/chkp-builtins-1.c: New. * gcc.target/i386/chkp-builtins-2.c: New. * gcc.target/i386/chkp-builtins-3.c: New. * gcc.target/i386/chkp-builtins-4.c: New. * gcc.target/i386/chkp-remove-bndint-1.c: New. * gcc.target/i386/chkp-remove-bndint-2.c: New. * gcc.target/i386/chkp-const-check-1.c: New. * gcc.target/i386/chkp-const-check-2.c: New. * gcc.target/i386/chkp-lifetime-1.c: New. * gcc.dg/pr37858.c: Replace early_local_cleanups pass name with build_ssa_passes. From-SVN: r217125
2014-11-05 13:42:03 +01:00
/* Static constant bounds are created to be
used instead of constants and therefore
do not let folding it. */
if (POINTER_BOUNDS_P (decl))
return error_mark_node;
if (TREE_CODE (decl) == CONST_DECL
|| DECL_IN_CONSTANT_POOL (decl))
return DECL_INITIAL (decl);
if (TREE_THIS_VOLATILE (decl))
return error_mark_node;
/* Do not care about automatic variables. Those are never initialized
anyway, because gimplifier exapnds the code. */
if (!TREE_STATIC (decl) && !DECL_EXTERNAL (decl))
{
gcc_assert (!TREE_PUBLIC (decl));
return error_mark_node;
}
gcc_assert (TREE_CODE (decl) == VAR_DECL);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
real_node = node = varpool_node::get (decl);
if (node)
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
real_node = node->ultimate_alias_target ();
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
real_decl = real_node->decl;
}
else
real_decl = decl;
/* See if we are dealing with alias.
In most cases alias is just alternative symbol pointing to a given
constructor. This allows us to use interposition rules of DECL
constructor of REAL_NODE. However weakrefs are special by being just
alternative name of their target (if defined). */
if (decl != real_decl)
{
gcc_assert (!DECL_INITIAL (decl)
|| (node->alias && node->get_alias_target () == real_node)
|| DECL_INITIAL (decl) == error_mark_node);
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2) PR ipa/61886 * symtab.c (ultimate_transparent_alias_target): New inline function. (symbol_table::assembler_names_equal_p): New method; break out from ... (symbol_table::decl_assembler_name_equal): ... here. (symbol_table::change_decl_assembler_name): Also update names and translation links of transparent aliases. (symtab_node::dump_base): Dump transparent_alias. (symtab_node::verify_base): Implement basic transparent alias verification. (symtab_node::make_decl_local): Support localization of weakrefs; recurse to transparent aliases; set TREE_STATIC. (symtab_node::ultimate_alias_target_1): Handle visibility of transparent aliases. (symtab_node::resolve_alias): New parmaeter transparent; handle transparent aliases; recurse to aliases of aliases to fix comdat groups. (symtab_node::get_partitioning_class): Handle transparent aliases. * ipa-visibility.c (cgraph_externally_visible_p, varpool_node::externally_visible_p): Visibility of transparent alias depends on its target. (function_and_variable_visibility): Do not tweak visibility of transparent laiases. (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Clear transparent_alias flag. * alias.c (cgraph_node::create_alias, cgraph_node::get_availability): Support transparent aliases. * cgraph.h (symtab_node): Update prototype of resolve_alias; add transparent_alias flag. (symbol_table: Add assembler_names_equal_p. (symtab_node::real_symbol_p): Skip transparent aliases. * cgraphunit.c (cgraph_node::reset): Reset transparent_alias flag. (handle_alias_pairs): Set transparent_alias for weakref. (cgraph_node::assemble_thunks_and_aliases): Do not asemble transparent aliases. * lto-cgraph.c (lto_output_node): When outputting same_comdat_group skip symbols not put into boundary; stream transparent_alias. (lto_output_varpool_node): Likewise. (input_overwrite_node, input_varpool_node): Stream transparent alias. * varpool.c (ctor_for_folding, varpool_node::get_availability, varpool_node::assemble_aliases, symbol_table::remove_unreferenced_decls): Handle transparent aliase. (varpool_node::create_alias): Set transparent_alias. * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol, rename_statics, rename_statics): Handle transparent aliases. From-SVN: r231373
2015-12-07 18:36:54 +01:00
while (node->transparent_alias && node->analyzed)
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
node = node->get_alias_target ();
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
decl = node->decl;
}
}
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
if ((!DECL_VIRTUAL_P (real_decl)
|| DECL_INITIAL (real_decl) == error_mark_node
|| !DECL_INITIAL (real_decl))
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
&& (!node || !node->ctor_useable_for_folding_p ()))
return error_mark_node;
vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h * vapool.c: Include tree-ssa-alias.h, gimple.h and lto-streamer.h (varpool_get_constructor): New function. (varpool_ctor_useable_for_folding_p): Break out from ... (ctor_for_folding): ... here; use varpool_get_constructor. (varpool_assemble_decl): Likewise. * lto-streamer.h (struct output_block): Turn cgraph_node to symbol filed. (lto_input_variable_constructor): Declare. * ipa-visibility.c (function_and_variable_visibility): Use varpool_get_constructor. * cgraph.h (varpool_get_constructor): Declare. (varpool_ctor_useable_for_folding_p): New function. * lto-streamer-out.c (get_symbol_initial_value): Take encoder parameter; return error_mark_node for non-trivial constructors. (lto_write_tree_1, DFS_write_tree): UPdate use of get_symbol_initial_value. (output_function): Update initialization of symbol. (output_constructor): New function. (copy_function): Rename to .. (copy_function_or_variable): ... this one; handle vars too. (lto_output): Output variable sections. * lto-streamer-in.c (input_constructor): New function. (lto_read_body): Rename from ... (lto_read_body_or_constructor): ... this one; handle vars too. (lto_input_variable_constructor): New function. * ipa-prop.c (ipa_prop_write_jump_functions, ipa_prop_write_all_agg_replacement): Update. * lto-cgraph.c (compute_ltrans_boundary): Use it. (output_cgraph_opt_summary): Set symbol to NULL. * lto-partition.c (add_references_to_partition): Use varpool_ctor_useable_for_folding_p. * lto.c (lto_read_in_decl_state): Update sanity check. From-SVN: r212467
2014-07-11 19:43:44 +02:00
/* OK, we can return constructor. See if we need to fetch it from disk
in LTO mode. */
if (DECL_INITIAL (real_decl) != error_mark_node
|| !in_lto_p)
return DECL_INITIAL (real_decl);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
return real_node->get_constructor ();
}
sw-1.c: Force rep;movsb. * gcc.target/i386/sw-1.c: Force rep;movsb. * config/i386/i386.h (processor_costs): Add second dimension to stringop_algs array. * config/i386/i386.c (cost models): Initialize second dimension of stringop_algs arrays. (core_cost): New costs based on generic64 costs with updated stringop values. (promote_duplicated_reg): Add support for vector modes, add declaration. (promote_duplicated_reg_to_size): Likewise. (processor_target): Set core costs for core variants. (expand_set_or_movmem_via_loop_with_iter): New function. (expand_set_or_movmem_via_loop): Enable reuse of the same iters in different loops, produced by this function. (emit_strset): New function. (expand_movmem_epilogue): Add epilogue generation for bigger sizes, use SSE-moves where possible. (expand_setmem_epilogue): Likewise. (expand_movmem_prologue): Likewise for prologue. (expand_setmem_prologue): Likewise. (expand_constant_movmem_prologue): Likewise. (expand_constant_setmem_prologue): Likewise. (decide_alg): Add new argument align_unknown. Fix algorithm of strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop (decide_alignment): Update desired alignment according to chosen move mode. (ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves. (ix86_expand_setmem): Likewise. (ix86_slow_unaligned_access): Implementation of new hook slow_unaligned_access. * config/i386/i386.md (strset): Enable half-SSE moves. * config/i386/sse.md (vec_dupv4si): Add expand for vec_dupv4si. (vec_dupv2di): Add expand for vec_dupv2di. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r181357
2011-11-14 18:28:11 +01:00
/* Add the variable DECL to the varpool.
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
Unlike finalize_decl function is intended to be used
sw-1.c: Force rep;movsb. * gcc.target/i386/sw-1.c: Force rep;movsb. * config/i386/i386.h (processor_costs): Add second dimension to stringop_algs array. * config/i386/i386.c (cost models): Initialize second dimension of stringop_algs arrays. (core_cost): New costs based on generic64 costs with updated stringop values. (promote_duplicated_reg): Add support for vector modes, add declaration. (promote_duplicated_reg_to_size): Likewise. (processor_target): Set core costs for core variants. (expand_set_or_movmem_via_loop_with_iter): New function. (expand_set_or_movmem_via_loop): Enable reuse of the same iters in different loops, produced by this function. (emit_strset): New function. (expand_movmem_epilogue): Add epilogue generation for bigger sizes, use SSE-moves where possible. (expand_setmem_epilogue): Likewise. (expand_movmem_prologue): Likewise for prologue. (expand_setmem_prologue): Likewise. (expand_constant_movmem_prologue): Likewise. (expand_constant_setmem_prologue): Likewise. (decide_alg): Add new argument align_unknown. Fix algorithm of strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop (decide_alignment): Update desired alignment according to chosen move mode. (ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves. (ix86_expand_setmem): Likewise. (ix86_slow_unaligned_access): Implementation of new hook slow_unaligned_access. * config/i386/i386.md (strset): Enable half-SSE moves. * config/i386/sse.md (vec_dupv4si): Add expand for vec_dupv4si. (vec_dupv2di): Add expand for vec_dupv2di. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r181357
2011-11-14 18:28:11 +01:00
by middle end and allows insertion of new variable at arbitrary point
of compilation. */
void
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
varpool_node::add (tree decl)
sw-1.c: Force rep;movsb. * gcc.target/i386/sw-1.c: Force rep;movsb. * config/i386/i386.h (processor_costs): Add second dimension to stringop_algs array. * config/i386/i386.c (cost models): Initialize second dimension of stringop_algs arrays. (core_cost): New costs based on generic64 costs with updated stringop values. (promote_duplicated_reg): Add support for vector modes, add declaration. (promote_duplicated_reg_to_size): Likewise. (processor_target): Set core costs for core variants. (expand_set_or_movmem_via_loop_with_iter): New function. (expand_set_or_movmem_via_loop): Enable reuse of the same iters in different loops, produced by this function. (emit_strset): New function. (expand_movmem_epilogue): Add epilogue generation for bigger sizes, use SSE-moves where possible. (expand_setmem_epilogue): Likewise. (expand_movmem_prologue): Likewise for prologue. (expand_setmem_prologue): Likewise. (expand_constant_movmem_prologue): Likewise. (expand_constant_setmem_prologue): Likewise. (decide_alg): Add new argument align_unknown. Fix algorithm of strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop (decide_alignment): Update desired alignment according to chosen move mode. (ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves. (ix86_expand_setmem): Likewise. (ix86_slow_unaligned_access): Implementation of new hook slow_unaligned_access. * config/i386/i386.md (strset): Enable half-SSE moves. * config/i386/sse.md (vec_dupv4si): Add expand for vec_dupv4si. (vec_dupv2di): Add expand for vec_dupv2di. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r181357
2011-11-14 18:28:11 +01:00
{
varpool_node *node;
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::finalize_decl (decl);
node = varpool_node::get_create (decl);
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
symtab->call_varpool_insertion_hooks (node);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (node->externally_visible_p ())
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
node->externally_visible = true;
if (lookup_attribute ("no_reorder", DECL_ATTRIBUTES (decl)))
Add an no_reorder attribute for LTO Some projects need to prevent reordering of specific top level declarations with LTO, in particular declarations defining init calls. The only way to do that with LTO was to use -fno-toplevel-reorder, which stops reordering for all declarations and makes LTO partitioning less efficient. This patch adds a new no_reorder attribute that stops reordering only for the marked declaration. The program can then only mark e.g. the initcalls and leave all the other declarations alone. The patch does: - Adds the new no_reorder attribute for the C family. - Initializes a new no_reorder flag in the symtab_nodes in the function visibility flag. - Maintains the no_reorder flag when creating new nodes. - Changes the partition code to always keep a separate sorted queue of ordered nodes and flush them in order with the other nodes. This is used by all nodes with -fno-toplevel-reorder, and only the marked ones without it. Parts of the old -fno-toplevel-reorder code paths are reused. - Adds various checks throughout the tree to make no_reorder marked functions behave the same as with -fno-toplevel-reorder - Changes the LTO streamer to serialize the no_reorder attribute. gcc/c-family/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * c-common.c (handle_no_reorder_attribute): New function. (c_common_attribute_table): Add no_reorder attribute. gcc/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * cgraph.h (symtab_node): Add no_reorder attribute. (symbol_table::output_asm_statements): Remove. * cgraphclones.c (cgraph_node::create_clone): Copy no_reorder. (cgraph_node::create_version_clone): Dito. (symbol_table::output_asm_statements): Remove. * trans-mem.c (ipa_tm_create_version_alias): Dito. * cgraphunit.c (varpool_node::finalize_decl): Check no_reorder. (output_in_order): Add no_reorder flag. Only handle no_reorder nodes when set. (symbol_table::compile): Add separate pass for no_reorder nodes. (process_common_attributes): Set no_reorder flag in symtab node. Add node argument. (process_function_and_variable_attributes): Pass symtab nodes to process_common_attributes. * doc/extend.texi (no_reorder): Document no_reorder attribute. * lto-cgraph.c (lto_output_node): Serialize no_reorder. (lto_output_varpool_node): Dito. (input_overwrite_node): Dito. (input_varpool_node): Dito. * varpool.c (varpool_node::add): Set no_reorder attribute. (symbol_table::remove_unreferenced_decls): Handle no_reorder. (symbol_table::output_variables): Dito. * symtab.c (symtab_node::dump_base): Print no_reorder. gcc/lto/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * lto-partition.c (node_cmp): Update comment. (varpool_node_cmp): Use symtab_node for comparison. (add_sorted_nodes): New function. (lto_balanced_map): Change to keep ordered queue of ordered node. Handle no_reorder attribute. From-SVN: r215537
2014-09-24 05:29:24 +02:00
node->no_reorder = 1;
sw-1.c: Force rep;movsb. * gcc.target/i386/sw-1.c: Force rep;movsb. * config/i386/i386.h (processor_costs): Add second dimension to stringop_algs array. * config/i386/i386.c (cost models): Initialize second dimension of stringop_algs arrays. (core_cost): New costs based on generic64 costs with updated stringop values. (promote_duplicated_reg): Add support for vector modes, add declaration. (promote_duplicated_reg_to_size): Likewise. (processor_target): Set core costs for core variants. (expand_set_or_movmem_via_loop_with_iter): New function. (expand_set_or_movmem_via_loop): Enable reuse of the same iters in different loops, produced by this function. (emit_strset): New function. (expand_movmem_epilogue): Add epilogue generation for bigger sizes, use SSE-moves where possible. (expand_setmem_epilogue): Likewise. (expand_movmem_prologue): Likewise for prologue. (expand_setmem_prologue): Likewise. (expand_constant_movmem_prologue): Likewise. (expand_constant_setmem_prologue): Likewise. (decide_alg): Add new argument align_unknown. Fix algorithm of strategy selection if TARGET_INLINE_ALL_STRINGOPS is set; Skip sse_loop (decide_alignment): Update desired alignment according to chosen move mode. (ix86_expand_movmem): Change unrolled_loop strategy to use SSE-moves. (ix86_expand_setmem): Likewise. (ix86_slow_unaligned_access): Implementation of new hook slow_unaligned_access. * config/i386/i386.md (strset): Enable half-SSE moves. * config/i386/sse.md (vec_dupv4si): Add expand for vec_dupv4si. (vec_dupv2di): Add expand for vec_dupv2di. Co-Authored-By: Jan Hubicka <jh@suse.cz> From-SVN: r181357
2011-11-14 18:28:11 +01:00
}
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* Return variable availability. See cgraph.h for description of individual
return values. */
enum availability
varpool_node::get_availability (symtab_node *ref)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (!definition)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
return AVAIL_NOT_AVAILABLE;
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (!TREE_PUBLIC (decl))
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
return AVAIL_AVAILABLE;
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (DECL_IN_CONSTANT_POOL (decl)
|| DECL_VIRTUAL_P (decl))
return AVAIL_AVAILABLE;
if (transparent_alias && definition)
{
enum availability avail;
ultimate_alias_target (&avail, ref);
return avail;
}
/* If this is a reference from symbol itself and there are no aliases, we
may be sure that the symbol was not interposed by something else because
the symbol itself would be unreachable otherwise. */
if ((this == ref && !has_aliases_p ())
|| (ref && get_comdat_group ()
&& get_comdat_group () == ref->get_comdat_group ()))
return AVAIL_AVAILABLE;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* If the variable can be overwritten, return OVERWRITABLE. Takes
cgraph.h (symtab_node_base): Add definition, alias and analyzed flags... * cgraph.h (symtab_node_base): Add definition, alias and analyzed flags; reorder rest of fields in more consistent way. (varpool_node): Remove analyzed, finalized and alias. (cgraph_ndoe): Likewise. (symtab_alias_ultimate_target): New function. (cgraph_function_node): Move offline. (cgraph_reset_node): Declare. (cgraph_comdat_can_be_unshared_p): Remove. (varpool_remove_initializer): Declare. (varpool_first_defined_variable, varpool_next_defined_variable cgraph_first_defined_function, cgraph_next_defined_function): Update. (cgraph_function_with_gimple_body_p): Update. (varpool_all_refs_explicit_p): Update. (symtab_alias_target): New function. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Rename to ... (cgraph_alias_target, varpool_alias_target): .. this one; simplify. (cgraph_function_or_thunk_node): Simplify using symtab_alias_ultimate_target. (varpool_variable_node): Likewise. * cgraph.c (cgraph_create_function_alias): Update. (cgraph_add_thunk): Update. (cgraph_remove_node): Update. (dump_cgraph_node): Do not dump removed flags. (cgraph_function_body_availability): Update. (cgraph_propagate_frequency): Update. (verify_cgraph_node): Check sanity of local flag. (cgraph_function_node): Move here from cgraph.h; revamp for cgraph_function_or_thunk_node. * lto-symtab.c (lto_varpool_replace_node): Update. (lto_symtab_resolve_can_prevail_p): Update. (lto_symtab_merge_cgraph_nodes): Update. * ipa-cp.c (determine_versionability, initialize_node_lattices, propagate_constants_accross_call, devirtualization_time_bonus, ipcp_propagate_stage): Update. * tree-emutls.c (create_emultls_var, ipa_lower_emutls): Update. * ipa-inline-transform.c (clone_inlined_nodes, preserve_function_body_p): Update. * ipa-reference.c (propagate): Update. (write_node_summary_p): Update. * toplev.c (wrapup_global_declaration_2): Update. * cgraphunit.c (cgraph_analyze_function): Rename to ... (analyze_function) ... this one. (cgraph_process_new_functions): Update. (cgraph_reset_node): Export. (cgraph_finalize_function): Update. (cgraph_add_new_function): Update. (process_function_and_variable_attributes): Update. (varpool_finalize_decl): Update. (symbol_finalized): Remove. (symbol_finalized_and_needed): Rename to ... (symbol_defined_and_needed): ... update. (cgraph_analyze_functions): Update. (handle_alias_pairs): Update. (mark_functions_to_output): Update. (assemble_thunk): Update. (output_in_order): Update. (output_weakrefs): Update. (finalize_compilation_unit): Update. * lto-cgraph.c (reachable_from_other_partition_p, lto_output_node, lto_output_varpool_node, compute_ltrans_boundary, input_overwrite_node, input_node, input_varpool_node): Update. * dbxout.c (dbxout_expand_expr): Update. * cgraphclones.c (cgraph_clone_node): Update. (cgraph_copy_node_for_versioning): Update. (cgraph_materialize_clone): Update. (cgraph_materialize_all_clones): Update. * ipa-pure-const.c (analyze_function, pure_const_write_summary, propagate_pure_const, propagate_nothrow): Update. * lto-streamer-out.c (lto_output, write_symbol): Update. * ipa-utils.c (ipa_reverse_postorder): Update. * ipa-inline.c (can_inline_edge_p): Update. (update_caller_keys, ipa_inline): Update. * dwarf2out.c (reference_to_unused, premark_types_used_by_global_vars_helper): Update. * tree-eh.c (tree_could_trap_p): Update. * ipa-split.c (consider_split, execute_split_functions): Update. * ipa.c (cgraph_non_local_node_p_1, cgraph_local_node_p, has_addr_references_p): Update; move ahead in file for better readability. (process_references): Simplify. (symtab_remove_unreachable_nodes): Update; cleanup way function/var bodies are removed. (cgraph_comdat_can_be_unshared_p): Make static. (cgraph_externally_visible_p): Update. (varpool_externally_visible_p): Update. (function_and_variable_visibility): Update. * trans-mem.c (get_cg_data, ipa_tm_mayenterirr_function, ipa_tm_mark_force_output_node): Update. * ipa-inline-analysis.c (dump_inline_summary, initialize_inline_failed, estimate_edge_devirt_benefit, inline_generate_summary, inline_write_summary): Update. * gimple-fold.c (can_refer_decl_in_current_unit_p): Update. * ipa-prop.c (ipa_compute_jump_functions): Update. (ipa_print_node_params, ipa_prop_read_section, ipa_update_after_lto_read, read_replacements_section): Update. * varasm.c (mark_decl_referenced): Update. (assemble_alias, dump_tm_clone_pairs): Update. * tree-inline.c (copy_bb): Update. (estimate_num_insns, optimize_inline_calls, tree_function_versioning): Update. * symtab.c (dump_symtab_base): Print new flags. (verify_symtab_base): Verify new flags. (symtab_alias_ultimate_target): New function. * tree-ssa-structalias.c (get_constraint_for_ssa_var, create_variable_info_for, associate_varinfo_to_alias, ipa_pta_execute): Update. * passes.c (ipa_write_summaries, ipa_write_optimization_summaries): Update. * i386.c (ix86_get_function_versions_dispatcher, ix86_generate_version_dispatcher_body): Update. (fold_builtin_cpu): Use varpool_add_new_variable. * varpool.c (varpool_remove_initializer): Break out from ... (varpool_remove_node): ... this one. (dump_varpool_node, varpool_node_for_asm, cgraph_variable_initializer_availability, varpool_analyze_node, varpool_assemble_decl, varpool_remove_unreferenced_decls, varpool_finalize_named_section_flags, varpool_create_variable_alias): Update * decl.c (java_mark_decl_local): Update for new symtab flags. * tree.c (cp_fix_function_decl_p): Update for new symtab flags. * decl2.c )var_finalized_p, cp_write_global_declarations): Likewise. * lto.c (has_analyzed_clone_p, lto_materialize_function): Update for new symtab flags. * lto-partition.c (get_symbol_class, lto_balanced_map): Likewise. From-SVN: r199422
2013-05-29 22:42:50 +02:00
care of at least one notable extension - the COMDAT variables
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
used to share template instantiations in C++. */
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (decl_replaceable_p (decl)
|| DECL_EXTERNAL (decl))
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
return AVAIL_INTERPOSABLE;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
return AVAIL_AVAILABLE;
}
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
void
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::analyze (void)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
/* When reading back varpool at LTO time, we re-construct the queue in order
to have "needed" list right by inserting all needed nodes into varpool.
We however don't want to re-analyze already analyzed nodes. */
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (!analyzed)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
gcc_assert (!in_lto_p || symtab->function_flags_ready);
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
/* Compute the alignment early so function body expanders are
already informed about increased alignment. */
align_variable (decl, 0);
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (alias)
resolve_alias (varpool_node::get (alias_target));
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
else if (DECL_INITIAL (decl))
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
record_references_in_initializer (decl, analyzed);
analyzed = true;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
}
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
/* Assemble thunks and aliases associated to varpool node. */
2011-06-18 10:31:03 +02:00
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
void
varpool_node::assemble_aliases (void)
2011-06-18 10:31:03 +02:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
ipa_ref *ref;
IPA REF refactoring * Makefile.in: Removed header file (ipa-ref-inline.h). * cgraph.c (cgraph_turn_edge_to_speculative): New IPA REF function called. (cgraph_speculative_call_info): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_for_node_and_aliases): Likewise. (verify_cgraph_node): Likewise. * cgraph.h: Batch of IPA REF functions become member functions of symtab_node: add_reference, maybe_add_reference, clone_references, clone_referring, clone_reference, find_reference, remove_stmt_references, remove_all_references, remove_all_referring, dump_references, dump_referring, has_alias_p, iterate_reference, iterate_referring. * cgraphbuild.c (record_reference): New IPA REF function used. (record_type_list): Likewise. (record_eh_tables): Likewise. (mark_address): Likewise. (mark_load): Likewise. (mark_store): Likewise. (pass_build_cgraph_edges): Likewise. (rebuild_cgraph_edge): Likewise. (cgraph_rebuild_references): Likewise. (pass_remove_cgraph_callee_edges): Likewise. * cgraphclones.c (cgraph_clone_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_materialize_all_clones): Likewise. * cgraphunit.c (cgraph_reset_node): Likewise. (cgraph_reset_node): Likewise. (analyze_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_function): Likewise. * ipa-comdats.c (propagate_comdat_group): Likewise. (enqueue_references): Likewise. * ipa-cp.c (ipcp_discover_new_direct_edges): Likewise. (create_specialized_node): Likewise. * ipa-devirt.c (referenced_from_vtable_p): Likewise. * ipa-inline-transform.c (can_remove_node_now_p_1): Likewise. * ipa-inline.c (reset_edge_caches): Likewise. (update_caller_keys): Likewise. (execute): Likewise. * ipa-prop.c (remove_described_reference): Likewise. (propagate_controlled_uses): Likewise. (ipa_edge_duplication_hook): Likewise. (ipa_modify_call_arguments): Likewise. * ipa-pure-const.c (propagate_pure_const): Likewise. * ipa-ref-inline.h: Header file removed, functions moved to symtab_node class. * ipa-ref.c (remove_reference): New class member function. (cannot_lead_to_return): New class member function. (referring_ref_list): Likewise. (referred_ref_list): Likewise. Rest of functions moved to symtab_node class. * ipa-ref.h: New member functions remove_reference, cannot_lead_to_return, referring_ref_list, referred_ref_list added to ipa_ref class. ipa_ref_list class has new member functions: first_reference, first_referring, clear, nreferences. * ipa-reference.c (analyze_function): New IPA REF function used. (write_node_summary_p): Likewise. (ipa_reference_write_optimization_summary): Likewise. * ipa-split.c (split_function): Likewise. * ipa-utils.c (ipa_reverse_postorder): Likewise. * ipa-visibility.c (cgraph_non_local_node_p_1): Likewise. (function_and_variable_visibility): Likewise. * ipa.c (has_addr_references_p): Likewise. (process_references): Argument type changed. (symtab_remove_unreachable_nodes): New IPA REF function used. (process_references): Likewise. (set_writeonly_bit): Likewise. * lto-cgraph.c: Implementation of new symtab_node member functions that uses new IPA REF functions. * lto-streamer-in.c (fixup_call_stmt_edges_1): New IPA REF function used. * lto-streamer-out.c (output_symbol_p): Likewise. * lto-streamer.h (referenced_from_this_partition_p): Argument type changed. * lto/lto-partition.c (add_references_to_partition): New IPA REF function used. (add_symbol_to_partition_1): Likewise. (lto_balanced_map): Likewise. * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise. * symtab.c: Implementation of new IPA REF API. * trans-mem.c (ipa_tm_create_version_alias): New IPA REF function used. (ipa_tm_create_version): Likewise. (ipa_tm_execute): Likewise. * tree-emutls.c (gen_emutls_addr): Likewise. * tree-inline.c (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * varpool.c (varpool_remove_unreferenced_decls): Likewise. (varpool_for_node_and_aliases): Likewise. From-SVN: r211987
2014-06-25 18:55:46 +02:00
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
FOR_EACH_ALIAS (this, ref)
{
varpool_node *alias = dyn_cast <varpool_node *> (ref->referring);
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2) PR ipa/61886 * symtab.c (ultimate_transparent_alias_target): New inline function. (symbol_table::assembler_names_equal_p): New method; break out from ... (symbol_table::decl_assembler_name_equal): ... here. (symbol_table::change_decl_assembler_name): Also update names and translation links of transparent aliases. (symtab_node::dump_base): Dump transparent_alias. (symtab_node::verify_base): Implement basic transparent alias verification. (symtab_node::make_decl_local): Support localization of weakrefs; recurse to transparent aliases; set TREE_STATIC. (symtab_node::ultimate_alias_target_1): Handle visibility of transparent aliases. (symtab_node::resolve_alias): New parmaeter transparent; handle transparent aliases; recurse to aliases of aliases to fix comdat groups. (symtab_node::get_partitioning_class): Handle transparent aliases. * ipa-visibility.c (cgraph_externally_visible_p, varpool_node::externally_visible_p): Visibility of transparent alias depends on its target. (function_and_variable_visibility): Do not tweak visibility of transparent laiases. (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Clear transparent_alias flag. * alias.c (cgraph_node::create_alias, cgraph_node::get_availability): Support transparent aliases. * cgraph.h (symtab_node): Update prototype of resolve_alias; add transparent_alias flag. (symbol_table: Add assembler_names_equal_p. (symtab_node::real_symbol_p): Skip transparent aliases. * cgraphunit.c (cgraph_node::reset): Reset transparent_alias flag. (handle_alias_pairs): Set transparent_alias for weakref. (cgraph_node::assemble_thunks_and_aliases): Do not asemble transparent aliases. * lto-cgraph.c (lto_output_node): When outputting same_comdat_group skip symbols not put into boundary; stream transparent_alias. (lto_output_varpool_node): Likewise. (input_overwrite_node, input_varpool_node): Stream transparent alias. * varpool.c (ctor_for_folding, varpool_node::get_availability, varpool_node::assemble_aliases, symbol_table::remove_unreferenced_decls): Handle transparent aliase. (varpool_node::create_alias): Set transparent_alias. * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol, rename_statics, rename_statics): Handle transparent aliases. From-SVN: r231373
2015-12-07 18:36:54 +01:00
if (!alias->transparent_alias)
do_assemble_alias (alias->decl,
DECL_ASSEMBLER_NAME (decl));
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
alias->assemble_aliases ();
}
2011-06-18 10:31:03 +02:00
}
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* Output one variable, if necessary. Return whether we output it. */
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
bool
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::assemble_decl (void)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
/* Aliases are outout when their target is produced or by
output_weakrefs. */
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (alias)
return false;
/* Constant pool is output from RTL land when the reference
survive till this level. */
if (DECL_IN_CONSTANT_POOL (decl) && TREE_ASM_WRITTEN (decl))
return false;
/* Decls with VALUE_EXPR should not be in the varpool at all. They
are not real variables, but just info for debugging and codegen.
Unfortunately at the moment emutls is not updating varpool correctly
after turning real vars into value_expr vars. */
if (DECL_HAS_VALUE_EXPR_P (decl)
&& !targetm.have_tls)
return false;
symtab.c (insert_to_assembler_name_hash): Do not insert register vars. * symtab.c (insert_to_assembler_name_hash): Do not insert register vars. (unlink_from_assembler_name_hash): NULL out pointers of unlinked var. (symtab_prevail_in_asm_name_hash): New. (symtab_initialize_asm_name_hash): Break out from ... (symtab_node_for_asm): ... here. (dump_symtab_base): Dump LTO file data. (verify_symtab_base): Register vars are not in symtab. * cgraph.h (symtab_initialize_asm_name_hash, symtab_prevail_in_asm_name_hash): New functions. (symtab_real_symbol_p): New inline. * lto-symtab.c: Do not include gt-lto-symtab.h. (lto_symtab_entry_def): Remove. (lto_symtab_entry_t): Remove. (lto_symtab_identifiers): Remove. (lto_symtab_free): Remove. (lto_symtab_entry_hash): Remove. (lto_symtab_entry_eq): Remove. (lto_symtab_entry_marked_p): Remove. (lto_symtab_maybe_init_hash_table): Remove. (resolution_guessed_p, set_resolution_guessed): New functions. (lto_symtab_register_decl): Only set resolution info. (lto_symtab_get, lto_symtab_get_resolution): Remove. (lto_symtab_merge): Reorg to work across symtab; do nothing if decls are same. (lto_symtab_resolve_replaceable_p): Reorg to work on symtab. (lto_symtab_resolve_can_prevail_p): Likewise; only real symbols can prevail. (lto_symtab_resolve_symbols): Reorg to work on symtab. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_merge_decls_1): Likewise; add debug dumps. (lto_symtab_merge_decls): Likewise; do not merge at ltrans stage. (lto_symtab_merge_cgraph_nodes_1): Reorg to work on symtab. (lto_symtab_merge_cgraph_nodes): Likewise; do not merge at ltrans stage. (lto_symtab_prevailing_decl): Rewrite to lookup into symtab. * lto-streaer.h (lto_symtab_free): Remove. * lto-cgraph.c (add_references): Cleanup. * varpool.c (varpool_assemble_decl): Skip hard regs. * lto.c (lto_materialize_function): Update confused comment. (read_cgraph_and_symbols): Do not free symtab. From-SVN: r191466
2012-09-19 12:01:56 +02:00
/* Hard register vars do not need to be output. */
if (DECL_HARD_REGISTER (decl))
return false;
gcc_checking_assert (!TREE_ASM_WRITTEN (decl)
&& TREE_CODE (decl) == VAR_DECL
&& !DECL_HAS_VALUE_EXPR_P (decl));
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (!in_other_partition
&& !DECL_EXTERNAL (decl))
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
get_constructor ();
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
assemble_variable (decl, 0, 1, 0);
gcc_assert (TREE_ASM_WRITTEN (decl));
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
gcc_assert (definition);
assemble_aliases ();
/* After the parser has generated debugging information, augment
this information with any new location/etc information that may
have become available after the compilation proper. */
debug_hooks->late_global_decl (decl);
return true;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
}
return false;
}
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
/* Add NODE to queue starting at FIRST.
The queue is linked via AUX pointers and terminated by pointer to 1. */
static void
enqueue_node (varpool_node *node, varpool_node **first)
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
{
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
if (node->aux)
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
return;
gcc_checking_assert (*first);
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
node->aux = *first;
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
*first = node;
}
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* Optimization of function bodies might've rendered some variables as
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
unnecessary so we want to avoid these from being compiled. Re-do
reachability starting from variables that are either externally visible
or was referred from the asm output routines. */
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
void
symbol_table::remove_unreferenced_decls (void)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
varpool_node *next, *node;
varpool_node *first = (varpool_node *)(void *)1;
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
int i;
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
ipa_ref *ref = NULL;
hash_set<varpool_node *> referenced;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
diagnostic-core.h: New. * diagnostic-core.h: New. Contents moved from diagnostic.h and toplev.h. * diagnostic.c: Don't include toplev.h. (progname): Define. Moved from toplev.c. (seen_error): New function. * diagnostic.h: Include diagnostic-core.h. (diagnostic_t, emit_diagnostic): Don't declare here. * toplev.c (progname): Move to toplev.c. (emit_debug_global_declarations, compile_file, finalize, do_compile, toplev_main): Use seen_error. * toplev.h: Include diagnostic-core.h. (trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG, internal_error, warning, warning_at, error, error_n, error_at, fatal_error, pedwarn, permerror, sorry, inform, inform_n, verbatim, fnotice, progname): Move to diagnostic-core.h. * builtins.c: Include diagnostic-core.h instead of diagnostic.h. (expand_builtin_expect): Use seen_error. * c-decl.c: Include diagnostic-core.h instead of diagnostic.h. (c_make_fname_decl, c_write_global_declarations): Use seen_error. * c-format.c: Include diagnostic-core.h instead of diagnostic.h. * c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h. * c-lang.c: Include diagnostic-core.h instead of diagnostic.h. * c-lex.c (c_lex_with_flags, interpret_float): Don't increment errorcount for errors. * c-opts.c (c_common_finish): Use seen_error. * cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * cgraphunit.c (verify_cgraph_node, verify_cgraph, cgraph_output_pending_asms, cgraph_optimize): Use seen_error. * coverage.c: Include diagnostic-core.h instead of diagnostic.h. (get_coverage_counts): Use seen_error. * dwarf2out.c (dwarf2out_finish): Use seen_error. * gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup, gimplify_body): Use seen_error. * ipa-inline.c (cgraph_early_inlining): Use seen_error. * ipa-pure-const.c (gate_pure_const): Use seen_error. * ipa-reference.c (gate_reference): Use seen_error. * jump.c: Include diagnostic-core.h instead of diagnostic.h. * lambda-code.c: Include diagnostic-core.h instead of diagnostic.h. * lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * lto-compress.c: Include diagnostic-core.h instead of diagnostic.h. * lto-section-in.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer-out.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer.c: Include diagnostic-core.h instead of diagnostic.h. (gate_lto_out): Use seen_error. * matrix-reorg.c: Include diagnostic-core.h instead of diagnostic.h. * omega.c: Include diagnostic-core.h instead of diagnostic.h. * omp-low.c: Include diagnostic-core.h instead of diagnostic.h. (gate_expand_omp, lower_omp_1): Use seen_error. * passes.c: Include diagnostic-core.h instead of diagnostic.h. (rest_of_decl_compilation, rest_of_type_compilation, gate_rest_of_compilation, ipa_write_summaries): Use seen_error. * tree-cfg.c (label_to_block_fn): Use seen_error. * tree-inline.c (optimize_inline_calls): Use seen_error. * tree-mudflap.c (mudflap_finish_file): Use seen_error. * tree-optimize.c (gate_all_optimizations, gate_all_early_local_passes, gate_all_early_optimizations): Use seen_error. * tree-ssa-structalias.c (gate_ipa_pta): Use seen_error. * varpool.c: Include diagnostic-core.h instead of diagnostic.h. (varpool_remove_unreferenced_decls, varpool_assemble_pending_decls): Use seen_error. * Makefile.in (DIAGNOSTIC_CORE_H): Define. (TOPLEV_H, DIAGNOSTIC_H): Update. (c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o, lto-streamer-out.o, lto-section-in.o, lto-streamer.o, c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o, builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o, coverage.o, lambda-code.o): Update dependencies. cp: * call.c: Include diagnostic-core.h instead of diagnostic.h. * cp-lang.c: Don't include diagnostic.h * name-lookup.c: Include diagnostic-core.h instead of diagnostic.h. (cp_emit_debug_info_for_using): Use seen_error. * optimize.c: Include diagnostic-core.h instead of diagnostic.h. * parser.c: Include diagnostic-core.h instead of diagnostic.h. * pt.c (iterative_hash_template_arg): Use seen_error. * repo.c: Include diagnostic-core.h instead of diagnostic.h. * typeck2.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o, cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update dependencies. lto: * lto.c: Include diagnostic-core.h instead of diagnostic.h. (read_cgraph_and_symbols, lto_main): Use seen_error. * Make-lang.in (lto/lto.o): Update dependencies. objc: * objc-act.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (objc/objc-act.o): Update dependencies. From-SVN: r159947
2010-05-27 22:16:07 +02:00
if (seen_error ())
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
return;
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (dump_file)
fprintf (dump_file, "Trivially needed variables:");
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
FOR_EACH_DEFINED_VARIABLE (node)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
if (node->analyzed
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
&& (!node->can_remove_if_no_refs_p ()
/* We just expanded all function bodies. See if any of
them needed the variable. */
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
|| DECL_RTL_SET_P (node->decl)))
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
{
enqueue_node (node, &first);
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (dump_file)
fprintf (dump_file, " %s", node->asm_name ());
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
}
}
while (first != (varpool_node *)(void *)1)
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
{
node = first;
first = (varpool_node *)first->aux;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
if (node->same_comdat_group)
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
{
Automated part of renaming of symtab_node_base to symtab_node. gcc/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 with ChangeLog entry fixed up by hand. * cgraph.c (x_cgraph_nodes_queue): Rename symtab_node_base to symtab_node. (cgraph_node_for_asm): Likewise. * cgraph.h (symtab_node_base): Likewise. (cgraph_node): Likewise. (varpool_node): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (is_a_helper <varpool_node>::test): Likewise. (symtab_nodes): Likewise. (symtab_register_node): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (symtab_get_node): Likewise. (symtab_node_for_asm): Likewise. (symtab_node_asm_name): Likewise. (symtab_node_name): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (dump_symtab_node): Likewise. (debug_symtab_node): Likewise. (dump_symtab_base): Likewise. (verify_symtab_node): Likewise. (verify_symtab_base): Likewise. (symtab_used_from_object_file_p): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_nonoverwritable_alias): Likewise. (availability symtab_node_availability): Likewise. (symtab_semantically_equivalent_p): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_prevail_in_asm_name_hash): Likewise. (cgraph): Likewise. (varpool): Likewise. (varpool_first_variable): Likewise. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (symtab_alias_target): Likewise. (symtab_real_symbol_p): Likewise. (symtab_can_be_discarded): Likewise. * cgraphbuild.c (mark_address): Likewise. (mark_load): Likewise. (mark_store): Likewise. * cgraphunit.c (decide_is_symbol_needed): Likewise. (first): Likewise. (enqueue_node): Likewise. (referred_to_p): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. (output_weakrefs): Likewise. (compile): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-prop.c (remove_described_reference): Likewise. (try_decrement_rdesc_refcount): Likewise. (ipa_edge_duplication_hook): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. (ipa_maybe_record_reference): Likewise. (ipa_clone_ref): Likewise. (ipa_clone_references): Likewise. (ipa_clone_referring): Likewise. (ipa_find_reference): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_clear_stmts_in_references): Likewise. * ipa-ref.h (symtab_node_base): Likewise. (ipa_ref): Likewise. (ipa_record_reference): Likewise. (ipa_maybe_record_reference): Likewise. (ipa_clone_references): Likewise. (ipa_clone_referring): Likewise. (ipa_clone_ref): Likewise. (ipa_find_reference): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_clear_stmts_in_references): Likewise. * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise. * ipa.c (enqueue_node): Likewise. (process_references): Likewise. (walk_polymorphic_call_targets): Likewise. (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (comdat_can_be_unshared_p): Likewise. (can_replace_by_local_alias): Likewise. (function_and_variable_visibility): Likewise. * is-a.h: Likewise (within example in comment). * lto-cgraph.c (input_cgraph_opt_summary): Likewise. (lto_symtab_encoder_encode): Likewise. (lto_symtab_encoder_delete_node): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (output_refs): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_node): Likewise. (input_ref): Likewise. (input_edge): Likewise. (input_cgraph_1): Likewise. (input_refs): Likewise. (output_cgraph_opt_summary): Likewise. (input_node_opt_summary): Likewise. (input_cgraph_opt_section): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. (produce_symtab): Likewise. * lto-streamer.h (lto_encoder_entry): Likewise. (lto_free_function_in_decl_state_for_node): Likewise. (lto_symtab_encoder_encode): Likewise. (lto_symtab_encoder_delete_node): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_lookup): Likewise. (lsei_node): Likewise. (lto_symtab_encoder_deref): Likewise. * symtab.c (symtab_hash): Likewise. (assembler_name_hash): Likewise. (symtab_nodes): Likewise. (hash_node): Likewise. (eq_node): Likewise. (hash_node_by_assembler_name): Likewise. (eq_assembler_name): Likewise. (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_prevail_in_asm_name_hash): Likewise. (symtab_register_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_unregister_node): Likewise. (symtab_get_node): Likewise. (symtab_remove_node): Likewise. (symtab_initialize_asm_name_hash): Likewise. (symtab_node_for_asm): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_node_asm_name): Likewise. (symtab_node_name): Likewise. (dump_symtab_base): Likewise. (dump_symtab_node): Likewise. (dump_symtab): Likewise. (debug_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (verify_symtab): Likewise. (symtab_used_from_object_file_p): Likewise. (symtab_node_availability): Likewise. (symtab_alias_ultimate_target): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_resolve_alias): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_semantically_equivalent_p): Likewise. * value-prof.c (init_node_map): Likewise. * varasm.c (find_decl): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/c-family/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename symtab_node_base to symtab_node. gcc/lto/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (add_symbol_to_partition): Rename symtab_node_base to symtab_node. (get_symbol_class): Likewise. (symbol_partitioned_p): Likewise. (add_references_to_partition): Likewise. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition): Likewise. (lto_1_to_1_map): Likewise. (lto_max_map): Likewise. (lto_balanced_map): Likewise. (privatize_symbol_name): Likewise. (promote_symbol): Likewise. (may_need_named_section_p): Likewise. (rename_statics): Likewise. (lto_promote_statics_nonwpa): Likewise. * lto-symtab.c (lto_symtab_merge): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_prevailing_decl): Likewise. * lto.c (lto_wpa_write_files): Likewise. (read_cgraph_and_symbols): Likewise. (do_whole_program_analysis): Likewise. From-SVN: r204279
2013-10-31 22:26:14 +01:00
symtab_node *next;
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
for (next = node->same_comdat_group;
next != node;
next = next->same_comdat_group)
This patch implements generic type query and conversion functions, and applies them to the use of cgraph_node, varpool_node, and symtab_node. The functions are: bool is_a <TYPE> (pointer) Tests whether the pointer actually points to a more derived TYPE. TYPE *as_a <TYPE> (pointer) Converts pointer to a TYPE*. TYPE *dyn_cast <TYPE> (pointer) Converts pointer to TYPE* if and only if "is_a <TYPE> pointer". Otherwise, returns NULL. This function is essentially a checked down cast. These functions reduce compile time and increase type safety when treating a generic item as a more specific item. In essence, the code change is from if (symtab_function_p (node)) { struct cgraph_node *cnode = cgraph (node); .... } to if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { .... } The necessary conditional test defines a variable that holds a known good pointer to the specific item and avoids subsequent conversion calls and the assertion checks that may come with them. When, the property test is embedded within a larger condition, the variable declaration gets pulled out of the condition. (This leaves some room for using the variable inappropriately.) if (symtab_variable_p (node) && varpool (node)->finalized) varpool_analyze_node (varpool (node)); becomes varpool_node *vnode = dyn_cast <varpool_node> (node); if (vnode && vnode->finalized) varpool_analyze_node (vnode); Note that we have converted two sets of assertions in the calls to varpool into safe and efficient use of a variable. There are remaining calls to symtab_function_p and symtab_variable_p that do not involve a pointer to a more specific type. These have been converted to calls to a functions is_a <cgraph_node> and is_a <varpool_node>. The original predicate functions have been removed. The cgraph.h header defined both a struct and a function with the name varpool_node. This name overloading can cause some unintuitive error messages when, as is common in C++, one omits the struct keyword when using the type. I have renamed the function to varpool_node_for_decl. Tested on x86_64. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * is-a.h: New. (is_a <T> (U*)): New. Test for is-a relationship. (as_a <T> (U*)): New. Treat as a derived type. (dyn_cast <T> (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to varpool_node_for_decl. Adjust callers to match. (is_a_helper <cgraph_node>::test (symtab_node_def *)): New. (is_a_helper <varpool_node>::test (symtab_node_def *)): New. (symtab_node_def::try_function): New. Change most calls to symtab_function_p with calls to dyn_cast <cgraph_node> (p). (symtab_node_def::try_variable): New. Change most calls to symtab_variable_p with calls to dyn_cast <varpool_node> (p). (symtab_function_p): Remove. Change callers to use is_a <cgraph_node> (p) instead. (symtab_variable_p): Remove. Change callers to use is_a <varpool_node> (p) instead. * cgraph.c (cgraph_node_for_asm): Remove redundant call to symtab_node_for_asm. * cgraphunit.c (symbol_finalized_and_needed): New. (symbol_finalized): New. (cgraph_analyze_functions): Split complicated conditionals out into above new functions. * Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h. From-SVN: r193051
2012-11-01 00:15:10 +01:00
{
Change is-a.h to support typedefs of pointers gcc/ * is-a.h: Update comments to reflect the following changes to the "pointerness" of the API, making the template parameter match the return type, allowing use of is-a.h with typedefs of pointers. (is_a_helper::cast): Return a T rather then a pointer to a T, so that the return type matches the parameter to the is_a_helper. (as_a): Likewise. (dyn_cast): Likewise. * cgraph.c (cgraph_node_for_asm): Update for removal of implicit pointer from the is-a.h API. * cgraph.h (is_a_helper <cgraph_node>::test): Convert to... (is_a_helper <cgraph_node *>::test): ...this, matching change to is-a.h API. (is_a_helper <varpool_node>::test): Likewise, convert to... (is_a_helper <varpool_node *>::test): ...this. (varpool_first_variable): Update for removal of implicit pointer from the is-a.h API. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_alias_target): Likewise. (varpool_alias_target): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_variable_node): Likewise. (symtab_real_symbol_p): Likewise. * cgraphunit.c (referred_to_p): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimple-ssa.h (gimple_vuse_op): Likewise. (gimple_vdef_op): Likewise. * gimple-streamer-in.c (input_gimple_stmt): Likewise. * gimple.c (gimple_build_asm_1): Likewise. (gimple_build_try): Likewise. (gimple_build_resx): Likewise. (gimple_build_eh_dispatch): Likewise. (gimple_build_omp_for): Likewise. (gimple_omp_for_set_clauses): Likewise. * gimple.h (is_a_helper <gimple_statement_asm>::test): Convert to... (is_a_helper <gimple_statement_asm *>::test): ...this. (is_a_helper <gimple_statement_bind>::test): Convert to... (is_a_helper <gimple_statement_bind *>::test): ...this. (is_a_helper <gimple_statement_call>::test): Convert to... (is_a_helper <gimple_statement_call *>::test): ...this. (is_a_helper <gimple_statement_catch>::test): Convert to... (is_a_helper <gimple_statement_catch *>::test): ...this. (is_a_helper <gimple_statement_resx>::test): Convert to... (is_a_helper <gimple_statement_resx *>::test): ...this. (is_a_helper <gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <gimple_statement_eh_else>::test): Convert to... (is_a_helper <gimple_statement_eh_else *>::test): ...this. (is_a_helper <gimple_statement_eh_filter>::test): Convert to... (is_a_helper <gimple_statement_eh_filter *>::test): ...this. (is_a_helper <gimple_statement_eh_mnt>::test): Convert to... (is_a_helper <gimple_statement_eh_mnt *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <gimple_statement_omp_return>::test): Convert to... (is_a_helper <gimple_statement_omp_return *>::test): ...this. (is_a_helper <gimple_statement_omp_continue>::test): Convert to... (is_a_helper <gimple_statement_omp_continue *>::test): ...this. (is_a_helper <gimple_statement_omp_critical>::test): Convert to... (is_a_helper <gimple_statement_omp_critical *>::test): ...this. (is_a_helper <gimple_statement_omp_for>::test): Convert to... (is_a_helper <gimple_statement_omp_for *>::test): ...this. (is_a_helper <gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <gimple_statement_omp_target>::test): Convert to... (is_a_helper <gimple_statement_omp_target *>::test): ...this. (is_a_helper <gimple_statement_omp_sections>::test): Convert to... (is_a_helper <gimple_statement_omp_sections *>::test): ...this. (is_a_helper <gimple_statement_omp_single>::test): Convert to... (is_a_helper <gimple_statement_omp_single *>::test): ...this. (is_a_helper <gimple_statement_omp_teams>::test): Convert to... (is_a_helper <gimple_statement_omp_teams *>::test): ...this. (is_a_helper <gimple_statement_omp_task>::test): Convert to... (is_a_helper <gimple_statement_omp_task *>::test): ...this. (is_a_helper <gimple_statement_phi>::test): Convert to... (is_a_helper <gimple_statement_phi *>::test): ...this. (is_a_helper <gimple_statement_transaction>::test): Convert to... (is_a_helper <gimple_statement_transaction *>::test): ...this. (is_a_helper <gimple_statement_try>::test): Convert to... (is_a_helper <gimple_statement_try *>::test): ...this. (is_a_helper <gimple_statement_wce>::test): Convert to... (is_a_helper <gimple_statement_wce *>::test): ...this. (is_a_helper <const gimple_statement_asm>::test): Convert to... (is_a_helper <const gimple_statement_asm *>::test): ...this. (is_a_helper <const gimple_statement_bind>::test): Convert to... (is_a_helper <const gimple_statement_bind *>::test): ...this. (is_a_helper <const gimple_statement_call>::test): Convert to... (is_a_helper <const gimple_statement_call *>::test): ...this. (is_a_helper <const gimple_statement_catch>::test): Convert to... (is_a_helper <const gimple_statement_catch *>::test): ...this. (is_a_helper <const gimple_statement_resx>::test): Convert to... (is_a_helper <const gimple_statement_resx *>::test): ...this. (is_a_helper <const gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <const gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <const gimple_statement_eh_filter>::test): Convert to... (is_a_helper <const gimple_statement_eh_filter *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <const gimple_statement_omp_return>::test): Convert to... (is_a_helper <const gimple_statement_omp_return *>::test): ...this. (is_a_helper <const gimple_statement_omp_continue>::test): Convert to... (is_a_helper <const gimple_statement_omp_continue *>::test): ...this. (is_a_helper <const gimple_statement_omp_critical>::test): Convert to... (is_a_helper <const gimple_statement_omp_critical *>::test): ...this. (is_a_helper <const gimple_statement_omp_for>::test): Convert to... (is_a_helper <const gimple_statement_omp_for *>::test): ...this. (is_a_helper <const gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <const gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <const gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <const gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <const gimple_statement_omp_target>::test): Convert to... (is_a_helper <const gimple_statement_omp_target *>::test): ...this. (is_a_helper <const gimple_statement_omp_sections>::test): Convert to... (is_a_helper <const gimple_statement_omp_sections *>::test): ...this. (is_a_helper <const gimple_statement_omp_single>::test): Convert to... (is_a_helper <const gimple_statement_omp_single *>::test): ...this. (is_a_helper <const gimple_statement_omp_teams>::test): Convert to... (is_a_helper <const gimple_statement_omp_teams *>::test): ...this. (is_a_helper <const gimple_statement_omp_task>::test): Convert to... (is_a_helper <const gimple_statement_omp_task *>::test): ...this. (is_a_helper <const gimple_statement_phi>::test): Convert to... (is_a_helper <const gimple_statement_phi *>::test): ...this. (is_a_helper <const gimple_statement_transaction>::test): Convert to... (is_a_helper <const gimple_statement_transaction *>::test): ...this. (is_a_helper <const gimple_statement_with_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_ops *>::test): ...this. (is_a_helper <gimple_statement_with_ops>::test): Convert to... (is_a_helper <gimple_statement_with_ops *>::test): ...this. (is_a_helper <const gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_memory_ops *>::test): ...this. (is_a_helper <gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <gimple_statement_with_memory_ops *>::test): ...this. (gimple_use_ops): Update for removal of implicit pointer from the is-a.h API. (gimple_set_use_ops): Likewise. (gimple_vuse): Likewise. (gimple_vdef): Likewise. (gimple_vuse_ptr): Likewise. (gimple_vdef_ptr): Likewise. (gimple_set_vuse): Likewise. (gimple_set_vdef): Likewise. (gimple_omp_return_set_lhs): Likewise. (gimple_omp_return_lhs): Likewise. (gimple_omp_return_lhs_ptr): Likewise. (gimple_call_fntype): Likewise. (gimple_call_set_fntype): Likewise. (gimple_call_set_internal_fn): Likewise. (gimple_call_use_set): Likewise. (gimple_call_clobber_set): Likewise. (gimple_bind_vars): Likewise. (gimple_bind_set_vars): Likewise. (gimple_bind_body_ptr): Likewise. (gimple_bind_set_body): Likewise. (gimple_bind_add_stmt): Likewise. (gimple_bind_block): Likewise. (gimple_bind_set_block): Likewise. (gimple_asm_ninputs): Likewise. (gimple_asm_noutputs): Likewise. (gimple_asm_nclobbers): Likewise. (gimple_asm_nlabels): Likewise. (gimple_asm_input_op): Likewise. (gimple_asm_input_op_ptr): Likewise. (gimple_asm_output_op): Likewise. (gimple_asm_output_op_ptr): Likewise. (gimple_asm_set_output_op): Likewise. (gimple_asm_clobber_op): Likewise. (gimple_asm_set_clobber_op): Likewise. (gimple_asm_label_op): Likewise. (gimple_asm_set_label_op): Likewise. (gimple_asm_string): Likewise. (gimple_catch_types): Likewise. (gimple_catch_types_ptr): Likewise. (gimple_catch_handler_ptr): Likewise. (gimple_catch_set_types): Likewise. (gimple_catch_set_handler): Likewise. (gimple_eh_filter_types): Likewise. (gimple_eh_filter_types_ptr): Likewise. (gimple_eh_filter_failure_ptr): Likewise. (gimple_eh_filter_set_types): Likewise. (gimple_eh_filter_set_failure): Likewise. (gimple_eh_must_not_throw_fndecl): Likewise. (gimple_eh_must_not_throw_set_fndecl): Likewise. (gimple_eh_else_n_body_ptr): Likewise. (gimple_eh_else_e_body_ptr): Likewise. (gimple_eh_else_set_n_body): Likewise. (gimple_eh_else_set_e_body): Likewise. (gimple_try_eval_ptr): Likewise. (gimple_try_cleanup_ptr): Likewise. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. (gimple_wce_cleanup_ptr): Likewise. (gimple_wce_set_cleanup): Likewise. (gimple_phi_capacity): Likewise. (gimple_phi_num_args): Likewise. (gimple_phi_result): Likewise. (gimple_phi_result_ptr): Likewise. (gimple_phi_set_result): Likewise. (gimple_phi_arg): Likewise. (gimple_phi_set_arg): Likewise. (gimple_resx_region): Likewise. (gimple_resx_set_region): Likewise. (gimple_eh_dispatch_region): Likewise. (gimple_eh_dispatch_set_region): Likewise. (gimple_omp_critical_name): Likewise. (gimple_omp_critical_name_ptr): Likewise. (gimple_omp_critical_set_name): Likewise. (gimple_omp_for_clauses): Likewise. (gimple_omp_for_clauses_ptr): Likewise. (gimple_omp_for_set_clauses): Likewise. (gimple_omp_for_collapse): Likewise. (gimple_omp_for_index): Likewise. (gimple_omp_for_index_ptr): Likewise. (gimple_omp_for_set_index): Likewise. (gimple_omp_for_initial): Likewise. (gimple_omp_for_initial_ptr): Likewise. (gimple_omp_for_set_initial): Likewise. (gimple_omp_for_final): Likewise. (gimple_omp_for_final_ptr): Likewise. (gimple_omp_for_set_final): Likewise. (gimple_omp_for_incr): Likewise. (gimple_omp_for_incr_ptr): Likewise. (gimple_omp_for_set_incr): Likewise. (gimple_omp_for_pre_body_ptr): Likewise. (gimple_omp_for_set_pre_body): Likewise. (gimple_omp_parallel_clauses): Likewise. (gimple_omp_parallel_clauses_ptr): Likewise. (gimple_omp_parallel_set_clauses): Likewise. (gimple_omp_parallel_child_fn): Likewise. (gimple_omp_parallel_child_fn_ptr): Likewise. (gimple_omp_parallel_set_child_fn): Likewise. (gimple_omp_parallel_data_arg): Likewise. (gimple_omp_parallel_data_arg_ptr): Likewise. (gimple_omp_parallel_set_data_arg): Likewise. (gimple_omp_task_clauses): Likewise. (gimple_omp_task_clauses_ptr): Likewise. (gimple_omp_task_set_clauses): Likewise. (gimple_omp_task_child_fn): Likewise. (gimple_omp_task_child_fn_ptr): Likewise. (gimple_omp_task_set_child_fn): Likewise. (gimple_omp_task_data_arg): Likewise. (gimple_omp_task_data_arg_ptr): Likewise. (gimple_omp_task_set_data_arg): Likewise. (gimple_omp_taskreg_clauses): Likewise. (gimple_omp_taskreg_clauses_ptr): Likewise. (gimple_omp_taskreg_set_clauses): Likewise. (gimple_omp_taskreg_child_fn): Likewise. (gimple_omp_taskreg_child_fn_ptr): Likewise. (gimple_omp_taskreg_set_child_fn): Likewise. (gimple_omp_taskreg_data_arg): Likewise. (gimple_omp_taskreg_data_arg_ptr): Likewise. (gimple_omp_taskreg_set_data_arg): Likewise. (gimple_omp_task_copy_fn): Likewise. (gimple_omp_task_copy_fn_ptr): Likewise. (gimple_omp_task_set_copy_fn): Likewise. (gimple_omp_task_arg_size): Likewise. (gimple_omp_task_arg_size_ptr): Likewise. (gimple_omp_task_set_arg_size): Likewise. (gimple_omp_task_arg_align): Likewise. (gimple_omp_task_arg_align_ptr): Likewise. (gimple_omp_task_set_arg_align): Likewise. (gimple_omp_single_clauses): Likewise. (gimple_omp_single_clauses_ptr): Likewise. (gimple_omp_single_set_clauses): Likewise. (gimple_omp_target_clauses): Likewise. (gimple_omp_target_clauses_ptr): Likewise. (gimple_omp_target_set_clauses): Likewise. (gimple_omp_target_child_fn): Likewise. (gimple_omp_target_child_fn_ptr): Likewise. (gimple_omp_target_set_child_fn): Likewise. (gimple_omp_target_data_arg): Likewise. (gimple_omp_target_data_arg_ptr): Likewise. (gimple_omp_target_set_data_arg): Likewise. (gimple_omp_teams_clauses): Likewise. (gimple_omp_teams_clauses_ptr): Likewise. (gimple_omp_teams_set_clauses): Likewise. (gimple_omp_sections_clauses): Likewise. (gimple_omp_sections_clauses_ptr): Likewise. (gimple_omp_sections_set_clauses): Likewise. (gimple_omp_sections_control): Likewise. (gimple_omp_sections_control_ptr): Likewise. (gimple_omp_sections_set_control): Likewise. (gimple_omp_for_set_cond): Likewise. (gimple_omp_for_cond): Likewise. (gimple_omp_atomic_store_set_val): Likewise. (gimple_omp_atomic_store_val): Likewise. (gimple_omp_atomic_store_val_ptr): Likewise. (gimple_omp_atomic_load_set_lhs): Likewise. (gimple_omp_atomic_load_lhs): Likewise. (gimple_omp_atomic_load_lhs_ptr): Likewise. (gimple_omp_atomic_load_set_rhs): Likewise. (gimple_omp_atomic_load_rhs): Likewise. (gimple_omp_atomic_load_rhs_ptr): Likewise. (gimple_omp_continue_control_def): Likewise. (gimple_omp_continue_control_def_ptr): Likewise. (gimple_omp_continue_set_control_def): Likewise. (gimple_omp_continue_control_use): Likewise. (gimple_omp_continue_control_use_ptr): Likewise. (gimple_omp_continue_set_control_use): Likewise. (gimple_transaction_body_ptr): Likewise. (gimple_transaction_label): Likewise. (gimple_transaction_label_ptr): Likewise. (gimple_transaction_set_body): Likewise. (gimple_transaction_set_label): Likewise. * ipa-devirt.c (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. * ipa-reference.c (analyze_function): Likewise. (ipa_reference_write_optimization_summary): Likewise. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. * lto-cgraph.c (lto_output_ref): Likewise. (add_references): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_ref): Likewise. (input_cgraph_1): Likewise. (output_cgraph_opt_summary): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. * lto-streamer.h (lsei_next_function_in_partition): Likewise. (lsei_start_function_in_partition): Likewise. (lsei_next_variable_in_partition): Likewise. (lsei_start_variable_in_partition): Likewise. * symtab.c (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (dump_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (symtab_make_decl_local): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (symtab_get_symbol_partitioning_class): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. (reserve_phi_args_for_new_edge): Likewise. (remove_phi_args): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/lto/ * lto-partition.c (add_references_to_partition): Update for removal of implicit pointer from the is-a.h API. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (undo_partition): Likewise. (lto_balanced_map): Likewise. (promote_symbol): Likewise. * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r209719
2014-04-23 21:06:40 +02:00
varpool_node *vnext = dyn_cast <varpool_node *> (next);
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
if (vnext && vnext->analyzed && !next->comdat_local_p ())
This patch implements generic type query and conversion functions, and applies them to the use of cgraph_node, varpool_node, and symtab_node. The functions are: bool is_a <TYPE> (pointer) Tests whether the pointer actually points to a more derived TYPE. TYPE *as_a <TYPE> (pointer) Converts pointer to a TYPE*. TYPE *dyn_cast <TYPE> (pointer) Converts pointer to TYPE* if and only if "is_a <TYPE> pointer". Otherwise, returns NULL. This function is essentially a checked down cast. These functions reduce compile time and increase type safety when treating a generic item as a more specific item. In essence, the code change is from if (symtab_function_p (node)) { struct cgraph_node *cnode = cgraph (node); .... } to if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { .... } The necessary conditional test defines a variable that holds a known good pointer to the specific item and avoids subsequent conversion calls and the assertion checks that may come with them. When, the property test is embedded within a larger condition, the variable declaration gets pulled out of the condition. (This leaves some room for using the variable inappropriately.) if (symtab_variable_p (node) && varpool (node)->finalized) varpool_analyze_node (varpool (node)); becomes varpool_node *vnode = dyn_cast <varpool_node> (node); if (vnode && vnode->finalized) varpool_analyze_node (vnode); Note that we have converted two sets of assertions in the calls to varpool into safe and efficient use of a variable. There are remaining calls to symtab_function_p and symtab_variable_p that do not involve a pointer to a more specific type. These have been converted to calls to a functions is_a <cgraph_node> and is_a <varpool_node>. The original predicate functions have been removed. The cgraph.h header defined both a struct and a function with the name varpool_node. This name overloading can cause some unintuitive error messages when, as is common in C++, one omits the struct keyword when using the type. I have renamed the function to varpool_node_for_decl. Tested on x86_64. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * is-a.h: New. (is_a <T> (U*)): New. Test for is-a relationship. (as_a <T> (U*)): New. Treat as a derived type. (dyn_cast <T> (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to varpool_node_for_decl. Adjust callers to match. (is_a_helper <cgraph_node>::test (symtab_node_def *)): New. (is_a_helper <varpool_node>::test (symtab_node_def *)): New. (symtab_node_def::try_function): New. Change most calls to symtab_function_p with calls to dyn_cast <cgraph_node> (p). (symtab_node_def::try_variable): New. Change most calls to symtab_variable_p with calls to dyn_cast <varpool_node> (p). (symtab_function_p): Remove. Change callers to use is_a <cgraph_node> (p) instead. (symtab_variable_p): Remove. Change callers to use is_a <varpool_node> (p) instead. * cgraph.c (cgraph_node_for_asm): Remove redundant call to symtab_node_for_asm. * cgraphunit.c (symbol_finalized_and_needed): New. (symbol_finalized): New. (cgraph_analyze_functions): Split complicated conditionals out into above new functions. * Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h. From-SVN: r193051
2012-11-01 00:15:10 +01:00
enqueue_node (vnext, &first);
}
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
}
IPA REF refactoring * Makefile.in: Removed header file (ipa-ref-inline.h). * cgraph.c (cgraph_turn_edge_to_speculative): New IPA REF function called. (cgraph_speculative_call_info): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_for_node_and_aliases): Likewise. (verify_cgraph_node): Likewise. * cgraph.h: Batch of IPA REF functions become member functions of symtab_node: add_reference, maybe_add_reference, clone_references, clone_referring, clone_reference, find_reference, remove_stmt_references, remove_all_references, remove_all_referring, dump_references, dump_referring, has_alias_p, iterate_reference, iterate_referring. * cgraphbuild.c (record_reference): New IPA REF function used. (record_type_list): Likewise. (record_eh_tables): Likewise. (mark_address): Likewise. (mark_load): Likewise. (mark_store): Likewise. (pass_build_cgraph_edges): Likewise. (rebuild_cgraph_edge): Likewise. (cgraph_rebuild_references): Likewise. (pass_remove_cgraph_callee_edges): Likewise. * cgraphclones.c (cgraph_clone_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_materialize_all_clones): Likewise. * cgraphunit.c (cgraph_reset_node): Likewise. (cgraph_reset_node): Likewise. (analyze_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_function): Likewise. * ipa-comdats.c (propagate_comdat_group): Likewise. (enqueue_references): Likewise. * ipa-cp.c (ipcp_discover_new_direct_edges): Likewise. (create_specialized_node): Likewise. * ipa-devirt.c (referenced_from_vtable_p): Likewise. * ipa-inline-transform.c (can_remove_node_now_p_1): Likewise. * ipa-inline.c (reset_edge_caches): Likewise. (update_caller_keys): Likewise. (execute): Likewise. * ipa-prop.c (remove_described_reference): Likewise. (propagate_controlled_uses): Likewise. (ipa_edge_duplication_hook): Likewise. (ipa_modify_call_arguments): Likewise. * ipa-pure-const.c (propagate_pure_const): Likewise. * ipa-ref-inline.h: Header file removed, functions moved to symtab_node class. * ipa-ref.c (remove_reference): New class member function. (cannot_lead_to_return): New class member function. (referring_ref_list): Likewise. (referred_ref_list): Likewise. Rest of functions moved to symtab_node class. * ipa-ref.h: New member functions remove_reference, cannot_lead_to_return, referring_ref_list, referred_ref_list added to ipa_ref class. ipa_ref_list class has new member functions: first_reference, first_referring, clear, nreferences. * ipa-reference.c (analyze_function): New IPA REF function used. (write_node_summary_p): Likewise. (ipa_reference_write_optimization_summary): Likewise. * ipa-split.c (split_function): Likewise. * ipa-utils.c (ipa_reverse_postorder): Likewise. * ipa-visibility.c (cgraph_non_local_node_p_1): Likewise. (function_and_variable_visibility): Likewise. * ipa.c (has_addr_references_p): Likewise. (process_references): Argument type changed. (symtab_remove_unreachable_nodes): New IPA REF function used. (process_references): Likewise. (set_writeonly_bit): Likewise. * lto-cgraph.c: Implementation of new symtab_node member functions that uses new IPA REF functions. * lto-streamer-in.c (fixup_call_stmt_edges_1): New IPA REF function used. * lto-streamer-out.c (output_symbol_p): Likewise. * lto-streamer.h (referenced_from_this_partition_p): Argument type changed. * lto/lto-partition.c (add_references_to_partition): New IPA REF function used. (add_symbol_to_partition_1): Likewise. (lto_balanced_map): Likewise. * lto/lto-symtab.c (lto_cgraph_replace_node): Likewise. * symtab.c: Implementation of new IPA REF API. * trans-mem.c (ipa_tm_create_version_alias): New IPA REF function used. (ipa_tm_create_version): Likewise. (ipa_tm_execute): Likewise. * tree-emutls.c (gen_emutls_addr): Likewise. * tree-inline.c (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * varpool.c (varpool_remove_unreferenced_decls): Likewise. (varpool_for_node_and_aliases): Likewise. From-SVN: r211987
2014-06-25 18:55:46 +02:00
for (i = 0; node->iterate_reference (i, ref); i++)
This patch implements generic type query and conversion functions, and applies them to the use of cgraph_node, varpool_node, and symtab_node. The functions are: bool is_a <TYPE> (pointer) Tests whether the pointer actually points to a more derived TYPE. TYPE *as_a <TYPE> (pointer) Converts pointer to a TYPE*. TYPE *dyn_cast <TYPE> (pointer) Converts pointer to TYPE* if and only if "is_a <TYPE> pointer". Otherwise, returns NULL. This function is essentially a checked down cast. These functions reduce compile time and increase type safety when treating a generic item as a more specific item. In essence, the code change is from if (symtab_function_p (node)) { struct cgraph_node *cnode = cgraph (node); .... } to if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { .... } The necessary conditional test defines a variable that holds a known good pointer to the specific item and avoids subsequent conversion calls and the assertion checks that may come with them. When, the property test is embedded within a larger condition, the variable declaration gets pulled out of the condition. (This leaves some room for using the variable inappropriately.) if (symtab_variable_p (node) && varpool (node)->finalized) varpool_analyze_node (varpool (node)); becomes varpool_node *vnode = dyn_cast <varpool_node> (node); if (vnode && vnode->finalized) varpool_analyze_node (vnode); Note that we have converted two sets of assertions in the calls to varpool into safe and efficient use of a variable. There are remaining calls to symtab_function_p and symtab_variable_p that do not involve a pointer to a more specific type. These have been converted to calls to a functions is_a <cgraph_node> and is_a <varpool_node>. The original predicate functions have been removed. The cgraph.h header defined both a struct and a function with the name varpool_node. This name overloading can cause some unintuitive error messages when, as is common in C++, one omits the struct keyword when using the type. I have renamed the function to varpool_node_for_decl. Tested on x86_64. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * is-a.h: New. (is_a <T> (U*)): New. Test for is-a relationship. (as_a <T> (U*)): New. Treat as a derived type. (dyn_cast <T> (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to varpool_node_for_decl. Adjust callers to match. (is_a_helper <cgraph_node>::test (symtab_node_def *)): New. (is_a_helper <varpool_node>::test (symtab_node_def *)): New. (symtab_node_def::try_function): New. Change most calls to symtab_function_p with calls to dyn_cast <cgraph_node> (p). (symtab_node_def::try_variable): New. Change most calls to symtab_variable_p with calls to dyn_cast <varpool_node> (p). (symtab_function_p): Remove. Change callers to use is_a <cgraph_node> (p) instead. (symtab_variable_p): Remove. Change callers to use is_a <varpool_node> (p) instead. * cgraph.c (cgraph_node_for_asm): Remove redundant call to symtab_node_for_asm. * cgraphunit.c (symbol_finalized_and_needed): New. (symbol_finalized): New. (cgraph_analyze_functions): Split complicated conditionals out into above new functions. * Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h. From-SVN: r193051
2012-11-01 00:15:10 +01:00
{
Change is-a.h to support typedefs of pointers gcc/ * is-a.h: Update comments to reflect the following changes to the "pointerness" of the API, making the template parameter match the return type, allowing use of is-a.h with typedefs of pointers. (is_a_helper::cast): Return a T rather then a pointer to a T, so that the return type matches the parameter to the is_a_helper. (as_a): Likewise. (dyn_cast): Likewise. * cgraph.c (cgraph_node_for_asm): Update for removal of implicit pointer from the is-a.h API. * cgraph.h (is_a_helper <cgraph_node>::test): Convert to... (is_a_helper <cgraph_node *>::test): ...this, matching change to is-a.h API. (is_a_helper <varpool_node>::test): Likewise, convert to... (is_a_helper <varpool_node *>::test): ...this. (varpool_first_variable): Update for removal of implicit pointer from the is-a.h API. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_alias_target): Likewise. (varpool_alias_target): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_variable_node): Likewise. (symtab_real_symbol_p): Likewise. * cgraphunit.c (referred_to_p): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimple-ssa.h (gimple_vuse_op): Likewise. (gimple_vdef_op): Likewise. * gimple-streamer-in.c (input_gimple_stmt): Likewise. * gimple.c (gimple_build_asm_1): Likewise. (gimple_build_try): Likewise. (gimple_build_resx): Likewise. (gimple_build_eh_dispatch): Likewise. (gimple_build_omp_for): Likewise. (gimple_omp_for_set_clauses): Likewise. * gimple.h (is_a_helper <gimple_statement_asm>::test): Convert to... (is_a_helper <gimple_statement_asm *>::test): ...this. (is_a_helper <gimple_statement_bind>::test): Convert to... (is_a_helper <gimple_statement_bind *>::test): ...this. (is_a_helper <gimple_statement_call>::test): Convert to... (is_a_helper <gimple_statement_call *>::test): ...this. (is_a_helper <gimple_statement_catch>::test): Convert to... (is_a_helper <gimple_statement_catch *>::test): ...this. (is_a_helper <gimple_statement_resx>::test): Convert to... (is_a_helper <gimple_statement_resx *>::test): ...this. (is_a_helper <gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <gimple_statement_eh_else>::test): Convert to... (is_a_helper <gimple_statement_eh_else *>::test): ...this. (is_a_helper <gimple_statement_eh_filter>::test): Convert to... (is_a_helper <gimple_statement_eh_filter *>::test): ...this. (is_a_helper <gimple_statement_eh_mnt>::test): Convert to... (is_a_helper <gimple_statement_eh_mnt *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <gimple_statement_omp_return>::test): Convert to... (is_a_helper <gimple_statement_omp_return *>::test): ...this. (is_a_helper <gimple_statement_omp_continue>::test): Convert to... (is_a_helper <gimple_statement_omp_continue *>::test): ...this. (is_a_helper <gimple_statement_omp_critical>::test): Convert to... (is_a_helper <gimple_statement_omp_critical *>::test): ...this. (is_a_helper <gimple_statement_omp_for>::test): Convert to... (is_a_helper <gimple_statement_omp_for *>::test): ...this. (is_a_helper <gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <gimple_statement_omp_target>::test): Convert to... (is_a_helper <gimple_statement_omp_target *>::test): ...this. (is_a_helper <gimple_statement_omp_sections>::test): Convert to... (is_a_helper <gimple_statement_omp_sections *>::test): ...this. (is_a_helper <gimple_statement_omp_single>::test): Convert to... (is_a_helper <gimple_statement_omp_single *>::test): ...this. (is_a_helper <gimple_statement_omp_teams>::test): Convert to... (is_a_helper <gimple_statement_omp_teams *>::test): ...this. (is_a_helper <gimple_statement_omp_task>::test): Convert to... (is_a_helper <gimple_statement_omp_task *>::test): ...this. (is_a_helper <gimple_statement_phi>::test): Convert to... (is_a_helper <gimple_statement_phi *>::test): ...this. (is_a_helper <gimple_statement_transaction>::test): Convert to... (is_a_helper <gimple_statement_transaction *>::test): ...this. (is_a_helper <gimple_statement_try>::test): Convert to... (is_a_helper <gimple_statement_try *>::test): ...this. (is_a_helper <gimple_statement_wce>::test): Convert to... (is_a_helper <gimple_statement_wce *>::test): ...this. (is_a_helper <const gimple_statement_asm>::test): Convert to... (is_a_helper <const gimple_statement_asm *>::test): ...this. (is_a_helper <const gimple_statement_bind>::test): Convert to... (is_a_helper <const gimple_statement_bind *>::test): ...this. (is_a_helper <const gimple_statement_call>::test): Convert to... (is_a_helper <const gimple_statement_call *>::test): ...this. (is_a_helper <const gimple_statement_catch>::test): Convert to... (is_a_helper <const gimple_statement_catch *>::test): ...this. (is_a_helper <const gimple_statement_resx>::test): Convert to... (is_a_helper <const gimple_statement_resx *>::test): ...this. (is_a_helper <const gimple_statement_eh_dispatch>::test): Convert to... (is_a_helper <const gimple_statement_eh_dispatch *>::test): ...this. (is_a_helper <const gimple_statement_eh_filter>::test): Convert to... (is_a_helper <const gimple_statement_eh_filter *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_load>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_load *>::test): ...this. (is_a_helper <const gimple_statement_omp_atomic_store>::test): Convert to... (is_a_helper <const gimple_statement_omp_atomic_store *>::test): ...this. (is_a_helper <const gimple_statement_omp_return>::test): Convert to... (is_a_helper <const gimple_statement_omp_return *>::test): ...this. (is_a_helper <const gimple_statement_omp_continue>::test): Convert to... (is_a_helper <const gimple_statement_omp_continue *>::test): ...this. (is_a_helper <const gimple_statement_omp_critical>::test): Convert to... (is_a_helper <const gimple_statement_omp_critical *>::test): ...this. (is_a_helper <const gimple_statement_omp_for>::test): Convert to... (is_a_helper <const gimple_statement_omp_for *>::test): ...this. (is_a_helper <const gimple_statement_omp_taskreg>::test): Convert to... (is_a_helper <const gimple_statement_omp_taskreg *>::test): ...this. (is_a_helper <const gimple_statement_omp_parallel>::test): Convert to... (is_a_helper <const gimple_statement_omp_parallel *>::test): ...this. (is_a_helper <const gimple_statement_omp_target>::test): Convert to... (is_a_helper <const gimple_statement_omp_target *>::test): ...this. (is_a_helper <const gimple_statement_omp_sections>::test): Convert to... (is_a_helper <const gimple_statement_omp_sections *>::test): ...this. (is_a_helper <const gimple_statement_omp_single>::test): Convert to... (is_a_helper <const gimple_statement_omp_single *>::test): ...this. (is_a_helper <const gimple_statement_omp_teams>::test): Convert to... (is_a_helper <const gimple_statement_omp_teams *>::test): ...this. (is_a_helper <const gimple_statement_omp_task>::test): Convert to... (is_a_helper <const gimple_statement_omp_task *>::test): ...this. (is_a_helper <const gimple_statement_phi>::test): Convert to... (is_a_helper <const gimple_statement_phi *>::test): ...this. (is_a_helper <const gimple_statement_transaction>::test): Convert to... (is_a_helper <const gimple_statement_transaction *>::test): ...this. (is_a_helper <const gimple_statement_with_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_ops *>::test): ...this. (is_a_helper <gimple_statement_with_ops>::test): Convert to... (is_a_helper <gimple_statement_with_ops *>::test): ...this. (is_a_helper <const gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <const gimple_statement_with_memory_ops *>::test): ...this. (is_a_helper <gimple_statement_with_memory_ops>::test): Convert to... (is_a_helper <gimple_statement_with_memory_ops *>::test): ...this. (gimple_use_ops): Update for removal of implicit pointer from the is-a.h API. (gimple_set_use_ops): Likewise. (gimple_vuse): Likewise. (gimple_vdef): Likewise. (gimple_vuse_ptr): Likewise. (gimple_vdef_ptr): Likewise. (gimple_set_vuse): Likewise. (gimple_set_vdef): Likewise. (gimple_omp_return_set_lhs): Likewise. (gimple_omp_return_lhs): Likewise. (gimple_omp_return_lhs_ptr): Likewise. (gimple_call_fntype): Likewise. (gimple_call_set_fntype): Likewise. (gimple_call_set_internal_fn): Likewise. (gimple_call_use_set): Likewise. (gimple_call_clobber_set): Likewise. (gimple_bind_vars): Likewise. (gimple_bind_set_vars): Likewise. (gimple_bind_body_ptr): Likewise. (gimple_bind_set_body): Likewise. (gimple_bind_add_stmt): Likewise. (gimple_bind_block): Likewise. (gimple_bind_set_block): Likewise. (gimple_asm_ninputs): Likewise. (gimple_asm_noutputs): Likewise. (gimple_asm_nclobbers): Likewise. (gimple_asm_nlabels): Likewise. (gimple_asm_input_op): Likewise. (gimple_asm_input_op_ptr): Likewise. (gimple_asm_output_op): Likewise. (gimple_asm_output_op_ptr): Likewise. (gimple_asm_set_output_op): Likewise. (gimple_asm_clobber_op): Likewise. (gimple_asm_set_clobber_op): Likewise. (gimple_asm_label_op): Likewise. (gimple_asm_set_label_op): Likewise. (gimple_asm_string): Likewise. (gimple_catch_types): Likewise. (gimple_catch_types_ptr): Likewise. (gimple_catch_handler_ptr): Likewise. (gimple_catch_set_types): Likewise. (gimple_catch_set_handler): Likewise. (gimple_eh_filter_types): Likewise. (gimple_eh_filter_types_ptr): Likewise. (gimple_eh_filter_failure_ptr): Likewise. (gimple_eh_filter_set_types): Likewise. (gimple_eh_filter_set_failure): Likewise. (gimple_eh_must_not_throw_fndecl): Likewise. (gimple_eh_must_not_throw_set_fndecl): Likewise. (gimple_eh_else_n_body_ptr): Likewise. (gimple_eh_else_e_body_ptr): Likewise. (gimple_eh_else_set_n_body): Likewise. (gimple_eh_else_set_e_body): Likewise. (gimple_try_eval_ptr): Likewise. (gimple_try_cleanup_ptr): Likewise. (gimple_try_set_eval): Likewise. (gimple_try_set_cleanup): Likewise. (gimple_wce_cleanup_ptr): Likewise. (gimple_wce_set_cleanup): Likewise. (gimple_phi_capacity): Likewise. (gimple_phi_num_args): Likewise. (gimple_phi_result): Likewise. (gimple_phi_result_ptr): Likewise. (gimple_phi_set_result): Likewise. (gimple_phi_arg): Likewise. (gimple_phi_set_arg): Likewise. (gimple_resx_region): Likewise. (gimple_resx_set_region): Likewise. (gimple_eh_dispatch_region): Likewise. (gimple_eh_dispatch_set_region): Likewise. (gimple_omp_critical_name): Likewise. (gimple_omp_critical_name_ptr): Likewise. (gimple_omp_critical_set_name): Likewise. (gimple_omp_for_clauses): Likewise. (gimple_omp_for_clauses_ptr): Likewise. (gimple_omp_for_set_clauses): Likewise. (gimple_omp_for_collapse): Likewise. (gimple_omp_for_index): Likewise. (gimple_omp_for_index_ptr): Likewise. (gimple_omp_for_set_index): Likewise. (gimple_omp_for_initial): Likewise. (gimple_omp_for_initial_ptr): Likewise. (gimple_omp_for_set_initial): Likewise. (gimple_omp_for_final): Likewise. (gimple_omp_for_final_ptr): Likewise. (gimple_omp_for_set_final): Likewise. (gimple_omp_for_incr): Likewise. (gimple_omp_for_incr_ptr): Likewise. (gimple_omp_for_set_incr): Likewise. (gimple_omp_for_pre_body_ptr): Likewise. (gimple_omp_for_set_pre_body): Likewise. (gimple_omp_parallel_clauses): Likewise. (gimple_omp_parallel_clauses_ptr): Likewise. (gimple_omp_parallel_set_clauses): Likewise. (gimple_omp_parallel_child_fn): Likewise. (gimple_omp_parallel_child_fn_ptr): Likewise. (gimple_omp_parallel_set_child_fn): Likewise. (gimple_omp_parallel_data_arg): Likewise. (gimple_omp_parallel_data_arg_ptr): Likewise. (gimple_omp_parallel_set_data_arg): Likewise. (gimple_omp_task_clauses): Likewise. (gimple_omp_task_clauses_ptr): Likewise. (gimple_omp_task_set_clauses): Likewise. (gimple_omp_task_child_fn): Likewise. (gimple_omp_task_child_fn_ptr): Likewise. (gimple_omp_task_set_child_fn): Likewise. (gimple_omp_task_data_arg): Likewise. (gimple_omp_task_data_arg_ptr): Likewise. (gimple_omp_task_set_data_arg): Likewise. (gimple_omp_taskreg_clauses): Likewise. (gimple_omp_taskreg_clauses_ptr): Likewise. (gimple_omp_taskreg_set_clauses): Likewise. (gimple_omp_taskreg_child_fn): Likewise. (gimple_omp_taskreg_child_fn_ptr): Likewise. (gimple_omp_taskreg_set_child_fn): Likewise. (gimple_omp_taskreg_data_arg): Likewise. (gimple_omp_taskreg_data_arg_ptr): Likewise. (gimple_omp_taskreg_set_data_arg): Likewise. (gimple_omp_task_copy_fn): Likewise. (gimple_omp_task_copy_fn_ptr): Likewise. (gimple_omp_task_set_copy_fn): Likewise. (gimple_omp_task_arg_size): Likewise. (gimple_omp_task_arg_size_ptr): Likewise. (gimple_omp_task_set_arg_size): Likewise. (gimple_omp_task_arg_align): Likewise. (gimple_omp_task_arg_align_ptr): Likewise. (gimple_omp_task_set_arg_align): Likewise. (gimple_omp_single_clauses): Likewise. (gimple_omp_single_clauses_ptr): Likewise. (gimple_omp_single_set_clauses): Likewise. (gimple_omp_target_clauses): Likewise. (gimple_omp_target_clauses_ptr): Likewise. (gimple_omp_target_set_clauses): Likewise. (gimple_omp_target_child_fn): Likewise. (gimple_omp_target_child_fn_ptr): Likewise. (gimple_omp_target_set_child_fn): Likewise. (gimple_omp_target_data_arg): Likewise. (gimple_omp_target_data_arg_ptr): Likewise. (gimple_omp_target_set_data_arg): Likewise. (gimple_omp_teams_clauses): Likewise. (gimple_omp_teams_clauses_ptr): Likewise. (gimple_omp_teams_set_clauses): Likewise. (gimple_omp_sections_clauses): Likewise. (gimple_omp_sections_clauses_ptr): Likewise. (gimple_omp_sections_set_clauses): Likewise. (gimple_omp_sections_control): Likewise. (gimple_omp_sections_control_ptr): Likewise. (gimple_omp_sections_set_control): Likewise. (gimple_omp_for_set_cond): Likewise. (gimple_omp_for_cond): Likewise. (gimple_omp_atomic_store_set_val): Likewise. (gimple_omp_atomic_store_val): Likewise. (gimple_omp_atomic_store_val_ptr): Likewise. (gimple_omp_atomic_load_set_lhs): Likewise. (gimple_omp_atomic_load_lhs): Likewise. (gimple_omp_atomic_load_lhs_ptr): Likewise. (gimple_omp_atomic_load_set_rhs): Likewise. (gimple_omp_atomic_load_rhs): Likewise. (gimple_omp_atomic_load_rhs_ptr): Likewise. (gimple_omp_continue_control_def): Likewise. (gimple_omp_continue_control_def_ptr): Likewise. (gimple_omp_continue_set_control_def): Likewise. (gimple_omp_continue_control_use): Likewise. (gimple_omp_continue_control_use_ptr): Likewise. (gimple_omp_continue_set_control_use): Likewise. (gimple_transaction_body_ptr): Likewise. (gimple_transaction_label): Likewise. (gimple_transaction_label_ptr): Likewise. (gimple_transaction_set_body): Likewise. (gimple_transaction_set_label): Likewise. * ipa-devirt.c (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. * ipa-reference.c (analyze_function): Likewise. (ipa_reference_write_optimization_summary): Likewise. * ipa.c (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. * lto-cgraph.c (lto_output_ref): Likewise. (add_references): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_ref): Likewise. (input_cgraph_1): Likewise. (output_cgraph_opt_summary): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. * lto-streamer.h (lsei_next_function_in_partition): Likewise. (lsei_start_function_in_partition): Likewise. (lsei_next_variable_in_partition): Likewise. (lsei_start_variable_in_partition): Likewise. * symtab.c (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (dump_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (symtab_make_decl_local): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (symtab_get_symbol_partitioning_class): Likewise. * tree-phinodes.c (allocate_phi_node): Likewise. (reserve_phi_args_for_new_edge): Likewise. (remove_phi_args): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/lto/ * lto-partition.c (add_references_to_partition): Update for removal of implicit pointer from the is-a.h API. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (undo_partition): Likewise. (lto_balanced_map): Likewise. (promote_symbol): Likewise. * lto-symtab.c (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. * lto.c (lto_wpa_write_files): Likewise. From-SVN: r209719
2014-04-23 21:06:40 +02:00
varpool_node *vnode = dyn_cast <varpool_node *> (ref->referred);
This patch implements generic type query and conversion functions, and applies them to the use of cgraph_node, varpool_node, and symtab_node. The functions are: bool is_a <TYPE> (pointer) Tests whether the pointer actually points to a more derived TYPE. TYPE *as_a <TYPE> (pointer) Converts pointer to a TYPE*. TYPE *dyn_cast <TYPE> (pointer) Converts pointer to TYPE* if and only if "is_a <TYPE> pointer". Otherwise, returns NULL. This function is essentially a checked down cast. These functions reduce compile time and increase type safety when treating a generic item as a more specific item. In essence, the code change is from if (symtab_function_p (node)) { struct cgraph_node *cnode = cgraph (node); .... } to if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { .... } The necessary conditional test defines a variable that holds a known good pointer to the specific item and avoids subsequent conversion calls and the assertion checks that may come with them. When, the property test is embedded within a larger condition, the variable declaration gets pulled out of the condition. (This leaves some room for using the variable inappropriately.) if (symtab_variable_p (node) && varpool (node)->finalized) varpool_analyze_node (varpool (node)); becomes varpool_node *vnode = dyn_cast <varpool_node> (node); if (vnode && vnode->finalized) varpool_analyze_node (vnode); Note that we have converted two sets of assertions in the calls to varpool into safe and efficient use of a variable. There are remaining calls to symtab_function_p and symtab_variable_p that do not involve a pointer to a more specific type. These have been converted to calls to a functions is_a <cgraph_node> and is_a <varpool_node>. The original predicate functions have been removed. The cgraph.h header defined both a struct and a function with the name varpool_node. This name overloading can cause some unintuitive error messages when, as is common in C++, one omits the struct keyword when using the type. I have renamed the function to varpool_node_for_decl. Tested on x86_64. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * is-a.h: New. (is_a <T> (U*)): New. Test for is-a relationship. (as_a <T> (U*)): New. Treat as a derived type. (dyn_cast <T> (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to varpool_node_for_decl. Adjust callers to match. (is_a_helper <cgraph_node>::test (symtab_node_def *)): New. (is_a_helper <varpool_node>::test (symtab_node_def *)): New. (symtab_node_def::try_function): New. Change most calls to symtab_function_p with calls to dyn_cast <cgraph_node> (p). (symtab_node_def::try_variable): New. Change most calls to symtab_variable_p with calls to dyn_cast <varpool_node> (p). (symtab_function_p): Remove. Change callers to use is_a <cgraph_node> (p) instead. (symtab_variable_p): Remove. Change callers to use is_a <varpool_node> (p) instead. * cgraph.c (cgraph_node_for_asm): Remove redundant call to symtab_node_for_asm. * cgraphunit.c (symbol_finalized_and_needed): New. (symbol_finalized): New. (cgraph_analyze_functions): Split complicated conditionals out into above new functions. * Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h. From-SVN: r193051
2012-11-01 00:15:10 +01:00
if (vnode
&& !vnode->in_other_partition
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
&& (!DECL_EXTERNAL (ref->referred->decl)
|| vnode->alias)
&& vnode->analyzed)
This patch implements generic type query and conversion functions, and applies them to the use of cgraph_node, varpool_node, and symtab_node. The functions are: bool is_a <TYPE> (pointer) Tests whether the pointer actually points to a more derived TYPE. TYPE *as_a <TYPE> (pointer) Converts pointer to a TYPE*. TYPE *dyn_cast <TYPE> (pointer) Converts pointer to TYPE* if and only if "is_a <TYPE> pointer". Otherwise, returns NULL. This function is essentially a checked down cast. These functions reduce compile time and increase type safety when treating a generic item as a more specific item. In essence, the code change is from if (symtab_function_p (node)) { struct cgraph_node *cnode = cgraph (node); .... } to if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { .... } The necessary conditional test defines a variable that holds a known good pointer to the specific item and avoids subsequent conversion calls and the assertion checks that may come with them. When, the property test is embedded within a larger condition, the variable declaration gets pulled out of the condition. (This leaves some room for using the variable inappropriately.) if (symtab_variable_p (node) && varpool (node)->finalized) varpool_analyze_node (varpool (node)); becomes varpool_node *vnode = dyn_cast <varpool_node> (node); if (vnode && vnode->finalized) varpool_analyze_node (vnode); Note that we have converted two sets of assertions in the calls to varpool into safe and efficient use of a variable. There are remaining calls to symtab_function_p and symtab_variable_p that do not involve a pointer to a more specific type. These have been converted to calls to a functions is_a <cgraph_node> and is_a <varpool_node>. The original predicate functions have been removed. The cgraph.h header defined both a struct and a function with the name varpool_node. This name overloading can cause some unintuitive error messages when, as is common in C++, one omits the struct keyword when using the type. I have renamed the function to varpool_node_for_decl. Tested on x86_64. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * is-a.h: New. (is_a <T> (U*)): New. Test for is-a relationship. (as_a <T> (U*)): New. Treat as a derived type. (dyn_cast <T> (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to varpool_node_for_decl. Adjust callers to match. (is_a_helper <cgraph_node>::test (symtab_node_def *)): New. (is_a_helper <varpool_node>::test (symtab_node_def *)): New. (symtab_node_def::try_function): New. Change most calls to symtab_function_p with calls to dyn_cast <cgraph_node> (p). (symtab_node_def::try_variable): New. Change most calls to symtab_variable_p with calls to dyn_cast <varpool_node> (p). (symtab_function_p): Remove. Change callers to use is_a <cgraph_node> (p) instead. (symtab_variable_p): Remove. Change callers to use is_a <varpool_node> (p) instead. * cgraph.c (cgraph_node_for_asm): Remove redundant call to symtab_node_for_asm. * cgraphunit.c (symbol_finalized_and_needed): New. (symbol_finalized): New. (cgraph_analyze_functions): Split complicated conditionals out into above new functions. * Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h. From-SVN: r193051
2012-11-01 00:15:10 +01:00
enqueue_node (vnode, &first);
else
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2) PR ipa/61886 * symtab.c (ultimate_transparent_alias_target): New inline function. (symbol_table::assembler_names_equal_p): New method; break out from ... (symbol_table::decl_assembler_name_equal): ... here. (symbol_table::change_decl_assembler_name): Also update names and translation links of transparent aliases. (symtab_node::dump_base): Dump transparent_alias. (symtab_node::verify_base): Implement basic transparent alias verification. (symtab_node::make_decl_local): Support localization of weakrefs; recurse to transparent aliases; set TREE_STATIC. (symtab_node::ultimate_alias_target_1): Handle visibility of transparent aliases. (symtab_node::resolve_alias): New parmaeter transparent; handle transparent aliases; recurse to aliases of aliases to fix comdat groups. (symtab_node::get_partitioning_class): Handle transparent aliases. * ipa-visibility.c (cgraph_externally_visible_p, varpool_node::externally_visible_p): Visibility of transparent alias depends on its target. (function_and_variable_visibility): Do not tweak visibility of transparent laiases. (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Clear transparent_alias flag. * alias.c (cgraph_node::create_alias, cgraph_node::get_availability): Support transparent aliases. * cgraph.h (symtab_node): Update prototype of resolve_alias; add transparent_alias flag. (symbol_table: Add assembler_names_equal_p. (symtab_node::real_symbol_p): Skip transparent aliases. * cgraphunit.c (cgraph_node::reset): Reset transparent_alias flag. (handle_alias_pairs): Set transparent_alias for weakref. (cgraph_node::assemble_thunks_and_aliases): Do not asemble transparent aliases. * lto-cgraph.c (lto_output_node): When outputting same_comdat_group skip symbols not put into boundary; stream transparent_alias. (lto_output_varpool_node): Likewise. (input_overwrite_node, input_varpool_node): Stream transparent alias. * varpool.c (ctor_for_folding, varpool_node::get_availability, varpool_node::assemble_aliases, symbol_table::remove_unreferenced_decls): Handle transparent aliase. (varpool_node::create_alias): Set transparent_alias. * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol, rename_statics, rename_statics): Handle transparent aliases. From-SVN: r231373
2015-12-07 18:36:54 +01:00
{
referenced.add (vnode);
while (vnode && vnode->alias && vnode->definition)
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2) PR ipa/61886 * symtab.c (ultimate_transparent_alias_target): New inline function. (symbol_table::assembler_names_equal_p): New method; break out from ... (symbol_table::decl_assembler_name_equal): ... here. (symbol_table::change_decl_assembler_name): Also update names and translation links of transparent aliases. (symtab_node::dump_base): Dump transparent_alias. (symtab_node::verify_base): Implement basic transparent alias verification. (symtab_node::make_decl_local): Support localization of weakrefs; recurse to transparent aliases; set TREE_STATIC. (symtab_node::ultimate_alias_target_1): Handle visibility of transparent aliases. (symtab_node::resolve_alias): New parmaeter transparent; handle transparent aliases; recurse to aliases of aliases to fix comdat groups. (symtab_node::get_partitioning_class): Handle transparent aliases. * ipa-visibility.c (cgraph_externally_visible_p, varpool_node::externally_visible_p): Visibility of transparent alias depends on its target. (function_and_variable_visibility): Do not tweak visibility of transparent laiases. (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Clear transparent_alias flag. * alias.c (cgraph_node::create_alias, cgraph_node::get_availability): Support transparent aliases. * cgraph.h (symtab_node): Update prototype of resolve_alias; add transparent_alias flag. (symbol_table: Add assembler_names_equal_p. (symtab_node::real_symbol_p): Skip transparent aliases. * cgraphunit.c (cgraph_node::reset): Reset transparent_alias flag. (handle_alias_pairs): Set transparent_alias for weakref. (cgraph_node::assemble_thunks_and_aliases): Do not asemble transparent aliases. * lto-cgraph.c (lto_output_node): When outputting same_comdat_group skip symbols not put into boundary; stream transparent_alias. (lto_output_varpool_node): Likewise. (input_overwrite_node, input_varpool_node): Stream transparent alias. * varpool.c (ctor_for_folding, varpool_node::get_availability, varpool_node::assemble_aliases, symbol_table::remove_unreferenced_decls): Handle transparent aliase. (varpool_node::create_alias): Set transparent_alias. * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol, rename_statics, rename_statics): Handle transparent aliases. From-SVN: r231373
2015-12-07 18:36:54 +01:00
{
vnode = vnode->get_alias_target ();
referenced.add (vnode);
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2) PR ipa/61886 * symtab.c (ultimate_transparent_alias_target): New inline function. (symbol_table::assembler_names_equal_p): New method; break out from ... (symbol_table::decl_assembler_name_equal): ... here. (symbol_table::change_decl_assembler_name): Also update names and translation links of transparent aliases. (symtab_node::dump_base): Dump transparent_alias. (symtab_node::verify_base): Implement basic transparent alias verification. (symtab_node::make_decl_local): Support localization of weakrefs; recurse to transparent aliases; set TREE_STATIC. (symtab_node::ultimate_alias_target_1): Handle visibility of transparent aliases. (symtab_node::resolve_alias): New parmaeter transparent; handle transparent aliases; recurse to aliases of aliases to fix comdat groups. (symtab_node::get_partitioning_class): Handle transparent aliases. * ipa-visibility.c (cgraph_externally_visible_p, varpool_node::externally_visible_p): Visibility of transparent alias depends on its target. (function_and_variable_visibility): Do not tweak visibility of transparent laiases. (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Clear transparent_alias flag. * alias.c (cgraph_node::create_alias, cgraph_node::get_availability): Support transparent aliases. * cgraph.h (symtab_node): Update prototype of resolve_alias; add transparent_alias flag. (symbol_table: Add assembler_names_equal_p. (symtab_node::real_symbol_p): Skip transparent aliases. * cgraphunit.c (cgraph_node::reset): Reset transparent_alias flag. (handle_alias_pairs): Set transparent_alias for weakref. (cgraph_node::assemble_thunks_and_aliases): Do not asemble transparent aliases. * lto-cgraph.c (lto_output_node): When outputting same_comdat_group skip symbols not put into boundary; stream transparent_alias. (lto_output_varpool_node): Likewise. (input_overwrite_node, input_varpool_node): Stream transparent alias. * varpool.c (ctor_for_folding, varpool_node::get_availability, varpool_node::assemble_aliases, symbol_table::remove_unreferenced_decls): Handle transparent aliase. (varpool_node::create_alias): Set transparent_alias. * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol, rename_statics, rename_statics): Handle transparent aliases. From-SVN: r231373
2015-12-07 18:36:54 +01:00
}
}
This patch implements generic type query and conversion functions, and applies them to the use of cgraph_node, varpool_node, and symtab_node. The functions are: bool is_a <TYPE> (pointer) Tests whether the pointer actually points to a more derived TYPE. TYPE *as_a <TYPE> (pointer) Converts pointer to a TYPE*. TYPE *dyn_cast <TYPE> (pointer) Converts pointer to TYPE* if and only if "is_a <TYPE> pointer". Otherwise, returns NULL. This function is essentially a checked down cast. These functions reduce compile time and increase type safety when treating a generic item as a more specific item. In essence, the code change is from if (symtab_function_p (node)) { struct cgraph_node *cnode = cgraph (node); .... } to if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) { .... } The necessary conditional test defines a variable that holds a known good pointer to the specific item and avoids subsequent conversion calls and the assertion checks that may come with them. When, the property test is embedded within a larger condition, the variable declaration gets pulled out of the condition. (This leaves some room for using the variable inappropriately.) if (symtab_variable_p (node) && varpool (node)->finalized) varpool_analyze_node (varpool (node)); becomes varpool_node *vnode = dyn_cast <varpool_node> (node); if (vnode && vnode->finalized) varpool_analyze_node (vnode); Note that we have converted two sets of assertions in the calls to varpool into safe and efficient use of a variable. There are remaining calls to symtab_function_p and symtab_variable_p that do not involve a pointer to a more specific type. These have been converted to calls to a functions is_a <cgraph_node> and is_a <varpool_node>. The original predicate functions have been removed. The cgraph.h header defined both a struct and a function with the name varpool_node. This name overloading can cause some unintuitive error messages when, as is common in C++, one omits the struct keyword when using the type. I have renamed the function to varpool_node_for_decl. Tested on x86_64. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * is-a.h: New. (is_a <T> (U*)): New. Test for is-a relationship. (as_a <T> (U*)): New. Treat as a derived type. (dyn_cast <T> (U*)): New. Conditionally cast based on is_a. * cgraph.h (varpool_node): Rename to varpool_node_for_decl. Adjust callers to match. (is_a_helper <cgraph_node>::test (symtab_node_def *)): New. (is_a_helper <varpool_node>::test (symtab_node_def *)): New. (symtab_node_def::try_function): New. Change most calls to symtab_function_p with calls to dyn_cast <cgraph_node> (p). (symtab_node_def::try_variable): New. Change most calls to symtab_variable_p with calls to dyn_cast <varpool_node> (p). (symtab_function_p): Remove. Change callers to use is_a <cgraph_node> (p) instead. (symtab_variable_p): Remove. Change callers to use is_a <varpool_node> (p) instead. * cgraph.c (cgraph_node_for_asm): Remove redundant call to symtab_node_for_asm. * cgraphunit.c (symbol_finalized_and_needed): New. (symbol_finalized): New. (cgraph_analyze_functions): Split complicated conditionals out into above new functions. * Makefile.in (CGRAPH_H): Add is-a.h as used by cgraph.h. From-SVN: r193051
2012-11-01 00:15:10 +01:00
}
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
}
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (dump_file)
fprintf (dump_file, "\nRemoving variables:");
for (node = first_defined_variable (); node; node = next)
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
next = next_defined_variable (node);
Add an no_reorder attribute for LTO Some projects need to prevent reordering of specific top level declarations with LTO, in particular declarations defining init calls. The only way to do that with LTO was to use -fno-toplevel-reorder, which stops reordering for all declarations and makes LTO partitioning less efficient. This patch adds a new no_reorder attribute that stops reordering only for the marked declaration. The program can then only mark e.g. the initcalls and leave all the other declarations alone. The patch does: - Adds the new no_reorder attribute for the C family. - Initializes a new no_reorder flag in the symtab_nodes in the function visibility flag. - Maintains the no_reorder flag when creating new nodes. - Changes the partition code to always keep a separate sorted queue of ordered nodes and flush them in order with the other nodes. This is used by all nodes with -fno-toplevel-reorder, and only the marked ones without it. Parts of the old -fno-toplevel-reorder code paths are reused. - Adds various checks throughout the tree to make no_reorder marked functions behave the same as with -fno-toplevel-reorder - Changes the LTO streamer to serialize the no_reorder attribute. gcc/c-family/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * c-common.c (handle_no_reorder_attribute): New function. (c_common_attribute_table): Add no_reorder attribute. gcc/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * cgraph.h (symtab_node): Add no_reorder attribute. (symbol_table::output_asm_statements): Remove. * cgraphclones.c (cgraph_node::create_clone): Copy no_reorder. (cgraph_node::create_version_clone): Dito. (symbol_table::output_asm_statements): Remove. * trans-mem.c (ipa_tm_create_version_alias): Dito. * cgraphunit.c (varpool_node::finalize_decl): Check no_reorder. (output_in_order): Add no_reorder flag. Only handle no_reorder nodes when set. (symbol_table::compile): Add separate pass for no_reorder nodes. (process_common_attributes): Set no_reorder flag in symtab node. Add node argument. (process_function_and_variable_attributes): Pass symtab nodes to process_common_attributes. * doc/extend.texi (no_reorder): Document no_reorder attribute. * lto-cgraph.c (lto_output_node): Serialize no_reorder. (lto_output_varpool_node): Dito. (input_overwrite_node): Dito. (input_varpool_node): Dito. * varpool.c (varpool_node::add): Set no_reorder attribute. (symbol_table::remove_unreferenced_decls): Handle no_reorder. (symbol_table::output_variables): Dito. * symtab.c (symtab_node::dump_base): Print no_reorder. gcc/lto/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * lto-partition.c (node_cmp): Update comment. (varpool_node_cmp): Use symtab_node for comparison. (add_sorted_nodes): New function. (lto_balanced_map): Change to keep ordered queue of ordered node. Handle no_reorder attribute. From-SVN: r215537
2014-09-24 05:29:24 +02:00
if (!node->aux && !node->no_reorder)
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (dump_file)
fprintf (dump_file, " %s", node->asm_name ());
if (referenced.contains(node))
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
node->remove_initializer ();
else
IPA C++ refactoring 1/N * cgraph.h (symtab_node): (void register_symbol (void)): created from symtab_register_node (void remove (void)): created from symtab_remove_node (void dump (FILE *f)): created from dump_symtab_node (void DEBUG_FUNCTION debug (void)): created from debug_symtab_node (void DEBUG_FUNCTION verify (void)): created from verify_symtab_node (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type)): created from add_reference (struct ipa_ref *add_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple stmt)): created from add_reference (struct ipa_ref *maybe_add_reference (tree val, enum ipa_ref_use use_type, gimple stmt)): created from maybe_add_reference (bool semantically_equivalent_p (symtab_node *target)): created from symtab_semantically_equivalent_p (void remove_from_same_comdat_group (void)): created from remove_from_same_comdat_group (void add_to_same_comdat_group (symtab_node *old_node)): created from symtab_add_to_same_comdat_group (void dissolve_same_comdat_group_list (void)): created from symtab_dissolve_same_comdat_group_list (bool used_from_object_file_p (void)): created from symtab_used_from_object_file_p (symtab_node *ultimate_alias_target (enum availability *avail = NULL)): created from symtab_alias_ultimate_target (inline symtab_node *next_defined_symbol (void)): created from symtab_next_defined_symbol (bool resolve_alias (symtab_node *target)): created from symtab_resolve_alias (bool call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *), void *data, bool include_overwrite)): created from symtab_for_node_and_aliases (symtab_node *noninterposable_alias (void)): created from symtab_nonoverwritable_alias (inline symtab_node *get_alias_target (void)): created from symtab_alias_target (void set_section (const char *section)): created from set_section_1 (enum availability get_availability (void)): created from symtab_node_availability (void make_decl_local (void)): created from symtab_make_decl_local (bool real_symbol_p (void)): created from symtab_read_node (can_be_discarded_p (void)): created from symtab_can_be_discarded (inline bool comdat_local_p (void)): created from symtab_comdat_local_p (inline bool in_same_comdat_group_p (symtab_node *target)): created from symtab_in_same_comdat_p; (bool address_taken_from_non_vtable_p (void)): created from address_taken_from_non_vtable_p (static inline symtab_node *get (const_tree decl)): created from symtab_get_node (static void dump_table (FILE *)): created from dump_symtab (static inline DEBUG_FUNCTION void debug_symtab (void)): created from debug_symtab (static DEBUG_FUNCTION void verify_symtab_nodes (void)): created from verify_symtab (static bool used_from_object_file_p_worker (symtab_node *node)): created from symtab_used_from_object_file_p (void dump_base (FILE *)): created from dump_symtab_base (bool DEBUG_FUNCTION verify_base (void)): created from verify_symtab_base (void unregister (void)): created from symtab_unregister_node (struct symbol_priority_map *priority_info (void)): created from symtab_priority_info (static bool set_implicit_section (symtab_node *n, void *)): created from set_implicit_section (static bool noninterposable_alias (symtab_node *node, void *data)): created from symtab_nonoverwritable_alias_1 * cgraph.h (cgraph_node): (bool remove_symbol_and_inline_clones (cgraph_node *forbidden_node = NULL)): created from cgraph_remove_node_and_inline_clones (void record_stmt_references (gimple stmt)): created from ipa_record_stmt_references (void set_call_stmt_including_clones (gimple old_stmt, gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt_including_clones (cgraph_node *function_symbol (enum availability *avail = NULL)): created from cgraph_function_node (cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, struct cgraph_node *new_inlined_to, bitmap args_to_skip)): created from cgraph_create_clone (cgraph_node *create_virtual_clone (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, const char * suffix)): created from cgraph_create_virtual_clone (cgraph_node *find_replacement (void)): created from cgraph_find_replacement_node (cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, bitmap bbs_to_copy)): created from cgraph_copy_node_for_versioning (cgraph_node *create_version_clone_with_body (vec<cgraph_edge *> redirect_callers, vec<ipa_replace_map *, va_gc> *tree_map, bitmap args_to_skip, bool skip_return, bitmap bbs_to_copy, basic_block new_entry_block, const char *clone_name)): created from cgraph_function_version_info (struct cgraph_function_version_info *insert_new_function_version (void)): created from insert_new_cgraph_node_version (struct cgraph_function_version_info *function_version (void)): created from get_cgraph_node_version (void analyze (void)): created from analyze_function (cgraph_node * create_thunk (tree alias, tree, bool this_adjusting, HOST_WIDE_INT fixed_offset, HOST_WIDE_INT virtual_value, tree virtual_offset, tree real_alias) cgraph_add_thunk (inline cgraph_node *get_alias_target (void)): created from cgraph_alias_target (cgraph_node *ultimate_alias_target (availability *availability = NULL)): created from cgraph_function_or_thunk_node (bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)): created from expand_thunk (void reset (void)): created from cgraph_reset_node (void create_wrapper (cgraph_node *target)): created from cgraph_make_wrapper (void DEBUG_FUNCTION verify_node (void)): created from verify_cgraph_node (void remove (void)): created from cgraph_remove_node (void dump (FILE *f)): created from dump_cgraph_node (void DEBUG_FUNCTION debug (void)): created from debug_cgraph_node (bool get_body (void)): created from cgraph_get_body (void release_body (void)): created from cgraph_release_function_body (void unnest (void)): created from cgraph_unnest_node (void make_local (void)): created from cgraph_make_node_local (void mark_address_taken (void)): created from cgraph_mark_address_taken_node (struct cgraph_edge *create_edge (cgraph_node *callee, gimple call_stmt, gcov_type count, int freq)): created from cgraph_create_edge (struct cgraph_edge *create_indirect_edge (gimple call_stmt, int ecf_flags, gcov_type count, int freq)): created from cgraph_create_indirect_edge (void create_edge_including_clones (struct cgraph_node *callee, gimple old_stmt, gimple stmt, gcov_type count, int freq, cgraph_inline_failed_t reason)): created from cgraph_create_edge_including_clones (cgraph_edge *get_edge (gimple call_stmt)): created from cgraph_edge (vec<cgraph_edge *> collect_callers (void)): created from collect_callers_of_node (void remove_callers (void)): created from cgraph_node_remove_callers (void remove_callees (void)): created from cgraph_node_remove_callees (enum availability get_availability (void)): created from cgraph_function_body_availability (void set_nothrow_flag (bool nothrow)): created from cgraph_set_nothrow_flag (void set_const_flag (bool readonly, bool looping)): created from cgraph_set_const_flag (void set_pure_flag (bool pure, bool looping)): created from cgraph_set_pure_flag (void call_duplication_hooks (cgraph_node *node2)): created from cgraph_call_node_duplication_hooks (bool call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *), void *data, bool include_overwritable)): created from cgraph_for_node_and_aliases (bool call_for_symbol_thunks_and_aliases (bool (*callback) (cgraph_node *node, void *data), void *data, bool include_overwritable)): created from cgraph_for_node_thunks_and_aliases (void call_function_insertion_hooks (void)): created from cgraph_call_function_insertion_hooks (inline void mark_force_output (void)): created from cgraph_mark_force_output_node (bool local_p (void)): created from cgraph_local_node (bool can_be_local_p (void)): created from cgraph_node_can_be_local_p (bool cannot_return_p (void)): created from cgraph_node_cannot_return (bool only_called_directly_p (void)): created from cgraph_only_called_directly_p (inline bool only_called_directly_or_aliased_p (void)): created from cgraph_only_called_directly_or_aliased_p (bool will_be_removed_from_program_if_no_direct_calls_p (void)): created from cgraph_will_be_removed_from_program_if_no_direct_calls (bool can_remove_if_no_direct_calls_and_refs_p (void)): created from cgraph_can_remove_if_no_direct_calls_and_refs_p (bool can_remove_if_no_direct_calls_p (void)): created from cgraph_can_remove_if_no_direct_calls_p (inline bool has_gimple_body_p (void)): created from cgraph_function_with_gimple_body_p (bool optimize_for_size_p (void)): created from cgraph_optimize_for_size_p (static void dump_cgraph (FILE *f)): created from dump_cgraph (static inline void debug_cgraph (void)): created from debug_cgraph (static void record_function_versions (tree decl1, tree decl2)): created from record_function_versions (static void delete_function_version (tree decl)): created from delete_function_version (static void add_new_function (tree fndecl, bool lowered)): created from cgraph_add_new_function (static inline cgraph_node *get (const_tree decl)): created from cgraph_get_node (static cgraph_node * create (tree decl)): created from cgraph_create_node (static cgraph_node * create_empty (void)): created from cgraph_create_empty_node (static cgraph_node * get_create (tree)): created from cgraph_get_create_node (static cgraph_node *get_for_asmname (tree asmname)): created from cgraph_node_for_asm (static cgraph_node * create_same_body_alias (tree alias, tree decl)): created from cgraph_same_body_alias (static bool used_from_object_file_p_worker (cgraph_node *node, void *): new function (static bool non_local_p (cgraph_node *node, void *)): created from cgraph_non_local_node_p_1 (static void DEBUG_FUNCTION verify_cgraph_nodes (void)): created from verify_cgraph (static bool make_local (cgraph_node *node, void *)): created from cgraph_make_node_local (static cgraph_node *create_alias (tree alias, tree target)): created from cgraph_create_function_alias (static cgraph_edge * create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_create_edge_1 * cgraph.h (varpool_node): (void remove (void)): created from varpool_remove_node (void dump (FILE *f)): created from dump_varpool_node From-SVN: r212982
2014-07-24 14:07:13 +02:00
node->remove ();
lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * lto-symtab.c (lto_varpool_replace_node): Do not merge needed flags. * cgraphbuild.c (record_reference, record_type_list, mark_address, mark_load, mark_store): Do not mark varpool nodes as needed. * cgraph.c (cgraph_new_nodes): Remove. (cgraph_create_function_alias): Do not mark nodes as reachable. (cgraph_add_thunk): Likewise. (cgraph_mark_reachable_node): Do not manage the queue. * cgraph.h (cgraph_node): Remove next_needed. (varpool_nodes_queue): Remove next_needed and prev_needed. (x_cgraph_nodes_queue, x_cgraph_nodes_queue, cgraph_new_nodes): Remove. (cgraph_new_nodes): Declare. (x_varpool_nodes_queue, varpool_nodes_queue); Remove. (varpool_analyze_pending_decls): Remove. (varpool_analyze_node): New. (varpool_mark_needed_node): Remove. (varpool_first_variable, varpool_next_variable): New inlines. (varpool_first_static_initializer, varpool_next_static_initializer): Update. (FOR_EACH_STATIC_VARIABLE): Remove unused walker. (varpool_first_defined_variable): New inline. (varpool_next_defined_variable): New inline (FOR_EACH_VARIABLE): Reimplement. (FOR_EACH_DEFINED_VARIABLE): Reimplement. * toplev.c (wrapup_global_declaration_2): Use analyzed instead of needed flag. * cgraphunit.c (cgraph_new_nodes): Declare here. (enqueue_node): New function. (cgraph_process_new_functions): update for new node set; when constructing cgraph enqueue node for processing. (cgraph_add_new_function): Use new node set. (process_function_and_variable_attributes): Do not set varpool needed flags. (referred_to_p): New function. (varpool_finalize_decl): Move here from varpool.c; enqueue needed node when varpool is in construction. (cgraph_analyze_functions): Rewrite. (cgraph_expand_all_functions): Update. (cgraph_output_in_order): Do not analyze pending decls; do not set needed flags. (cgraph_optimize): Do not analyze pending decls. * lto-cgraph.c (input_varpool_node): Clear analyzed flag for objects in other partition; do not mark node as needed. * dwarf2out.c (reference_to_unused): Use analyzed flag. (premark_types_used_by_global_vars_helper): Likewise. * ipa.c (process_references): Do not call varpool_mark_needed_node. (cgraph_remove_unreachable_nodes): Do not rely on varpool and cgrpah queues. (function_and_variable_visibility): Do not mark node as needed. (whole_program_function_and_variable_visibility): Likewise. * Makefile.in (gt-varpool.h): No longer needed. * passes.c (execute_one_pass, execute_ipa_pass_list): Update. (ipa_write_summaries): Do not use needed flag. * varpool.c: Do not include gt-varpool.h (x_varpool_nodes_queue, x_varpool_last_needed_node, x_varpool_last_needed_node, x_varpool_first_unanalyzed_node, x_varpool_first_unanalyzed_node, varpool_assembled_nodes_queue): Remove. (varpool_remove_node): Do not update the lists. (dump_varpool_node): Do not dump needed flag. (varpool_enqueue_needed_node): Remove. (varpool_mark_needed_node): Remove. (varpool_reset_queue): Remove. (varpool_finalize_decl): Move to cgraphunit.c (varpool_analyze_node): New functions based on former varpool_analyze_pending_decls. (varpool_analyze_pending_decls): Remove. (varpool_assemble_decl): Do not update the lists. (enqueue_node): New function. (varpool_remove_unreferenced_decls): Rewrite. (varpool_empty_needed_queue): Remove. (add_new_static_var): Do not mark node as needed. (varpool_create_variable_alias): Handle expansion state creation. * except.c (output_ttype): Do not mark node as needed. * varasm.c (mark_decl_referenced): Do not use mark_needed_node. * tree-profile.c (init_ic_make_global_vars, init_ic_make_global_vars): Likewise. * tree-switch-conversion.c (build_one_array): Likewise. * class.c (build_utf8_ref): Do not mark varpool node as needed. * gcc-interface/utils.c (gnat_write_global_declarations): Do not mark needed node. * lto-partition.c (partition_varpool_node_p): Do not use needed flag. * decl2.c (maybe_make_one_only): Mark keyed COMDATs as USED so they gets finalized. From-SVN: r186687
2012-04-22 23:28:07 +02:00
}
}
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (dump_file)
fprintf (dump_file, "\n");
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
}
/* For variables in named sections make sure get_variable_section
is called before we switch to those sections. Then section
conflicts between read-only and read-only requiring relocations
sections can be resolved. */
void
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::finalize_named_section_flags (void)
{
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
if (!TREE_ASM_WRITTEN (decl)
&& !alias
&& !in_other_partition
&& !DECL_EXTERNAL (decl)
&& TREE_CODE (decl) == VAR_DECL
&& !DECL_HAS_VALUE_EXPR_P (decl)
&& get_section ())
get_variable_section (decl, false);
}
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
/* Output all variables enqueued to be assembled. */
bool
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
symbol_table::output_variables (void)
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
{
bool changed = false;
varpool_node *node;
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
diagnostic-core.h: New. * diagnostic-core.h: New. Contents moved from diagnostic.h and toplev.h. * diagnostic.c: Don't include toplev.h. (progname): Define. Moved from toplev.c. (seen_error): New function. * diagnostic.h: Include diagnostic-core.h. (diagnostic_t, emit_diagnostic): Don't declare here. * toplev.c (progname): Move to toplev.c. (emit_debug_global_declarations, compile_file, finalize, do_compile, toplev_main): Use seen_error. * toplev.h: Include diagnostic-core.h. (trim_filename, GCC_DIAG_STYLE, ATTRIBUTE_GCC_DIAG, internal_error, warning, warning_at, error, error_n, error_at, fatal_error, pedwarn, permerror, sorry, inform, inform_n, verbatim, fnotice, progname): Move to diagnostic-core.h. * builtins.c: Include diagnostic-core.h instead of diagnostic.h. (expand_builtin_expect): Use seen_error. * c-decl.c: Include diagnostic-core.h instead of diagnostic.h. (c_make_fname_decl, c_write_global_declarations): Use seen_error. * c-format.c: Include diagnostic-core.h instead of diagnostic.h. * c-gimplify.c: Include diagnostic-core.h instead of diagnostic.h. * c-lang.c: Include diagnostic-core.h instead of diagnostic.h. * c-lex.c (c_lex_with_flags, interpret_float): Don't increment errorcount for errors. * c-opts.c (c_common_finish): Use seen_error. * cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * cgraphunit.c (verify_cgraph_node, verify_cgraph, cgraph_output_pending_asms, cgraph_optimize): Use seen_error. * coverage.c: Include diagnostic-core.h instead of diagnostic.h. (get_coverage_counts): Use seen_error. * dwarf2out.c (dwarf2out_finish): Use seen_error. * gimplify.c (gimplify_var_or_parm_decl, gimple_push_cleanup, gimplify_body): Use seen_error. * ipa-inline.c (cgraph_early_inlining): Use seen_error. * ipa-pure-const.c (gate_pure_const): Use seen_error. * ipa-reference.c (gate_reference): Use seen_error. * jump.c: Include diagnostic-core.h instead of diagnostic.h. * lambda-code.c: Include diagnostic-core.h instead of diagnostic.h. * lto-cgraph.c: Include diagnostic-core.h instead of diagnostic.h. * lto-compress.c: Include diagnostic-core.h instead of diagnostic.h. * lto-section-in.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer-out.c: Include diagnostic-core.h instead of diagnostic.h. * lto-streamer.c: Include diagnostic-core.h instead of diagnostic.h. (gate_lto_out): Use seen_error. * matrix-reorg.c: Include diagnostic-core.h instead of diagnostic.h. * omega.c: Include diagnostic-core.h instead of diagnostic.h. * omp-low.c: Include diagnostic-core.h instead of diagnostic.h. (gate_expand_omp, lower_omp_1): Use seen_error. * passes.c: Include diagnostic-core.h instead of diagnostic.h. (rest_of_decl_compilation, rest_of_type_compilation, gate_rest_of_compilation, ipa_write_summaries): Use seen_error. * tree-cfg.c (label_to_block_fn): Use seen_error. * tree-inline.c (optimize_inline_calls): Use seen_error. * tree-mudflap.c (mudflap_finish_file): Use seen_error. * tree-optimize.c (gate_all_optimizations, gate_all_early_local_passes, gate_all_early_optimizations): Use seen_error. * tree-ssa-structalias.c (gate_ipa_pta): Use seen_error. * varpool.c: Include diagnostic-core.h instead of diagnostic.h. (varpool_remove_unreferenced_decls, varpool_assemble_pending_decls): Use seen_error. * Makefile.in (DIAGNOSTIC_CORE_H): Define. (TOPLEV_H, DIAGNOSTIC_H): Update. (c-decl.o, c-lang.o, c-format.o, lto-compress.o, lto-cgraph.o, lto-streamer-out.o, lto-section-in.o, lto-streamer.o, c-gimplify.o, omp-low.o, omega.o, diagnostic.o, passes.o, builtins.o, jump.o, cgraph.o, varpool.o, matrix-reorg.o, coverage.o, lambda-code.o): Update dependencies. cp: * call.c: Include diagnostic-core.h instead of diagnostic.h. * cp-lang.c: Don't include diagnostic.h * name-lookup.c: Include diagnostic-core.h instead of diagnostic.h. (cp_emit_debug_info_for_using): Use seen_error. * optimize.c: Include diagnostic-core.h instead of diagnostic.h. * parser.c: Include diagnostic-core.h instead of diagnostic.h. * pt.c (iterative_hash_template_arg): Use seen_error. * repo.c: Include diagnostic-core.h instead of diagnostic.h. * typeck2.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o, cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update dependencies. lto: * lto.c: Include diagnostic-core.h instead of diagnostic.h. (read_cgraph_and_symbols, lto_main): Use seen_error. * Make-lang.in (lto/lto.o): Update dependencies. objc: * objc-act.c: Include diagnostic-core.h instead of diagnostic.h. * Make-lang.in (objc/objc-act.o): Update dependencies. From-SVN: r159947
2010-05-27 22:16:07 +02:00
if (seen_error ())
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
return false;
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
remove_unreferenced_decls ();
cgraph.c (ld_plugin_symbol_resolution_names): Move to symtab.c * cgraph.c (ld_plugin_symbol_resolution_names): Move to symtab.c (cgraph_asm_nodes, cgraph_asm_last_node): Move to cgraphunit.c (cgraph_add_to_same_comdat_group): Remove. (cgraph_add_asm_node): Move to cgraphunit.c. (cgraph_make_decl_local): Move to symtab.c (cgraph_make_node_local_1): Update. (cgraph_can_remove_if_no_direct_calls_and): Update. (used_from_object_file_p): Update. (resolution_used_from_other_file_p): Move to symtab.c (cgraph_used_from_object_file_p): move to symtab.c (verify_cgraph_node): Verify same comdat groups. * cgraph.h (cgraph_asm_node): Rename to ... (asm_node): ... this one. (cgraph_asm_nodes): Rename to ... (asm_nodes): ... this one. (symtab_add_to_same_comdat_group): New function. (symtab_dissolve_same_comdat_group_list): New function. (symtab_used_from_object_file_p): Declare. (symtab_make_decl_local): Declare. (cgraph_add_to_same_comdat_group): Remove. (cgraph_add_asm_node): Remove. (cgraph_used_from_object_file_p, varpool_used_from_object_file_p): Remove. (cgraph_finalize_compilation_unit): Rename to ... (finalize_compilation_unit): ... this one. (cgraph_optimize): Rename to .... (compile): ... this one. (add_asm_node): Declare. (fixup_same_cpp_alias_visibility): Declare. (cgraph_make_decl_local): Remove. (varpool_assemble_pending_decls): Rename to ... (varpool_output_variables): ... this one. (varpool_remove_unreferenced_decls): Remove. * ipa-inline-transform.c (clone_inlined_nodes): Dissolve comdat groups. (preserve_function_body_p): Make static. * toplev.c (compile_file): Update comments; update. * cgraphunit.c: Update comments. (cgraph_expand_all_functions): Rename to ... (expand_all_functions): ... this one; update. (cgraph_mark_functions_to_output): Rename to ... (mark_functions_to_output): ... this one; cleanup. (cgraph_output_pending_asms): Remove prototype. (asm_nodes, asm_last_node): New static vars. (cgraph_process_new_functions): Update. (cgraph_reset_node): Cleanup; add comment. (cgraph_add_new_function): Update. (cgraph_output_pending_asms): Rename to ... (output_asm_statements): ... this one. (add_asm_node): New function. (fixup_same_cpp_alias_visibility): New function based on code in cgraph_analyze_function. (cgraph_analyze_function): Use it. (cgraph_order_sort): Update. (cgraph_output_in_order): Update. (cgraph_function_versioning): Update. (cgraph_optimize): Rename to ... (compile): ... this one; initialize streamer hooks here. (cgraph_finalize_compilation_unit): Rename to ... (finalize_compilation_unit): ... this one; do not initialize streamer hook here. * lto-streamer-out.c (lto_output_toplevel_asms): Update. * dwarf2out.c: Update ocmment. * optimize.c (maybe_clone_body): Use symtab_add_to_same_comdat_group. * method.c (use_thunk): Likewise. * semantics.c (maybe_add_lambda_conv_op): Likewise. * decl2.c (maybe_emit_vtables): Likewise. (cp_write_global_declarations): Use finalize_compilation_unit. * parser.c (cp_parser_asm_definition): Use add_asm_node. * lto-streamer-in.c (lto_input_toplevel_asms): Use add_asm_node * c-decl.c (c_write_global_declarations): Use finalize_compilation_unit. * langhooks.c (write_global_declarations): Update. * ipa.c (cgraph_externally_visible_p): Update. (dissolve_same_comdat_group_list): Remove. (function_and_variable_visibility): Update. * symtab.c: Inlcude lto-streamer.h and rtl.h (ld_plugin_symbol_resolution_names): New. (symtab_add_to_same_comdat_group): New. (symtab_dissolve_same_comdat_group_list): New. (resolution_used_from_other_file_p): Move here from cgraph.c (symtab_used_from_object_file_p): New. (symtab_make_decl_local): New. * passes.c (register_pass): Update comments. * c-parser.c (c_parser_asm_definition): Update. * varpool.c (varpool_analyze_node): Use fixup_same_cpp_alias_visibility. (varpool_remove_unreferenced_decls): Make static. (varpool_assemble_pending_decls): Rename to ... (varpool_output_variables): ... this one; call varpool_remove_unreferenced_decls. (varpool_used_from_object_file_p): Remove. * gogo-tree.cc (Gogo::write_globals): Use finalize_compilation_unit. * gcc-interface/utils.c (rest_of_subprog_body_compilation): Update comment. (gnat_write_global_declarations): Use finalize_compilation_unit. * f95-lang.c (gfc_finish): Update comments. * lto.c (lto_main): Use compile (). * lto-partition.c (partition_cgraph_node_p): Use symtab_used_from_object_file_p. (partition_varpool_node_p): Likewise. From-SVN: r186998
2012-04-30 19:55:29 +02:00
timevar_push (TV_VAROUT);
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
cgraph.h (FOR_EACH_VARIABLE, [...]): New macros. * cgraph.h (FOR_EACH_VARIABLE, FOR_EACH_VARIABLE, FOR_EACH_FUNCTION): New macros. * lto-symtab.c (lto_symtab_merge_cgraph_nodes): Use FOR_EACH walkers to walk cgraph and varpool. * cgraph.c (cgraph_node_for_asm): Likewise. (dump_cgraph): Likewise. * value-prof.c (init_node_map): Likewise. * tree.c (free_lang_data_in_cgraph): Likewise. * tree-emutls.c: (ipa_lower_emutls): Likewise. * ipa-reference.c (generate_summary, propagate): Likewise. * cgraphunit.c (verify_cgraph, cgraph_process_same_body_aliases, cgraph_mark_functions_to_output, cgraph_output_in_order, output_weakrefs, cgraph_materialize_all_clones, cgraph_optimize): Likewise. * lto-cgraph.c (merge_profile_summaries): Likewise. (input_cgraph): Likewise. * ipa-pure-const.c (generate_summary): Likewise. (propagate): Likwise. * ipa-utils.c (ipa_reduced_postorder): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reverse_postorder): Likewise. * ipa-inline.c (ipa_inline): Likewise. * matrix-reorg.c (find_matrices_decl): Likewise. (matrix_reorg): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * ipa.c (cgraph_remove_unreachable_nodes): Likewise. (function_and_variable_visibility): Likewise. (whole_program_function_and_variable_visibility): Likewise. (ipa_cdtor_merge): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. * ipa-inline-analysis.c (dump_inline_summaries): Likewise. * ipa-prop.c (ipa_print_all_jump_functions): Likewise. (ipa_print_all_params): Likewise. (ipa_update_after_lto_read): Likewise. * tree-profie.c (tree_profiling): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. * passes.c (dump_passes): Likewise. (do_per_function): Likewise. (ipa_write_summaries): Likewise. * varpool.c (dump_varpool): Likewise. (varpool_node_for_asm): Likewise. (varpool_assemble_pending_decls): Likewise. * decl2.c (collect_candidates_for_java_method_alias): Use FOR_EACH walkers to walk cgraph and varpool. * lto.c (read_cgraph_and_symbols): Use FOR_EACH walkers to walk cgraph and varpool. (materialize_cgraph): Likewise. * lto-partition.c (lto_1_to_1_map): Likewise. (lto_balanced_map): Likewise. (lto_promote_cross_file_statics): Likewise. From-SVN: r186492
2012-04-16 14:04:17 +02:00
FOR_EACH_DEFINED_VARIABLE (node)
Add an no_reorder attribute for LTO Some projects need to prevent reordering of specific top level declarations with LTO, in particular declarations defining init calls. The only way to do that with LTO was to use -fno-toplevel-reorder, which stops reordering for all declarations and makes LTO partitioning less efficient. This patch adds a new no_reorder attribute that stops reordering only for the marked declaration. The program can then only mark e.g. the initcalls and leave all the other declarations alone. The patch does: - Adds the new no_reorder attribute for the C family. - Initializes a new no_reorder flag in the symtab_nodes in the function visibility flag. - Maintains the no_reorder flag when creating new nodes. - Changes the partition code to always keep a separate sorted queue of ordered nodes and flush them in order with the other nodes. This is used by all nodes with -fno-toplevel-reorder, and only the marked ones without it. Parts of the old -fno-toplevel-reorder code paths are reused. - Adds various checks throughout the tree to make no_reorder marked functions behave the same as with -fno-toplevel-reorder - Changes the LTO streamer to serialize the no_reorder attribute. gcc/c-family/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * c-common.c (handle_no_reorder_attribute): New function. (c_common_attribute_table): Add no_reorder attribute. gcc/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * cgraph.h (symtab_node): Add no_reorder attribute. (symbol_table::output_asm_statements): Remove. * cgraphclones.c (cgraph_node::create_clone): Copy no_reorder. (cgraph_node::create_version_clone): Dito. (symbol_table::output_asm_statements): Remove. * trans-mem.c (ipa_tm_create_version_alias): Dito. * cgraphunit.c (varpool_node::finalize_decl): Check no_reorder. (output_in_order): Add no_reorder flag. Only handle no_reorder nodes when set. (symbol_table::compile): Add separate pass for no_reorder nodes. (process_common_attributes): Set no_reorder flag in symtab node. Add node argument. (process_function_and_variable_attributes): Pass symtab nodes to process_common_attributes. * doc/extend.texi (no_reorder): Document no_reorder attribute. * lto-cgraph.c (lto_output_node): Serialize no_reorder. (lto_output_varpool_node): Dito. (input_overwrite_node): Dito. (input_varpool_node): Dito. * varpool.c (varpool_node::add): Set no_reorder attribute. (symbol_table::remove_unreferenced_decls): Handle no_reorder. (symbol_table::output_variables): Dito. * symtab.c (symtab_node::dump_base): Print no_reorder. gcc/lto/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * lto-partition.c (node_cmp): Update comment. (varpool_node_cmp): Use symtab_node for comparison. (add_sorted_nodes): New function. (lto_balanced_map): Change to keep ordered queue of ordered node. Handle no_reorder attribute. From-SVN: r215537
2014-09-24 05:29:24 +02:00
{
/* Handled in output_in_order. */
if (node->no_reorder)
continue;
node->finalize_named_section_flags ();
}
/* There is a similar loop in output_in_order. Please keep them in sync. */
FOR_EACH_VARIABLE (node)
Add an no_reorder attribute for LTO Some projects need to prevent reordering of specific top level declarations with LTO, in particular declarations defining init calls. The only way to do that with LTO was to use -fno-toplevel-reorder, which stops reordering for all declarations and makes LTO partitioning less efficient. This patch adds a new no_reorder attribute that stops reordering only for the marked declaration. The program can then only mark e.g. the initcalls and leave all the other declarations alone. The patch does: - Adds the new no_reorder attribute for the C family. - Initializes a new no_reorder flag in the symtab_nodes in the function visibility flag. - Maintains the no_reorder flag when creating new nodes. - Changes the partition code to always keep a separate sorted queue of ordered nodes and flush them in order with the other nodes. This is used by all nodes with -fno-toplevel-reorder, and only the marked ones without it. Parts of the old -fno-toplevel-reorder code paths are reused. - Adds various checks throughout the tree to make no_reorder marked functions behave the same as with -fno-toplevel-reorder - Changes the LTO streamer to serialize the no_reorder attribute. gcc/c-family/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * c-common.c (handle_no_reorder_attribute): New function. (c_common_attribute_table): Add no_reorder attribute. gcc/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * cgraph.h (symtab_node): Add no_reorder attribute. (symbol_table::output_asm_statements): Remove. * cgraphclones.c (cgraph_node::create_clone): Copy no_reorder. (cgraph_node::create_version_clone): Dito. (symbol_table::output_asm_statements): Remove. * trans-mem.c (ipa_tm_create_version_alias): Dito. * cgraphunit.c (varpool_node::finalize_decl): Check no_reorder. (output_in_order): Add no_reorder flag. Only handle no_reorder nodes when set. (symbol_table::compile): Add separate pass for no_reorder nodes. (process_common_attributes): Set no_reorder flag in symtab node. Add node argument. (process_function_and_variable_attributes): Pass symtab nodes to process_common_attributes. * doc/extend.texi (no_reorder): Document no_reorder attribute. * lto-cgraph.c (lto_output_node): Serialize no_reorder. (lto_output_varpool_node): Dito. (input_overwrite_node): Dito. (input_varpool_node): Dito. * varpool.c (varpool_node::add): Set no_reorder attribute. (symbol_table::remove_unreferenced_decls): Handle no_reorder. (symbol_table::output_variables): Dito. * symtab.c (symtab_node::dump_base): Print no_reorder. gcc/lto/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * lto-partition.c (node_cmp): Update comment. (varpool_node_cmp): Use symtab_node for comparison. (add_sorted_nodes): New function. (lto_balanced_map): Change to keep ordered queue of ordered node. Handle no_reorder attribute. From-SVN: r215537
2014-09-24 05:29:24 +02:00
{
/* Handled in output_in_order. */
if (node->no_reorder)
continue;
if (DECL_HARD_REGISTER (node->decl)
|| DECL_HAS_VALUE_EXPR_P (node->decl))
c-common.c (c_common_attribute_table): Handle "omp declare target link" attribute. gcc/c-family/ * c-common.c (c_common_attribute_table): Handle "omp declare target link" attribute. gcc/ * cgraphunit.c (output_in_order): Do not assemble "omp declare target link" variables in ACCEL_COMPILER. * gimplify.c (gimplify_adjust_omp_clauses): Do not remove mapping of "omp declare target link" variables. * omp-low.c (scan_sharing_clauses): Do not remove mapping of "omp declare target link" variables. (add_decls_addresses_to_decl_constructor): For "omp declare target link" variables output address of the artificial pointer instead of address of the variable. Set most significant bit of the size to mark them. (pass_data_omp_target_link): New pass_data. (pass_omp_target_link): New class. (find_link_var_op): New static function. (make_pass_omp_target_link): New function. * passes.def: Add pass_omp_target_link. * tree-pass.h (make_pass_omp_target_link): Declare. * varpool.c (symbol_table::output_variables): Do not assemble "omp declare target link" variables in ACCEL_COMPILER. gcc/lto/ * lto.c: Include stringpool.h and fold-const.h. (offload_handle_link_vars): New static function. (lto_main): Call offload_handle_link_vars. libgomp/ * libgomp.h (REFCOUNT_LINK): Define. (struct splay_tree_key_s): Add link_key. * target.c (gomp_map_vars): Treat REFCOUNT_LINK objects as not mapped. Replace target address of the pointer with target address of newly mapped object in the splay tree. Set link pointer on target to the device address of the mapped object. (gomp_unmap_vars): Restore target address of the pointer in the splay tree for REFCOUNT_LINK objects after unmapping. (gomp_load_image_to_device): Set refcount to REFCOUNT_LINK for "omp declare target link" objects. (gomp_unload_image_from_device): Replace j with i. Force unmap of all "omp declare target link" objects, which were mapped for the image. (gomp_exit_data): Restore target address of the pointer in the splay tree for REFCOUNT_LINK objects after unmapping. * testsuite/libgomp.c/target-link-1.c: New file. From-SVN: r231655
2015-12-15 15:56:50 +01:00
continue;
if (node->definition)
changed |= node->assemble_decl ();
else
assemble_undefined_decl (node->decl);
Add an no_reorder attribute for LTO Some projects need to prevent reordering of specific top level declarations with LTO, in particular declarations defining init calls. The only way to do that with LTO was to use -fno-toplevel-reorder, which stops reordering for all declarations and makes LTO partitioning less efficient. This patch adds a new no_reorder attribute that stops reordering only for the marked declaration. The program can then only mark e.g. the initcalls and leave all the other declarations alone. The patch does: - Adds the new no_reorder attribute for the C family. - Initializes a new no_reorder flag in the symtab_nodes in the function visibility flag. - Maintains the no_reorder flag when creating new nodes. - Changes the partition code to always keep a separate sorted queue of ordered nodes and flush them in order with the other nodes. This is used by all nodes with -fno-toplevel-reorder, and only the marked ones without it. Parts of the old -fno-toplevel-reorder code paths are reused. - Adds various checks throughout the tree to make no_reorder marked functions behave the same as with -fno-toplevel-reorder - Changes the LTO streamer to serialize the no_reorder attribute. gcc/c-family/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * c-common.c (handle_no_reorder_attribute): New function. (c_common_attribute_table): Add no_reorder attribute. gcc/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * cgraph.h (symtab_node): Add no_reorder attribute. (symbol_table::output_asm_statements): Remove. * cgraphclones.c (cgraph_node::create_clone): Copy no_reorder. (cgraph_node::create_version_clone): Dito. (symbol_table::output_asm_statements): Remove. * trans-mem.c (ipa_tm_create_version_alias): Dito. * cgraphunit.c (varpool_node::finalize_decl): Check no_reorder. (output_in_order): Add no_reorder flag. Only handle no_reorder nodes when set. (symbol_table::compile): Add separate pass for no_reorder nodes. (process_common_attributes): Set no_reorder flag in symtab node. Add node argument. (process_function_and_variable_attributes): Pass symtab nodes to process_common_attributes. * doc/extend.texi (no_reorder): Document no_reorder attribute. * lto-cgraph.c (lto_output_node): Serialize no_reorder. (lto_output_varpool_node): Dito. (input_overwrite_node): Dito. (input_varpool_node): Dito. * varpool.c (varpool_node::add): Set no_reorder attribute. (symbol_table::remove_unreferenced_decls): Handle no_reorder. (symbol_table::output_variables): Dito. * symtab.c (symtab_node::dump_base): Print no_reorder. gcc/lto/: 2014-09-23 Andi Kleen <ak@linux.intel.com> * lto-partition.c (node_cmp): Update comment. (varpool_node_cmp): Use symtab_node for comparison. (add_sorted_nodes): New function. (lto_balanced_map): Change to keep ordered queue of ordered node. Handle no_reorder attribute. From-SVN: r215537
2014-09-24 05:29:24 +02:00
}
timevar_pop (TV_VAROUT);
Move all varpool routines out of cgraph/cgraphunit to varpool.c Move all varpool routines out of cgraph/cgraphunit to varpool.c * cgraph.c: Update comments. (cgraph_varpool_hash, cgraph_varpool_nodes, cgraph_varpool_last_needed_node cgraph_varpool_node_name, cgraph_varpool_node, cgraph_varpol_mode_for_asm, cgraph_varpool_mark_needed_node, cgraph_variable_initializer_availability): Move to varpool.c and drop cgraph_ prefixes. (cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_finalize_decl): move to varpool.c; drop cgraph_ prefix; make static. (dump_cgraph_varpool_node): Move to varpool.c under name dump_varpool_node. (dump_varpool, hash_varpool_node, eq_varpool_node, decide_is_variable_needed): Move to varpool.c (decl_assembler_name_equal): Move to tree.c. (availability_names): Rename to ... (cgraph_availability_names): ... this one. (dump_cgraph_node): Update. * cgraph.h: Reorder declarations now in varpool.c (cgraph_vailablity_names): Declare. (struct cgraph_varpool_node): Rename to ... (struct varpool_node): ... this one. (cgraph_varpool_first_unanalyzed_node, cgraph_varpool_nodes_queue, cgraph_varpool_first_unanalyzed_node, cgraph_varpool_node, cgraph_varpool_node_for_asm, cgraph_varpool_mark_needed_node, cgraph_varpool_finalize_decl, cgraph_varpool_enqueue_needed_node, cgraph_varpool_reset_queue, cgraph_varpool_assemble_pending_decls, cgraph_variable_initializer_availability): Rename to ... (varpool_first_unanalyzed_node, varpool_nodes_queue, varpool_first_unanalyzed_node, varpool_node, varpool_node_for_asm, varpool_mark_needed_node, varpool_finalize_decl, varpool_enqueue_needed_node, varpool_assemble_pending_decls, variable_initializer_availability): Rename to ... * tree.c (decl_assembler_name_equal): Move here from cgraph.c. * tree.h (decl_assembler_name_equal): Declare. * omp-low.c (lower_omp_critical): Update. * ipa-reference (analyze_variable, static_execute): Likewise. * toplev.c (wrapup_global_declaration_2, compile_file): Update. * cgraphunit.c: Update comments. (cgraph_varpool_assembled_nodes_queue): Move to varpool.c under name varpool_assembled_nodes_queue. (cgraph_varpool_analyze_pending_decls): Move to varpool.c under name varpool_analyze_pending_decls. (cgraph_varpool_remove_unreferenced_decls): Move to varpool.c under name varpool_remove_unreferenced_decls. (record_reference): Update. (cgraph_create_edges): Update. (record_referneces_in_initializer): New function. (cgraph_varpool_assemble_decl): Move to varpool.c under name varpool_assemble_decl; make global. (cgraph_varpool_assemble_pending_decls): Move to varpool.c under name varpool_assemble_pending_decls. (process_function_and_variable_attributes, cgraph_finalize_compilation_unit, struct cgraph_order_sort, cgraph_output_in_order, cgraph_function_and_variable_invisibility, cgraph_optimize, cgraph_increase_alignment): Update. * dwarf2out.c (decls_for_scope): Likewise. * ipa-type-escape.c (analyze_variable, type_escape_execute): Likewise. * except.c (output_ttype): Likewise. * varasm.c (mark_decl_referenced): Likewise. (find_decl_and_mark_referenced, assemble_alias): update. * Makefile.in: Add varpool.c, gt-varpool.c and remove gt-cgraphunit.c * passes.c (rest_of_decl_compilation): Update. * cp/decl2.c (var_finalized_p): Update for renamed varpool functions. * fortran/f59-lang.c (gfc_expand_function): Update for renamed varpool functions. From-SVN: r119731
2006-12-11 09:07:52 +01:00
return changed;
}
/* Attempt to mark ALIAS as an alias to DECL. Return TRUE if successful.
Extra name aliases are output whenever DECL is output. */
varpool_node *
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::create_alias (tree alias, tree decl)
{
varpool_node *alias_node;
gcc_assert (TREE_CODE (decl) == VAR_DECL);
gcc_assert (TREE_CODE (alias) == VAR_DECL);
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
alias_node = varpool_node::get_create (alias);
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
alias_node->alias = true;
alias_node->definition = true;
alias_node->alias_target = decl;
c-common.c (handle_alias_ifunc_attribute): Do not set DECL_EXTERNAL for weakref variables. * c-family/c-common.c (handle_alias_ifunc_attribute): Do not set DECL_EXTERNAL for weakref variables. * c-family/c-pragma.c (handle_pragma_weak): Make sure aliases are not declared as external. * cgraph.c (cgraph_create_function_alias): Set weakref flag. * cgraph.h (symtab_node_base): Add weakref flag. * cgraphunit.c (cgraph_reset_node): Clear weakref flag. (handle_alias_pairs): Set weakref flag, do not set DECL_EXTERNAL. (output_weakrefs): Use weakref flag. * fold-const.c (simple_operand_p): Handle WEAK. * gimple-fold.c (can_refer_decl_in_current_unit_p): Drop weakref. * ipa.c (varpool_externally_visible_p): Drop weakref. (function_and_variable_visibility): Update comment; fix weakref sanity checks; do not clear DECL_WEAK on them. * lto-cgraph.c (lto_output_node): update. (lto_output_varpool_node): Update. (input_overwrite_node): Update. (input_node): Update. (input_varpool_node): Update. * lto-symtab.c (lto_symtab_symbol_p): Do not special case weakrefs. (lto_symtab_merge_symbols): Add sanity check. (lto_symtab_prevailing_decl): Do not special case weakrefs. * passes.c (rest_of_decl_compilation): Set static flag, too. * symtab.c (dump_symtab_base): Dump weakref. (verify_symtab_base): Sanity check weakrefs. (symtab_make_decl_local): Remove duplicated code. (symtab_alias_ultimate_target): Simplify. * varpool.c (varpool_create_variable_alias): Set weakref flag. * lto-partition.c (get_symbol_class): Simplify weakref handling. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (lto_balanced_map): Likewise. (rename_statics): Drop weakref. From-SVN: r199971
2013-06-12 00:41:54 +02:00
if (lookup_attribute ("weakref", DECL_ATTRIBUTES (alias)) != NULL)
re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2) PR ipa/61886 * symtab.c (ultimate_transparent_alias_target): New inline function. (symbol_table::assembler_names_equal_p): New method; break out from ... (symbol_table::decl_assembler_name_equal): ... here. (symbol_table::change_decl_assembler_name): Also update names and translation links of transparent aliases. (symtab_node::dump_base): Dump transparent_alias. (symtab_node::verify_base): Implement basic transparent alias verification. (symtab_node::make_decl_local): Support localization of weakrefs; recurse to transparent aliases; set TREE_STATIC. (symtab_node::ultimate_alias_target_1): Handle visibility of transparent aliases. (symtab_node::resolve_alias): New parmaeter transparent; handle transparent aliases; recurse to aliases of aliases to fix comdat groups. (symtab_node::get_partitioning_class): Handle transparent aliases. * ipa-visibility.c (cgraph_externally_visible_p, varpool_node::externally_visible_p): Visibility of transparent alias depends on its target. (function_and_variable_visibility): Do not tweak visibility of transparent laiases. (function_and_variable_visibility): Likewise. * ipa.c (symbol_table::remove_unreachable_nodes): Clear transparent_alias flag. * alias.c (cgraph_node::create_alias, cgraph_node::get_availability): Support transparent aliases. * cgraph.h (symtab_node): Update prototype of resolve_alias; add transparent_alias flag. (symbol_table: Add assembler_names_equal_p. (symtab_node::real_symbol_p): Skip transparent aliases. * cgraphunit.c (cgraph_node::reset): Reset transparent_alias flag. (handle_alias_pairs): Set transparent_alias for weakref. (cgraph_node::assemble_thunks_and_aliases): Do not asemble transparent aliases. * lto-cgraph.c (lto_output_node): When outputting same_comdat_group skip symbols not put into boundary; stream transparent_alias. (lto_output_varpool_node): Likewise. (input_overwrite_node, input_varpool_node): Stream transparent alias. * varpool.c (ctor_for_folding, varpool_node::get_availability, varpool_node::assemble_aliases, symbol_table::remove_unreferenced_decls): Handle transparent aliase. (varpool_node::create_alias): Set transparent_alias. * lto-partition.c (add_symbol_to_partition_1, contained_in_symbol, rename_statics, rename_statics): Handle transparent aliases. From-SVN: r231373
2015-12-07 18:36:54 +01:00
alias_node->weakref = alias_node->transparent_alias = true;
2011-06-18 10:31:03 +02:00
return alias_node;
}
2011-06-18 10:31:03 +02:00
/* Attempt to mark ALIAS as an alias to DECL. Return TRUE if successful.
Extra name aliases are output whenever DECL is output. */
varpool_node *
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
varpool_node::create_extra_name_alias (tree alias, tree decl)
2011-06-18 10:31:03 +02:00
{
varpool_node *alias_node;
2011-06-18 10:31:03 +02:00
#ifndef ASM_OUTPUT_DEF
/* If aliases aren't supported by the assembler, fail. */
return NULL;
#endif
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
alias_node = varpool_node::create_alias (alias, decl);
Autogenerated fixes of "->symbol." to "->" This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
2013-10-29 19:30:00 +01:00
alias_node->cpp_implicit_alias = true;
lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ... * lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Rename to ... (lto_symtab_merge_symbols_1): ... this one. (lto_symtab_merge_cgraph_nodes): Rename to ... (lto_symtab_merge_symbols): ... this one; simplify. * cgraph.c (same_body_aliases_done): Rename to ... (cpp_implicit_aliases_done): ... this one. (cgraph_create_function_alias): Update. (cgraph_same_body_alias): Update. (dump_cgraph_node): Remove alias dumping; simplify thunk dumping. (verify_edge_corresponds_to_fndecl): Simplify. * cgraph.h (symtab_node_base): Add cpp_implicit_alias, alias_target. (cgraph_node): Remove same_body_alias. (varpool_node): Remove alias_of and extra_name_alias. (same_body_aliases_done): Rename to .. (cpp_implicit_aliases_done): ... this one. (symtab_alias_ultimate_target): Add default parameter. (symtab_resolve_alias): New function. (fixup_same_cpp_alias_visibility): Declare. (cgraph_function_node): Add default parameter. (cgraph_node_asm_name): Likewise. (cgraph_function_or_thunk_node): Add default parameter; do not ICE when it is NULL. (varpool_variable_node): Likewise. * tree-emutls.c (create_emultls_var): Update. (ipa_lower_emutls): Update. * cgraphunit.c (cgraph_decide_is_function_needed): Update. (cgraph_reset_node): Reset alias info. (cgraph_finalize_function): Update. (fixup_same_cpp_alias_visibility): Move to symtab.c. (analyze_function): Simplify. (cgraph_process_same_body_aliases): Simplify. (analyze_functions): Fixup same body aliases. (handle_alias_pairs): Simplify. (assemble_thunk): Update. (assemble_thunks_and_aliases): Update. (output_weakrefs): Rewrite. * lto-cgraph.c (lto_output_node): Rewrite alias handling. (lto_output_varpool_node): Likewise. (compute_ltrans_boundary): Remve assert. (get_alias_symbol): New functoin. (input_node): Rewrite alias handling. (input_varpool_node): Likewise. * ipa-pure-const.c (propagate_pure_const): Fix formating. * ipa.c (process_references): Handle weakrefs correctly. (symtab_remove_unreachable_nodes): Likewise. * trans-mem.c (get_cg_data): Update. (ipa_tm_create_version_alias): Update. (ipa_tm_execute): Update. * symtab.c (dump_symtab_base): Dump aliases. (verify_symtab_base): Verify aliases. (symtab_node_availability): New function. (symtab_alias_ultimate_target): Simplify. (fixup_same_cpp_alias_visibility): Move here from cgraphunit.c; handle all the fixup cases. (symtab_resolve_alias): New function. * passes.c (ipa_write_summaries): Handle weakrefs. * varpool.c (varpool_analyze_node): Simplify. (assemble_aliases): Update. (varpool_create_variable_alias): Simplify. (varpool_extra_name_alias): Simplify. * lto-streamer.h (lto_symtab_merge_cgraph_nodes): Rename to... (lto_symtab_merge_symbols): ... this one. * decl2.c (cp_write_global_declarations): Replace same_body_alias by symbol.cpp_implicit_alias. * lto.c (read_cgraph_and_symbols): Simplify dumping; Replace lto_symtab_merge_cgraph_nodes by lto_symtab_merge_symbols. (do_whole_program_analysis): Update dumping. From-SVN: r199577
2013-06-01 15:08:53 +02:00
/* Extra name alias mechanizm creates aliases really late
via DECL_ASSEMBLER_NAME mechanizm.
This is unfortunate because they are not going through the
standard channels. Ensure they get output. */
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
if (symtab->cpp_implicit_aliases_done)
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
alias_node->resolve_alias (varpool_node::get_create (decl));
lto-symtab.c (lto_symtab_entry_def): Add guessed field. * lto-symtab.c (lto_symtab_entry_def): Add guessed field. (lto_symtab_resolve_symbols): Set it. (lto_symtab_merge_decls_1): Do not compute used_from_object_file; store resolution field in cgraph/varpool. * cgraph.c (cgraph_same_body_alias, cgraph_add_thunk): Return node. (cgraph_get_node_or_alias, cgraph_get_node_or_alias): Constify. (cgraph_dump_node): Drop used_from_object_file. (cgraph_clone_node, cgraph_create_virtual_clone): Likewise. (cgraph_function_body_availability): Use decl_replaceable_p. (cgraph_make_node_local): Set resolution to LDPR_PREVAILING_DEF_IRONLY. (cgraph_can_remove_if_no_direct_calls_and_refs): Use cgraph_used_from_object_file_p. (cgraph_will_be_removed_from_program_if_no_direct_calls): Use cgraph_used_from_object_file_p. (resolution_used_from_other_file_p): New functoin. (cgraph_used_from_object_file_p): New predicate. * cgraph.h: Include plugin-api.h (struct cgraph_local_info): Remove used_from_object_file. (struct cgraph_node): Add resolution field. (struct varpool_node): Likewise; remove used_from_object_file; reove const_value_known. (cgraph_get_node, cgraph_get_node_or_alias, cgraph_node, cgraph_same_body_alias, cgraph_add_thunk): Update prototypes. (resolution_used_from_other_file_p, cgraph_used_from_object_file_p, varpool_used_from_object_file_p): Declare. (varpool_get_node, varpool_extra_name_alias): Update prototype. * tree.h (DECL_REPLACEABLE_P): Remove. (decl_replaceable_p, decl_binds_to_current_def_p): Declare. * final.c (rest_of_clean_state): Use decl_binds_to_current_def_p. * lto-cgraph.c (lto_output_node, lto_output_varpool_node, input_overwrite_node, input_node, input_varpool_node): Stream resolution. * expr.c (expand_expr_real_1): Use const_value_known_p * ipa.c (ipa_discover_readonly_nonaddressable_var): Do not set const_value_known. (cgraph_externally_visible_p): Use cgraph_used_from_object_file_p. (function_and_variable_visibility): Set resolution for local vars and functions. use varpool_used_from_object_file_p. * varasm.c (resolution_to_local_definition_p, resolution_local_p): New static functions. (default_binds_local_p_1): Use resolutoin info. (decl_binds_to_current_def_p, decl_replaceable_p): New functions. * varpool.c (varpool_get_node): Constify. (const_value_known_p): Do not use vnode->const_value_known; use decl_replaceable_p. (varpool_finalize_decl): Do not set const_value_known. (cgraph_variable_initializer_availability): Use decl_replaceable_p (varpool_extra_name_alias): Return new node. (varpool_used_from_object_file_p): New function. * decl.c (finish_function): Use decl_replaceable_p * method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias. * lto.c (lto_promote_cross_file_statics): Use const_value_known_p. From-SVN: r164610
2010-09-24 23:47:59 +02:00
return alias_node;
}
ipa-chkp.c: Use iterate_direct_aliases. * ipa-chkp.c: Use iterate_direct_aliases. * symtab.c (resolution_used_from_other_file_p): Move inline. (symtab_node::create_reference): Fix formating. (symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases. (symtab_node::iterate_reference): Move inline. (symtab_node::iterate_referring): Move inline. (symtab_node::iterate_direct_aliases): Move inline. (symtab_node::used_from_object_file_p_worker): Inline into ... (symtab_node::used_from_object_file_p): ... this one; move inline. (symtab_node::call_for_symbol_and_aliases): Move inline; use iterate_direct_aliases. (symtab_node::call_for_symbol_and_aliases_1): New method. (cgraph_node::call_for_symbol_and_aliases): Move inline; use iterate_direct_aliases. (cgraph_node::call_for_symbol_and_aliases_1): New method. (varpool_node::call_for_node_and_aliases): Rename to ... (varpool_node::call_for_symbol_and_aliases): ... this one; Move inline; use iterate_direct_aliases. (varpool_node::call_for_symbol_and_aliases_1): New method. * ipa.c (ipa_single_use): Use iterate_direct_aliases. (ipa_discover_readonly_nonaddressable_var): Update. * ipa-devirt.c: Fix formating. * cgraph.c (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Move inline. (cgraph_node::call_for_symbol_and_aliases): Move inline. (cgraph_node::call_for_symbol_and_aliases_1): New function.. * cgraph.h (used_from_object_file_p_worker): Remove. (resolution_used_from_other_file_p): Move inline. (symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases. (symtab_node::iterate_reference): Move inline. (symtab_node::iterate_referring): Move inline. (symtab_node::iterate_direct_aliases): Move inline. (symtab_node::used_from_object_file_p_worker): Inline into ... (symtab_node::used_from_object_file_p): Move inline. * tree-emutls.c (ipa_lower_emutls): Update. * varpool.c (varpool_node::call_for_symbol_and_aliases_1): New method. (varpool_node::call_for_node_and_aliases): Remove. From-SVN: r220709
2015-02-14 19:42:49 +01:00
/* Worker for call_for_symbol_and_aliases. */
2011-06-18 10:31:03 +02:00
bool
ipa-chkp.c: Use iterate_direct_aliases. * ipa-chkp.c: Use iterate_direct_aliases. * symtab.c (resolution_used_from_other_file_p): Move inline. (symtab_node::create_reference): Fix formating. (symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases. (symtab_node::iterate_reference): Move inline. (symtab_node::iterate_referring): Move inline. (symtab_node::iterate_direct_aliases): Move inline. (symtab_node::used_from_object_file_p_worker): Inline into ... (symtab_node::used_from_object_file_p): ... this one; move inline. (symtab_node::call_for_symbol_and_aliases): Move inline; use iterate_direct_aliases. (symtab_node::call_for_symbol_and_aliases_1): New method. (cgraph_node::call_for_symbol_and_aliases): Move inline; use iterate_direct_aliases. (cgraph_node::call_for_symbol_and_aliases_1): New method. (varpool_node::call_for_node_and_aliases): Rename to ... (varpool_node::call_for_symbol_and_aliases): ... this one; Move inline; use iterate_direct_aliases. (varpool_node::call_for_symbol_and_aliases_1): New method. * ipa.c (ipa_single_use): Use iterate_direct_aliases. (ipa_discover_readonly_nonaddressable_var): Update. * ipa-devirt.c: Fix formating. * cgraph.c (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Move inline. (cgraph_node::call_for_symbol_and_aliases): Move inline. (cgraph_node::call_for_symbol_and_aliases_1): New function.. * cgraph.h (used_from_object_file_p_worker): Remove. (resolution_used_from_other_file_p): Move inline. (symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases. (symtab_node::iterate_reference): Move inline. (symtab_node::iterate_referring): Move inline. (symtab_node::iterate_direct_aliases): Move inline. (symtab_node::used_from_object_file_p_worker): Inline into ... (symtab_node::used_from_object_file_p): Move inline. * tree-emutls.c (ipa_lower_emutls): Update. * varpool.c (varpool_node::call_for_symbol_and_aliases_1): New method. (varpool_node::call_for_node_and_aliases): Remove. From-SVN: r220709
2015-02-14 19:42:49 +01:00
varpool_node::call_for_symbol_and_aliases_1 (bool (*callback) (varpool_node *,
void *),
void *data,
bool include_overwritable)
2011-06-18 10:31:03 +02:00
{
IPA C++ refactoring 4/N * cgraph.h (symtab_node): (bool needed_p (void)): created from decide_is_symbol_needed (bool referred_to_p (void)): created from referred_to_p (static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm * cgraph.h (cgraph_node): (void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases (void expand (void)): created from expand_function (static void finalize_function (tree, bool)): created from cgraph_finalize_function (static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info (static cgraph_global_info *global_info (tree)): created from cgraph_global_info (static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info * cgraph.h (varpool_node): (static void add (tree decl): created from varpool_add_new_variable * cgraph.h (cgraph_edge): void remove (void); (void remove_caller (void)): created from cgraph_edge_remove_caller (void remove_callee (void)): created from cgraph_edge_remove_callee (void set_call_stmt (gimple new_stmt, bool update_speculative = true)): created from cgraph_set_call_stmt (void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee (cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct (cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count, gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative (void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)): created from cgraph_speculative_call_info (cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale, int freq_scale, bool update_original)): created from cgraph_clone_edge (cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation (bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p (bool recursive_p (void)): created from cgraph_edge_recursive_p (bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p (static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges (static void rebuild_references (void)): created from cgraph_rebuild_references * cgraph.h (symbol_table): (create_reference): renamed from add_reference (maybe_create_reference): renamed from maybe_add_reference (void register_symbol (symtab_node *node)): new function (void clear_asm_symbols (void)): new function (void unregister (symtab_node *node)): new function (void release_symbol (cgraph_node *node, int uid)): new function (cgraph_node * allocate_cgraph_symbol (void)): new function (void initialize (void)): created from cgraph_init (symtab_node *first_symbol (void)):new function (asm_node *first_asm_symbol (void)):new function (symtab_node *first_defined_symbol (void)):new function (varpool_node *first_variable (void)):new function (varpool_node *next_variable (varpool_node *node)):new function (varpool_node *first_static_initializer (void)):new function (varpool_node *next_static_initializer (varpool_node *node)):new function (varpool_node *first_defined_variable (void)):new function (varpool_node *next_defined_variable (varpool_node *node)):new function (cgraph_node *first_defined_function (void)):new function (cgraph_node *next_defined_function (cgraph_node *node)):new function (cgraph_node *first_function (void)):new function (cgraph_node *next_function (cgraph_node *node)):new function (cgraph_node *first_function_with_gimple_body (void)):new function (asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node (bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)): created from symtab_remove_unreachable_nodes (void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls (void process_new_functions (void)): created from cgraph_process_new_functions (void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases (bool output_variables (void)): created from varpool_node::output_variables (void output_asm_statements (void)): created from output_asm_statements (void finalize_compilation_unit (void)): created from finalize_compilation_unit (void compile (void)): created from compile (void output_weakrefs (void)): created from output_weakrefs (cgraph_node *create_empty (void)): created from cgraph_node::create_empty (cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt, gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge (void free_edge (cgraph_edge *e)): created from cgraph_free_edge (cgraph_node *next_function_with_gimple_body (cgraph_node *node)): created from cgraph_next_function_with_gimple_body (void remove_edge_removal_hook (cgraph_edge_hook_list *)): created from cgraph_remove_edge_removal_hook (cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)): created from cgraph_add_node_removal_hook (void remove_cgraph_removal_hook (cgraph_node_hook_list *)): created from cgraph_remove_node_removal_hook (varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)): created from varpool_add_node_removal_hook (void remove_varpool_removal_hook (varpool_node_hook_list *)): created from varpool_remove_node_removal_hook (cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)): created from cgraph_add_function_insertion_hook (void remove_cgraph_insertion_hook (cgraph_node_hook_list *)): created from cgraph_remove_function_insertion_hook (varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)): created from varpool_add_variable_insertion_hook (void remove_varpool_insertion_hook (varpool_node_hook_list *)): created from varpool_remove_variable_insertion_hook (cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)): created from cgraph_add_edge_duplication_hook (void remove_edge_duplication_hook (cgraph_2edge_hook_list *)): created from cgraph_remove_edge_duplication_hook (cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)): created from cgraph_add_node_duplication_hook (void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)): created from cgraph_remove_node_duplication_hook (void call_edge_removal_hooks (cgraph_edge *e)): created from cgraph_call_edge_removal_hooks (void call_cgraph_insertion_hooks (cgraph_node *node)): created from call_function_insertion_hooks (void call_cgraph_removal_hooks (cgraph_node *node)): created from cgraph_call_node_removal_hooks (void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)): created from cgraph_node::call_duplication_hooks (void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)): created from cgraph_call_edge_duplication_hooks (void call_varpool_removal_hooks (varpool_node *node)): created from varpool_call_node_removal_hooks (void call_varpool_insertion_hooks (varpool_node *node)): created from varpool_call_variable_insertion_hooks (void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)): created from insert_to_assembler_name_hash (void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)): created from unlink_from_assembler_name_hash (void symtab_prevail_in_asm_name_hash (symtab_node *node)): created from symtab_prevail_in_asm_name_hash (void symtab_initialize_asm_name_hash (void)): created from symtab_initialize_asm_name_hash (void change_decl_assembler_name (tree decl, tree name)): created from change_decl_assembler_name (void materialize_all_clones (void)): created from cgraph_materialize_all_clones (static hashval_t decl_assembler_name_hash (const_tree asmname)): created from decl_assembler_name_hash (static bool decl_assembler_name_equal (tree decl, const_tree asmname)): created from decl_assembler_name_equal (static hashval_t hash_node_by_assembler_name (const void *p)): created from hash_node_by_assembler_name (static int eq_assembler_name (const void *p1, const void *p2)): created from eq_assembler_name From-SVN: r214422
2014-08-25 15:01:47 +02:00
ipa_ref *ref;
2011-06-18 10:31:03 +02:00
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
FOR_EACH_ALIAS (this, ref)
{
varpool_node *alias = dyn_cast <varpool_node *> (ref->referring);
if (include_overwritable
IPA C++ refactoring 2/N * cgraph.h (varpool_node): (availability get_availability (void)): created from cgraph_variable_initializer_availability (inline varpool_node *ultimate_alias_target (availability *availability = NULL) creted from: cgraph_variable_initializer_availability (inline varpool_node *get_alias_target (void)): created from varpool_alias_target (void finalize_named_section_flags (void)): created from varpool_finalize_named_section_flags (bool assemble_decl (void)): created from varpool_assemble_decl (void analyze (void)): created from varpool_analyze_node (bool call_for_node_and_aliases (bool (*callback) (varpool_node *, void *), void *data, bool include_overwritable)): created fromvarpool_for_node_and_aliases (void remove_initializer (void)): created from varpool_remove_initializer (tree get_constructor (void)): created from varpool_get_constructor (bool externally_visible_p (void)): created from varpool_externally_visible_p (bool ctor_useable_for_folding_p (void)): created from varpool_ctor_useable_for_folding_p (inline bool all_refs_explicit_p ()): created from varpool_all_refs_explicit_p (inline bool can_remove_if_no_refs_p (void)): created from varpool_can_remove_if_no_refs (static inline varpool_node *get (const_tree decl)): created from varpool_get_node (static void finalize_decl (tree decl)): created from varpool_finalize_decl (static bool output_variables (void)): created from varpool_output_variables (static varpool_node * create_extra_name_alias (tree alias, tree decl)): created from varpool_extra_name_alias (static varpool_node * create_alias (tree, tree)): created from varpool_create_variable_alias (static void dump_varpool (FILE *f)): created from dump_varpool (static void DEBUG_FUNCTION debug_varpool (void)): created from debug_varpool (static varpool_node *create_empty (void)): created from varpool_create_empty_node (static varpool_node *get_create (tree decl)): created from varpool_node_for_decl (static varpool_node *get_for_asmname (tree asmname)): created from varpool_node_for_asm (void assemble_aliases (void)): created from assemble_aliases From-SVN: r212984
2014-07-24 14:25:27 +02:00
|| alias->get_availability () > AVAIL_INTERPOSABLE)
ipa-chkp.c: Use iterate_direct_aliases. * ipa-chkp.c: Use iterate_direct_aliases. * symtab.c (resolution_used_from_other_file_p): Move inline. (symtab_node::create_reference): Fix formating. (symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases. (symtab_node::iterate_reference): Move inline. (symtab_node::iterate_referring): Move inline. (symtab_node::iterate_direct_aliases): Move inline. (symtab_node::used_from_object_file_p_worker): Inline into ... (symtab_node::used_from_object_file_p): ... this one; move inline. (symtab_node::call_for_symbol_and_aliases): Move inline; use iterate_direct_aliases. (symtab_node::call_for_symbol_and_aliases_1): New method. (cgraph_node::call_for_symbol_and_aliases): Move inline; use iterate_direct_aliases. (cgraph_node::call_for_symbol_and_aliases_1): New method. (varpool_node::call_for_node_and_aliases): Rename to ... (varpool_node::call_for_symbol_and_aliases): ... this one; Move inline; use iterate_direct_aliases. (varpool_node::call_for_symbol_and_aliases_1): New method. * ipa.c (ipa_single_use): Use iterate_direct_aliases. (ipa_discover_readonly_nonaddressable_var): Update. * ipa-devirt.c: Fix formating. * cgraph.c (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Move inline. (cgraph_node::call_for_symbol_and_aliases): Move inline. (cgraph_node::call_for_symbol_and_aliases_1): New function.. * cgraph.h (used_from_object_file_p_worker): Remove. (resolution_used_from_other_file_p): Move inline. (symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases. (symtab_node::iterate_reference): Move inline. (symtab_node::iterate_referring): Move inline. (symtab_node::iterate_direct_aliases): Move inline. (symtab_node::used_from_object_file_p_worker): Inline into ... (symtab_node::used_from_object_file_p): Move inline. * tree-emutls.c (ipa_lower_emutls): Update. * varpool.c (varpool_node::call_for_symbol_and_aliases_1): New method. (varpool_node::call_for_node_and_aliases): Remove. From-SVN: r220709
2015-02-14 19:42:49 +01:00
if (alias->call_for_symbol_and_aliases (callback, data,
include_overwritable))
return true;
}
2011-06-18 10:31:03 +02:00
return false;
}