aboutsummaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
AgeCommit message (Collapse)AuthorFilesLines
2013-10-18tree-ssa.h: Don't include gimple-low.h...Andrew MacLeod1-1/+0
* tree-ssa.h: Don't include gimple-low.h, tree-ssa-address.h, sbitmap.h, tree-ssa-threadedge.h, tree-ssa-dom.h, and tree-cfgcleanup.h. * gimple-low.c (gimple_check_call_arg, gimple_check_call_matching_types): Move to cgraph.c. * gimple-low.h: Remove prototype. * cgraph.c: (gimple_check_call_arg, gimple_check_call_matching_types): Relocate from gimple-low.c. * cgraph.h: Add prototype. Don't include basic-block.h. * gimplify.c: Add gimple-low to include list. * omp-low.c: Add gimple-low and tree-cfgcleanup.h to include list. * tree-eh.c: Add gimple-low to include list. * tree-nested.c: Likewise. * cfgexpand.c: Add tree-ssa-address.h to include list. * expr.c: Likewise. * gimple-fold.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * trans-mem.c: Likewise. * tree-mudflap.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-dom.c: Include tree-ssa-threadedge.h and tree-ssa-dom.h. (degenerate_phi_result): Move to tree-phinodes.c. * tree-ssa-loop-ch.c: Include tree-ssa-threadedge.h. * tree-ssa-threadedge.c: Likewise. * tree-vrp.c: Likewise. * tree-phinodes.c (degenerate_phi_result): Relocate here. * tree-ssa-dom.h (degenerate_phi_result): Remove Prototype. * tree-phinodes.h (degenerate_phi_result): Add prototype. * tree-ssa-copy.c: Include tree-ssa-dom.h. * tree-ssa-forwprop.c: Likewise. * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing, pass_data_cleanup_cfg_post_optimizing, make_pass_cleanup_cfg_post_optimizing): Relocate from tree-optimize.c. * tree-optimize.c: Delete File. * graphite.c: Include tree-cfgcleanup.h. * passes.c: Likewise. * tree-cfg.c: Likewise. * tree-profile.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-switch-conversion.c: Don't include tree-ssa-operands.h. * tree-outof-ssa.c: Include sbitmap.h. * tree-ssa-live.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-stdarg.c: Likewise. * Makefile.in (OBJS): Delete tree-optimize.o. * basic-block.h (gcov_type, gcov_type_unsigned): Move to coretypes.h. * coretypes.h (gcov_type, gcov_type_unsigned): Relocate here. * varasm.c: Include basic-block.h. * cfgloop.h: Include function.h instead of basic-block.h (bb_loop_depth): Move to cfgloop.c. * cfgloop.c (bb_loop_depth): Relocate from cfgloop.h. From-SVN: r203833
2013-10-15Add --enable-host-shared configuration optionDavid Malcolm1-1/+13
/ * configure.ac: Add --enable-host-shared * configure: Regenerate. gcc/ * Makefile.in (PICFLAG): New. (enable_host_shared): New. (INTERNAL_CFLAGS): Use PICFLAG. (LIBIBERTY): Use pic build of libiberty.a if configured with --enable-host-shared. * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * configure: Regenerate. * doc/install.texi (--enable-shared): Add note contrasting it with... (--enable-host-shared): New option. libbacktrace/ * configure.ac: Add --enable-host-shared, setting up pre-existing PIC_FLAG variable within Makefile.am et al. * configure: Regenerate. libcpp/ * Makefile.in (PICFLAG): New. (ALL_CFLAGS): Add PICFLAG. (ALL_CXXFLAGS): Likewise. * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * configure: Regenerate. libdecnumber/ * Makefile.in (PICFLAG): New. (ALL_CFLAGS): Add PICFLAG. * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * configure: Regenerate. libiberty/ * configure.ac: If --enable-host-shared, use -fPIC. * configure: Regenerate. zlib/ * configure.ac: Add --enable-host-shared, setting up new PICFLAG variable. * Makefile.am: Add PICFLAG to libz_a_CFLAGS. * Makefile.in: Regenerate. * configure: Regenerate. From-SVN: r203632
2013-10-14gimple.c (gimple_canonical_types, [...]): Move to lto/lto.cRichard Biener1-1/+1
2013-10-14 Richard Biener <rguenther@suse.de> * gimple.c (gimple_canonical_types, canonical_type_hash_cache, iterative_hash_canonical_type, gimple_canonical_type_hash, gimple_canonical_types_compatible_p, gimple_canonical_type_eq, gimple_register_canonical_type, print_gimple_types_stats, free_gimple_type_tables): Move to lto/lto.c (gt-gimple.h): Do not include. * gimple.h (gimple_register_canonical_type, print_gimple_types_stats, free_gimple_type_tables): Remove. * Makefile.in (GTFILES): Remove gimple.c. lto/ * lto-lang.c (lto_init): Do not re-init canonical types here. (lto_register_canonical_types): Move to ... * lto.c (lto_register_canonical_types): ... here. (gimple_canonical_types, canonical_type_hash_cache, iterative_hash_canonical_type, gimple_canonical_type_hash, gimple_canonical_types_compatible_p, gimple_canonical_type_eq, gimple_register_canonical_type): Add canonical type merging machinery moved from gimple.c. (read_cgraph_and_symbols): Init and free canonical type tables here. (print_lto_report_1): Report canonical type table stats here. From-SVN: r203521
2013-10-09tree-flow.h (tm_restart_node, gimple_df): Move to gimple-ssa.h.Andrew MacLeod1-1/+1
* tree-flow.h (tm_restart_node, gimple_df): Move to gimple-ssa.h. (struct int_tree_map): Move to tree-hasher.h (SCALE, LABEL, PERCENT): Move to gimple.h * tree-flow-inline.h: Delete. Move functions to other files. (unmodifiable_var_p, ref_contains_array_ref): Unused, so delete. * gimple-ssa.h (tm_restart_node, gimple_df): Relocate from tree-flow.h. (gimple_in_ssa_p, gimple_vop): Relocate from tree-flow-inline.h * gimple.h (imple_stmt_max_uid, set_gimple_stmt_max_uid, inc_gimple_stmt_max_uid, get_lineno): Relocate from tree-flow-inline.h. (SCALE, LABEL, PERCENT): Relocate from tree-flow.h * tree-hasher.h: Don't include tree-flow.h. (struct int_tree_map): Relocate from tree-flow.h. * tree-sra.c (contains_view_convert_expr_p): Relocate from tree-flow-inline.h and make static. * tree-ssa-alias.h (ranges_overlap_p): Relocate from tree-flow-inline.h. * tree-ssa-operands.c (gimple_ssa_operands): Relocate from tree-flow-inline.h and make static. * tree.h (is_global_var, may_be_aliased): Relocate from tree-flow-inline.h. * Makefile.in (GTFILES): Remove tree-flow.h and add gimple-ssa.h. * value-prof.c: No longer include tree-flow-inline.h. * tree-switch-conversion.c: No longer include tree-flow-inline.h. From-SVN: r203318
2013-10-02Makefile.in (expmed.o-warn): Remove.Uros Bizjak1-1/+0
* Makefile.in (expmed.o-warn): Remove. From-SVN: r203130
2013-10-02* Makefile.in (DRIVER_DEFINES): Use $(if), not $(and).Tom Tromey1-1/+1
From-SVN: r203125
2013-09-26gimple.c (gimple_replace_lhs): Move to tree-ssa.c and rename.Andrew MacLeod1-0/+1
2013-09-26 Andrew MacLeod <amacleod@redhat.com> * gimple.c (gimple_replace_lhs): Move to tree-ssa.c and rename. (struct count_ptr_d, count_ptr_derefs, count_uses_and_derefs): Move to tree-ssa.c (create_gimple_tmp): Delete. (get_expr_type, build_assign, build_type_cast): Move to... * gimple-builder.c: New File. (get_expr_type): Relocate from gimple.c. (build_assign, build_type_cast): Change to only create ssanames. * gimple.h: Move prototypes to... * gimple-builder.h: New File. Here. * tree-ssa.h: And here. * tree-ssa.c (struct count_ptr_d, count_ptr_derefs, count_uses_and_derefs): Relocate from gimple.c. (gimple_replace_ssa_lhs): Renamed gimple_replace_ssa from gimple.c * tree-ssa-reassoc.c (repropagate_negates): Use gimple_replace_ssa_lhs. * tree-ssa-math-opts (execute_cse_reciprocals): Use gimple_replace_ssa_lhs. * asan.c: Include gimple-builder.h. * Makefile.in: Add gimple-builder.o. From-SVN: r202945
2013-09-25* Makefile.in (PARTITION_H, LTO_SYMTAB_H, COMMON_TARGET_DEF_H)Tom Tromey1-49/+0
(RTL_ERROR_H, TRANS_MEM_H, COVERAGE_H, DEMANGLE_H, ALIAS_H) (SCHED_INT_H, SEL_SCHED_IR_H, SEL_SCHED_DUMP_H, VALTRACK_H, DDG_H) (GGC_INTERNAL_H, DECNUM_H, BACKTRACE_H, MKDEPS_H, TREE_HASHER_H) (TREE_SSA_LIVE_H, SSAEXPAND_H, DWARF2OUT_H, SCEV_H, OMEGA_H) (TREE_DATA_REF_H, IRA_INT_H, LRA_INT_H, DBGCNT_H, DATA_STREAMER_H) (GIMPLE_STREAMER_H, TREE_STREAMER_H, STREAMER_HOOKS_H) (TREE_VECTORIZER_H, IPA_INLINE_H, GSTAB_H, LIBFUNCS_H) (GRAPHITE_HTAB_H): Remove. From-SVN: r202912
2013-09-25* Makefile.in ($(out_object_file)): Use COMPILE and POSTCOMPILE.Tom Tromey1-9/+3
From-SVN: r202908
2013-09-25* Makefile.in (graph.o, sbitmap.o, sparseset.o, gcc-ar.o)Tom Tromey1-1484/+7
(gcc-ranlib.o, gcc-nm.o, collect2.o, collect2-aix.o, tlink.o) (lto-wrapper.o, default-c.o, attribs.o, incpath.o, prefix.o) (gcc.o, options.o, options-save.o, version.o, gtype-desc.o) (trans-mem.o, ggc-common.o, ggc-page.o, ggc-none.o, stringpool.o) (convert.o, double-int.o, lto-compress.o, data-streamer-in.o) (data-streamer-out.o, data-streamer.o, gimple-streamer-in.o) (gimple-streamer-out.o, tree-streamer.o, tree-streamer-in.o) (tree-streamer-out.o, streamer-hooks.o, lto-cgraph.o) (lto-streamer-in.o, lto-streamer-out.o, lto-section-in.o) (lto-section-out.o, lto-opts.o, lto-streamer.o, langhooks.o) (test-dump.o, tree.o, tree-dump.o, tree-inline.o, print-tree.o) (stor-layout.o, asan.o, tsan.o, ubsan.o, tree-ssa-tail-merge.o) (tree-ssa-structalias.o, tree-ssa-uninit.o, tree-ssa.o) (tree-into-ssa.o, tree-ssa-ter.o, tree-ssa-coalesce.o) (tree-outof-ssa.o, tree-ssa-dse.o, tree-ssa-forwprop.o) (tree-ssa-phiprop.o, tree-ssa-ifcombine.o, tree-ssa-phiopt.o) (tree-nrv.o, tree-ssa-copy.o, tree-ssa-propagate.o) (tree-ssa-dom.o, tree-ssa-uncprop.o, tree-ssa-threadedge.o) (tree-ssa-threadupdate.o, tree-ssanames.o, tree-phinodes.o) (domwalk.o, tree-ssa-live.o, tree-ssa-copyrename.o) (tree-ssa-pre.o, tree-ssa-sccvn.o) (gimple-ssa-strength-reduction.o, tree-vrp.o, tree-cfg.o) (tree-cfgcleanup.o, tree-tailcall.o, tree-ssa-sink.o) (tree-nested.o, tree-if-conv.o, tree-iterator.o, tree-dfa.o) (tree-ssa-operands.o, tree-eh.o, tree-ssa-loop.o) (tree-ssa-loop-unswitch.o, tree-ssa-address.o) (tree-ssa-loop-niter.o, tree-ssa-loop-ivcanon.o) (tree-ssa-loop-ch.o, tree-ssa-loop-prefetch.o, tree-predcom.o) (tree-ssa-loop-ivopts.o, tree-affine.o, tree-ssa-loop-manip.o) (tree-ssa-loop-im.o, tree-ssa-math-opts.o, tree-ssa-alias.o) (tree-ssa-reassoc.o, tree-optimize.o, gimplify.o) (gimple-iterator.o, gimple-fold.o, gimple-low.o, omp-low.o) (tree-browser.o, omega.o, tree-chrec.o, tree-scalar-evolution.o) (tree-data-ref.o, sese.o, graphite.o, graphite-blocking.o) (graphite-clast-to-gimple.o, graphite-dependences.o) (graphite-interchange.o, graphite-poly.o) (graphite-scop-detection.o, graphite-sese-to-poly.o) (graphite-optimize-isl.o, tree-vect-loop.o) (tree-vect-loop-manip.o, tree-vect-patterns.o, tree-vect-slp.o) (tree-vect-stmts.o, tree-vect-data-refs.o, tree-vectorizer.o) (vtable-verify.o, tree-loop-distribution.o, tree-parloops.o) (tree-stdarg.o, tree-object-size.o, internal-fn.o, gimple.o) (gimple-pretty-print.o, tree-mudflap.o, tree-nomudflap.o) (tree-pretty-print.o, tree-diagnostic.o, fold-const.o) (diagnostic.o, diagnostic-color.o, opts.o, opts-global.o) (opts-common.o, targhooks.o, common/common-targhooks.o, input.o) (toplev.o, hwint.o, passes.o, plugin.o, main.o, host-default.o) (rtl-error.o, rtl.o, print-rtl.o, rtlanal.o, varasm.o, function.o) (statistics.o, stmt.o, except.o, expr.o, dojump.o, builtins.o) (calls.o, expmed.o, explow.o, optabs.o, dbxout.o, debug.o) (sdbout.o, dwarf2out.o, dwarf2cfi.o, dwarf2asm.o, vmsdbgout.o) (xcoffout.o, godump.o, emit-rtl.o, real.o, realmpfr.o, dfp.o) (fixed-value.o, jump.o, simplify-rtx.o, symtab.o, cgraph.o) (cgraphunit.o, cgraphclones.o, cgraphbuild.o, varpool.o, ipa.o) (ipa-profile.o, ipa-devirt.o, ipa-prop.o, ipa-ref.o, ipa-cp.o) (ipa-split.o, ipa-inline.o, ipa-inline-analysis.o) (ipa-inline-transform.o, ipa-utils.o, ipa-reference.o) (ipa-pure-const.o, coverage.o, cselib.o, cse.o, dce.o, dumpfile.o) (dse.o, fwprop.o, web.o, ree.o, cprop.o, gcse.o, store-motion.o) (resource.o, lcm.o, mode-switching.o, tree-ssa-dce.o) (tree-call-cdce.o, tree-ssa-ccp.o, tree-ssa-strlen.o, tree-sra.o) (tree-switch-conversion.o, tree-complex.o, tree-emutls.o) (tree-vect-generic.o, df-core.o, df-problems.o, df-scan.o) (regstat.o, valtrack.o, var-tracking.o, profile.o, mcf.o) (tree-profile.o, value-prof.o, loop-doloop.o, alloc-pool.o) (auto-inc-dec.o, cfg.o, cfghooks.o, cfgexpand.o, cfgrtl.o) (cfganal.o, cfgbuild.o, cfgcleanup.o, cfgloop.o, cfgloopanal.o) (graphds.o, loop-iv.o, loop-invariant.o, cfgloopmanip.o) (loop-init.o, loop-unswitch.o, loop-unroll.o, dominance.o) (et-forest.o, combine.o, reginfo.o, bitmap.o, vec.o, hash-table.o) (reload.o, reload1.o, rtlhooks.o, postreload.o, postreload-gcse.o) (caller-save.o, bt-load.o, reorg.o, alias.o, stack-ptr-mod.o) (init-regs.o, ira-build.o, ira-costs.o, ira-conflicts.o) (ira-color.o, ira-emit.o, ira-lives.o, ira.o, lra.o) (lra-assigns.o, lra-coalesce.o, lra-constraints.o) (lra-eliminations.o, lra-lives.o, lra-spills.o, regmove.o) (combine-stack-adj.o, compare-elim.o, ddg.o, modulo-sched.o) (haifa-sched.o, sched-deps.o, sched-rgn.o, sched-ebb.o) (sched-vis.o, sel-sched.o, sel-sched-dump.o, sel-sched-ir.o) (final.o, recog.o, reg-stack.o, sreal.o, predict.o, lists.o) (bb-reorder.o, tracer.o, timevar.o, regcprop.o, regrename.o) (ifcvt.o, params.o, pointer-set.o, hooks.o, pretty-print.o) (errors.o, dbgcnt.o, lower-subreg.o, target-globals.o) (hw-doloop.o, file-find.o, context.o, $(common_out_object_file)) (insn-attrtab.o, insn-automata.o, insn-dfatab.o, insn-emit.o) (insn-enums.o, insn-extract.o, insn-latencytab.o, insn-modes.o) (insn-opinit.o, insn-output.o, insn-peep.o, insn-preds.o) (insn-recog.o, intl.o, cppbuiltin.o, cppdefault.o, gcov.o) (gcov-dump.o): Remove. (default-c.o): Use COMPILE and POSTCOMPILE. (CFLAGS-gcc.o): New variable. ($(common_out_object_file)): Use COMPILE and POSTCOMPILE. From-SVN: r202907
2013-09-25* Makefile.in (c-family/cppspec.o, c-family/c-common.o)Tom Tromey1-81/+1
(c-family/c-cppbuiltin.o, c-family/c-dump.o, c-family/c-format.o) (c-family/c-gimplify.o, c-family/c-lex.o, c-family/c-omp.o) (c-family/c-opts.o, c-family/c-pch.o, c-family/c-ppoutput.o) (c-family/c-pragma.o, c-family/c-pretty-print.o) (c-family/c-semantics.o, c-family/c-ada-spec.o) (c-family/array-notation-common.o, c-family/stub-objc.o) (c-family/c-ubsan.o): Remove. From-SVN: r202903
2013-09-25Makefile.in (C_TREE_H): Reference c/c-tree.h.Tom Tromey1-1/+1
* Makefile.in (C_TREE_H): Reference c/c-tree.h. gcc/c * Make-lang.in (c/gccspec.o): Remove. (CFLAGS-c/gccspec.o): New variable. (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o) (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o) (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove. From-SVN: r202898
2013-09-25Makefile.in (DRIVER_DEFINES): Use $(and), not shell code, to add ↵Tom Tromey1-3/+2
-DENABLE_SHARED_LIBGCC. * Makefile.in (DRIVER_DEFINES): Use $(and), not shell code, to add -DENABLE_SHARED_LIBGCC. (gcc.o): Don't use subshell. gcc/c * Make-lang.in (c/gccspec.o): Don't use subshell. gcc/cp * Make-lang.in (g++spec.o): Don't use subshell. gcc/fortran * Make-lang.in (gfortranspec.o): Don't use subshell. gcc/go * Make-lang.in (gospec.o): Don't use subshell. gcc/java * Make-lang.in (jvspec.o): Don't use subshell. From-SVN: r202897
2013-09-25Makefile.in (OUTPUT_OPTION): Define as "-o $@".Tom Tromey1-3/+4
* Makefile.in (OUTPUT_OPTION): Define as "-o $@". * configure.ac: Don't invoke AM_PROG_CC_C_O. (NO_MINUS_C_MINUS_O, OUTPUT_OPTION): Don't subst. * configure, config.in: Rebuild. gcc/ada * gcc-interface/Makefile.in (OUTPUT_OPTION): Define as "-o $@". From-SVN: r202896
2013-09-25(clh 9)Tom Tromey1-1/+31
From-SVN: r202895
2013-09-25(clh 5)Tom Tromey1-6/+7
From-SVN: r202894
2013-09-25(clh 6)Tom Tromey1-1/+4
From-SVN: r202893
2013-09-12re PR driver/42955 (undecorated cross-compiler gcc fails to find cc1)Brooks Moses1-8/+2
PR driver/42955 * Makefile.in: Do not install driver binaries in $(target)/bin. * cp/Make-lang.in: Likewise. * fortran/Make-lang.in: Likewise. From-SVN: r202544
2013-09-12tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c (SSANAMES...Andrew MacLeod1-1/+2
* tree-flow.h (FREE_SSANAMES): Move to tree-ssanames.c (SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS, ptr_info_def, num_ssa_names, ssa_name): Move to tree-ssanames.h + prototypes. * tree-flow-inline.h (make_ssa_name, copy_ssa_name, duplicate_ssa_name, make_temp_ssa_name): move to tree-ssanames.h * tree-ssa-alias.h: Move prototype. * tree-ssa.h: Include tree-ssanames.h. * tree-ssanames.c (FREE_SSANAMES): Move to here. * tree-ssanames.h: New. Move items from tree-flow*.h * Makefile.in (tree-ssanames.h): Add to tree-ssanames.o and GTFILES. From-SVN: r202527
2013-09-12tree-ssa.h: New.Andrew MacLeod1-148/+149
* tree-ssa.h: New. Move content from tree-flow.h and tree-flow-inline.h. * tree-flow.h (_edge_var_map, edge_var_map_vector): Move to tree-ssa.h. Move prototypes belonging to tree-ssa.c. * tree-flow-inline.h (redirect_edge_var_map_def, redirect_edge_var_map_result, redirect_edge_var_map_location): Move to tree-ssa.h. * gimple.h: Adjust prototypes. * tree-ssa.c (useless_type_conversion_p, types_compatible_p): Move to... * gimple.c (useless_type_conversion_p, types_compatible_p): Here. * tree.h: Move prototype to tree-ssa.h. * gengtype.c (open_base_files): Replace tree-flow.h with tree-ssa.h. * Makefile.in: (TREE_SSA_H, TREE_FLOW_H): Adjust dependencies. * alias.c, asan.c, builtins.c, calls.c, cfgexpand.c, cfghooks.c, cfgloop.c, cfgloopmanip.c, cgraph.c, cgraphbuild.c, cgraphclones.c, cgraphunit.c, dse.c, except.c, expr.c, final.c, fold-const.c, ggc-page.c, gimple-fold.c, gimple-iterator.c, gimple-low.c, gimple-pretty-print.c, gimple-ssa-strength-reduction.c, gimple-streamer-in.c, gimple-streamer-out.c, gimple.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-interchange.c, graphite-optimize-isl.c, graphite-poly.c, graphite-scop-detection.c, graphite-sese-to-poly.c, graphite.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline-transform.c, ipa-inline.c, ipa-prop.c, ipa-pure-const.c, ipa-reference.c, ipa-split.c, ipa-utils.c, loop-init.c, lto-cgraph.c, lto-section-in.c, lto-section-out.c, lto-streamer-in.c, lto-streamer-out.c, lto-streamer.c, omp-low.c, passes.c, predict.c, print-tree.c, profile.c, sese.c, targhooks.c, tracer.c, trans-mem.c, tree-call-cdce.c, tree-cfg.c, tree-cfgcleanup.c, tree-chrec.c, tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-eh.c, tree-emutls.c, tree-if-conv.c, tree-inline.c, tree-into-ssa.c, tree-loop-distribution.c, tree-mudflap.c, tree-nested.c, tree-nrv.c, tree-object-size.c, tree-optimize.c, tree-outof-ssa.c, tree-parloops.c, tree-phinodes.c, tree-predcom.c, tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, tree-sra.c, tree-ssa*.c, tree-stdarg.c, tree-streamer-in.c, tree-switch-conversion.c, tree-tailcall.c, tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop-manip.c, tree-vect-loop.c, tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, tree-vectorizer.c, tree-vrp.c, tsan.c, value-prof.c, var-tracking.c, varpool.c, vtable-verify.c: Replace tree-flow.h with tree-ssa.h From-SVN: r202523
2013-09-10lto-cgraph.c: Include ipa-utils.h.Jan Hubicka1-1/+1
* lto-cgraph.c: Include ipa-utils.h. (compute_ltrans_boundary): Also add possible targets into the boundary. From-SVN: r202447
2013-09-06Makefile.in (tree-sra.o): Update dependencies.Jan Hubicka1-1/+1
* Makefile.in (tree-sra.o): Update dependencies. * tree-sra.c: Include ipa-utils.h (scan_function): Use recursive_call_p. (has_caller_p): New function. (cgraph_for_node_and_aliases): Count also callers of aliases. From-SVN: r202319
2013-09-06re PR middle-end/58094 (IPA devirt testsuite errors)Jan Hubicka1-1/+1
PR middle-end/58094 * cgraph.h (symtab_semantically_equivalent_p): Declare. * tree-tailcall.c: Include ipa-utils.h. (find_tail_calls): Use it. * ipa-pure-const.c (check_call): Likewise. * ipa-utils.c (recursive_call_p): New function. * ipa-utils.h (recursive_call_p): Dclare. * symtab.c (symtab_nonoverwritable_alias): Fix formatting. (symtab_semantically_equivalent_p): New function. * Makefile.in (tree-tailcall.o): Update dependencies. From-SVN: r202316
2013-09-06lto-streamer.h (lto_global_var_decls): Remove.Richard Biener1-5/+0
2013-09-06 Richard Biener <rguenther@suse.de> * lto-streamer.h (lto_global_var_decls): Remove. * Makefile.in (OBJS): Remove lto-symtab.o. (lto-symtab.o): Remove. (GTFILES): Remove lto-symtab.c * lto-symtab.c: Move to lto/ lto/ * lto-symtab.c: Move from gcc/ * lto.h: Include vec.h. (lto_global_var_decls): Declare. * lto.c (lto_global_var_decls): Move definition here. * Make-lang.in (LTO_OBJS): Add lto-symtab.o. (lto-symtab.o): Add. * config-lang.in (gtfiles): Add lto.h. From-SVN: r202313
2013-09-04Makefile.in (ipa-devirt.o): Add dependency on diagnostic.hJan Hubicka1-1/+2
* Makefile.in (ipa-devirt.o): Add dependency on diagnostic.h * ipa-devirt.c: Include diganostic.h (odr_type_d): Add types and types_set. (hash_type_name): Work for types with vtables during LTO. (odr_hasher::remove): Fix comment; destroy types_set. (add_type_duplicate): New function, (get_odr_type): Use it. (dump_type_inheritance_graph): Dump type duplicates. * ipa.c (symtab_remove_unreachable_nodes): Build type inheritance graph. * tree.c (types_same_for_odr): Give exact answers on types with virtual tables. From-SVN: r202258
2013-09-03Delay base decl's alignment adjustment until transformation happensXinliang David Li1-1/+1
From-SVN: r202229
2013-09-03re PR lto/58285 (ICE in lto_output_tree, at lto-streamer-out.c:1318)Richard Biener1-1/+1
2013-09-03 Richard Biener <rguenther@suse.de> PR lto/58285 * tree-streamer-out.c: Include tm.h. * Makefile.in (tree-streamer-out.o): Depend on $(TM_H). From-SVN: r202202
2013-09-02Split all the structures, enums, typedefs and some fundamental declarations ↵Diego Novillo1-4/+7
from tree.h into tree-core.h. Split all the structures, enums, typedefs and some fundamental declarations from tree.h into tree-core.h. Everything else stays in tree.h for now. As we convert gimple files, we'll move declarations out of tree.h into other headers and rewrite missing functions in the new gimple API. * Makefile.in (TREE_CORE_H): Define. (TREE_H): Use. (GTFILES): Add tree-core.h. * builtins.c (built_in_class_names): Use BUILT_IN_LAST to size the array. * tree-core.h: New file. Move all data structures, enum, typedefs, global declarations and constants from ... * tree.h: ... here. From-SVN: r202172
2013-09-02Makefile.in (ubsan.o): Add $(TM_P_H) dependency.Marek Polacek1-1/+1
2013-09-02 Marek Polacek <polacek@redhat.com> * Makefile.in (ubsan.o): Add $(TM_P_H) dependency. From-SVN: r202159
2013-09-01Makefile.in: Add ipa-profile.oJan Hubicka1-4/+10
* Makefile.in: Add ipa-profile.o (ipa.o, ipa-devrit.o, ipa-inline-analysis.o): Adjust dependencies. * cgraph.c (struct cgraph_propagate_frequency_data, cgraph_propagate_frequency_1, cgraph_propagate_frequency): Move to ipa-profile.c; replace cgraph_ by ipa_ prefix. * cgraph.h (cgraph_propagate_frequency): Remove. * ipa-inline-analysis.c: Include ipa-utils.h; drop duplicated cfgloop.h. (inline_update_callee_summaries): Update. * ipa-profile.c: New file. * ipa-utils.h (ipa_propagate_frequency): Declare. * ipa.c: Do not include pointer-set.h, hash-table.h, lto-streamer.h, data-streamer.h, value-prof.h (symtab_remove_unreachable_nodes): Update profile. (struct histogram_entry, histogram, histogram_pool, histogram_hash, account_time_size, cmp_counts, dump_histogram, ipa_profile_generate_summary, ipa_profile_write_summary, ipa_profile_read_summary, ipa_profile, gate_ipa_profile, pass_data_ipa_profile, pass_ipa_profile, make_pass_ipa_profile): Move to ipa-profile.c From-SVN: r202154
2013-08-30Merge ubsan into trunk.Marek Polacek1-3/+12
From-SVN: r202113
2013-08-28ipa-inline.c (edge_badness): Fix integer underflow.Dehao Chen1-1/+1
2013-08-28 Dehao Chen <dehao@google.com> * ipa-inline.c (edge_badness): Fix integer underflow. From-SVN: r202059
2013-08-27Makefile.in (omp-low.o): Depend on $(TARGET_H).Jakub Jelinek1-1/+1
* Makefile.in (omp-low.o): Depend on $(TARGET_H). * cfgloop.h (struct loop): Add safelen, force_vect, simduid. * function.h (struct function): Add has_force_vect_loops and has_simduid_loops. * gimple-pretty-print.c (dump_gimple_omp_for): Handle GF_OMP_FOR_KIND*. * gimple.c (gimple_build_omp_critical): Add KIND argument and handle it. * gimple.def: Update CLAUSES comments. * gimple.h (enum gf_mask): Add GF_OMP_FOR_KIND_{FOR,SIMD}. (gimple_build_omp_for): Add argument to prototype. (gimple_omp_for_kind): New. (gimple_omp_for_set_kind): New. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_LINEAR to GOVD_DATA_SHARE_CLASS. (enum omp_region_type): Add ORT_SIMD. (gimple_add_tmp_var): Handle ORT_SIMD. (gimplify_var_or_parm_decl): Same. (is_gimple_stmt): Same. (omp_firstprivatize_variable): Same. (omp_add_variable): Only use splay_tree_insert if lookup failed. (omp_notice_variable): Handle ORT_SIMD. (omp_is_private): Add SIMD argument and handle it as well as ORT_SIMD. (omp_check_private): Handle ORT_SIMD. (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_LINEAR and OMP_CLAUSE_SAFELEN. (gimplify_adjust_omp_clauses_1): Handle GOVD_LINEAR. Handle OMP_CLAUSE_LASTPRIVATE. (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_LINEAR and OMP_CLAUSE_SAFELEN. (gimplify_omp_for): Handle OMP_SIMD and OMP_CLAUSE_LINEAR. (gimplify_expr): Handle OMP_SIMD. * internal-fn.c (expand_GOMP_SIMD_LANE): New. (expand_GOMP_SIMD_VF): New. (expand_GOMP_SIMD_LAST_LANE): New. * internal-fn.def (GOMP_SIMD_LANE): New. (GOMP_SIMD_VF): New. (GOMP_SIMD_LAST_LANE): New. * omp-low.c: Include target.h. (extract_omp_for_data): Handle OMP_SIMD, OMP_CLAUSE_LINEAR, OMP_CLAUSE_SAFELEN. (check_omp_nesting_restrictions): Same. (omp_max_vf): New. (lower_rec_simd_input_clauses): New. (lower_rec_input_clauses): Handle OMP_SIMD, GF_OMP_FOR_KIND_SIMD, OMP_CLAUSE_LINEAR. (lower_lastprivate_clauses): Handle OMP_CLAUSE_LINEAR, GF_OMP_FOR_KIND_SIMD, OMP_SIMD. (expand_omp_build_assign): New. (expand_omp_for_init_counts): New. (expand_omp_for_init_vars): New. (extract_omp_for_update_vars): New. (expand_omp_for_generic): Use expand_omp_for_{init,update}_vars and rewrite accordingly. (expand_omp_simd): New. (expand_omp_for): Use expand_omp_simd. (lower_omp_for_lastprivate): Unshare vinit when appropriate. (lower_omp_for): Do not lower the body. * tree-data-ref (get_references_in_stmt): Allow IFN_GOMP_SIMD_LANE in their own loops. * tree-flow.h (find_omp_clause): Remove prototype. * tree-if-conv.c (main_tree_if_conversion): Run if doing if conversion, forcing vectorization of the loop, or if flag_tree_vectorize. (gate_tree_if_conversion): Similarly. * tree-inline.c (remap_gimple_stmt): Pass for kind argument to gimple_build_omp_for. (copy_cfg_body): set has_force_vect_loops and has_simduid_loops. * tree-parloops (create_parallel_loop): Pass kind argument to gimple_build_omp_for. * tree-pretty-print.c (dump_omp_clause): Add cases for OMP_CLAUSE_UNIFORM, OMP_CLAUSE_LINEAR, OMP_CLAUSE_SAFELEN, OMP_CLAUSE__SIMDUID_. (dump_generic_node): Handle OMP_SIMD. * tree-ssa-ccp.c (likely_value): Handle IFN_GOMP_SIMD*. * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Do not unroll OMP_SIMD loops here. * tree-ssa-loop.c (gate_tree_vectorize): Run if has_force_vect_loops. * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Handle loop->safelen (vect_analyze_data_refs): Handle simd loops. * tree-vect-loop.c (vectorizable_live_operation): Handle IFN_GOMP_SIMD*. * tree-vect-stmts.c (vectorizable_call): Handle IFN_GOMP_SIMD_LANE. (vectorizable_store): Handle STMT_VINFO_SIMD_LANE_ACCESS_P. (vectorizable_load): Same. * tree-vectorizer.c: Include hash-table.h and tree-ssa-propagate.h. (struct simduid_to_vf): New. (simduid_to_vf::hash): New. (simduid_to-vf::equal): New. (struct simd_array_to_simduid): New. (simd_array_to_simduid::hash): New. (simd_array_to_simduid::equal): New. (adjust_simduid_builtins): New. (struct note_simd_array_uses_struct): New. (note_simd_array_uses_cb): New. (note_simd_array_uses): New. (vectorize_loops): Handle simd hints and adjust simd builtins accordingly. * tree-vectorizer.h (struct _stmt_vec_info): Add simd_lane_access_p field. (STMT_VINFO_SIMD_LANE_ACCESS_P): New macro. * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_LINEAR, OMP_CLAUSE_SAFELEN, OMP_CLAUSE__SIMDUID_, OMP_CLAUSE_UNIFORM. (omp_clause_code_name): Same. (walk_tree_1): Handle OMP_CLAUSE_UNIFORM, OMP_CLAUSE_SAFELEN, OMP_CLAUSE__SIMDUID_, OMP_CLAUSE_LINEAR. * tree.def (OMP_SIMD): New entry. * tree.h (enum omp_clause_code): Add entries for OMP_CLAUSE_LINEAR, OMP_CLAUSE_UNIFORM, OMP_CLAUSE_SAFELEN, OMP_CLAUSE__SIMDUID_. (OMP_CLAUSE_DECL): Adjust range for new clauses. (OMP_CLAUSE_LINEAR_NO_COPYIN): New. (OMP_CLAUSE_LINEAR_NO_COPYOUT): New. (OMP_CLAUSE_LINEAR_STEP): New. (OMP_CLAUSE_SAFELEN_EXPR): New. (OMP_CLAUSE__SIMDUID__DECL): New. (find_omp_clause): New prototype. cp/ * cp-tree.h (CP_OMP_CLAUSE_INFO): Adjust range for new clauses. Co-Authored-By: Aldy Hernandez <aldyh@redhat.com> From-SVN: r202029
2013-08-20Revert my last two changes, r201865 and r201864David Malcolm1-3/+0
2013-08-20 David Malcolm <dmalcolm@redhat.com> Revert my last two changes, r201865 and r201864: Revert r201865: 2013-08-20 David Malcolm <dmalcolm@redhat.com> Make opt_pass and gcc::pass_manager be GC-managed, so that pass instances can own GC refs. * Makefile.in (GTFILES): Add pass_manager.h and tree-pass.h. * context.c (gcc::context::gt_ggc_mx): Traverse passes_. (gcc::context::gt_pch_nx): Likewise. (gcc::context::gt_pch_nx): Likewise. * ggc.h (gt_ggc_mx <T>): New. (gt_pch_nx_with_op <T>): New. (gt_pch_nx <T>): New. * passes.c (opt_pass::gt_ggc_mx): New. (opt_pass::gt_pch_nx): New. (opt_pass::gt_pch_nx_with_op): New. (pass_manager::gt_ggc_mx): New. (pass_manager::gt_pch_nx): New. (pass_manager::gt_pch_nx_with_op): New. (pass_manager::operator new): Use ggc_internal_cleared_alloc_stat rather than xcalloc. * pass_manager.h (class pass_manager): Add GTY((user)) marking. (pass_manager::gt_ggc_mx): New. (pass_manager::gt_pch_nx): New. (pass_manager::gt_pch_nx_with_op): New. * tree-pass.h (class opt_pass): Add GTY((user)) marking. (opt_pass::operator new): New. (opt_pass::gt_ggc_mx): New. (opt_pass::gt_pch_nx): New. (opt_pass::gt_pch_nx_with_op): New. Revert r201864: 2013-08-20 David Malcolm <dmalcolm@redhat.com> * Makefile.in (GTFILES): Add context.h. * context.c (gcc::context::operator new): New. (gcc::context::gt_ggc_mx): New. (gcc::context::gt_pch_nx): New. (gcc::context::gt_pch_nx): New. * context.h (gcc::context): Add GTY((user)) marking. (gcc::context::operator new): New. (gcc::context::gt_ggc_mx): New. (gcc::context::gt_pch_nx): New. (gcc::context::gt_pch_nx): New. (g): Add GTY marking. (gt_ggc_mx (gcc::context *)): New. (gt_pch_nx (gcc::context *)): New. (gt_pch_nx (gcc::context *ctxt, gt_pointer_operator op, void *cookie)): New. * gengtype.c (open_base_files) <ifiles>: Add context.h. From-SVN: r201887
2013-08-20Make opt_pass and gcc::pass_manager be GC-managedDavid Malcolm1-0/+2
2013-08-20 David Malcolm <dmalcolm@redhat.com> Make opt_pass and gcc::pass_manager be GC-managed, so that pass instances can own GC refs. * Makefile.in (GTFILES): Add pass_manager.h and tree-pass.h. * context.c (gcc::context::gt_ggc_mx): Traverse passes_. (gcc::context::gt_pch_nx): Likewise. (gcc::context::gt_pch_nx): Likewise. * ggc.h (gt_ggc_mx <T>): New. (gt_pch_nx_with_op <T>): New. (gt_pch_nx <T>): New. * passes.c (opt_pass::gt_ggc_mx): New. (opt_pass::gt_pch_nx): New. (opt_pass::gt_pch_nx_with_op): New. (pass_manager::gt_ggc_mx): New. (pass_manager::gt_pch_nx): New. (pass_manager::gt_pch_nx_with_op): New. (pass_manager::operator new): Use ggc_internal_cleared_alloc_stat rather than xcalloc. * pass_manager.h (class pass_manager): Add GTY((user)) marking. (pass_manager::gt_ggc_mx): New. (pass_manager::gt_pch_nx): New. (pass_manager::gt_pch_nx_with_op): New. * tree-pass.h (class opt_pass): Add GTY((user)) marking. (opt_pass::operator new): New. (opt_pass::gt_ggc_mx): New. (opt_pass::gt_pch_nx): New. (opt_pass::gt_pch_nx_with_op): New. From-SVN: r201865
2013-08-20Make gcc::context be GC-managedDavid Malcolm1-0/+1
* Makefile.in (GTFILES): Add context.h. * context.c (gcc::context::operator new): New. (gcc::context::gt_ggc_mx): New. (gcc::context::gt_pch_nx): New. (gcc::context::gt_pch_nx): New. * context.h (gcc::context): Add GTY((user)) marking. (gcc::context::operator new): New. (gcc::context::gt_ggc_mx): New. (gcc::context::gt_pch_nx): New. (gcc::context::gt_pch_nx): New. (g): Add GTY marking. (gt_ggc_mx (gcc::context *)): New. (gt_pch_nx (gcc::context *)): New. (gt_pch_nx (gcc::context *ctxt, gt_pointer_operator op, void *cookie)): New. * gengtype.c (open_base_files) <ifiles>: Add context.h. From-SVN: r201864
2013-08-19Makeifle-in (ipa-devirt.o): New.Jan Hubicka1-2/+6
* Makeifle-in (ipa-devirt.o): New. (GTFILES): Add ipa-utils.h and ipa-devirt.c * cgraphunit.c (decide_is_symbol_needed): Do not care about virtuals. (analyze_functions): Look into possible targets of polymorphic call. * dumpfile.c (dump_files): Add type-inheritance dump. * dumpfile.h (TDI_inheritance): New. * ipa-devirt.c: New file. * ipa-utils.h (odr_type_d): Forward declare. (odr_type): New type. (build_type_inheritance_graph): Declare. (possible_polymorphic_call_targets): Declare and introduce inline variant when only edge is pased. (dump_possible_polymorphic_call_targets): Likewise. * timevar.def (TV_IPA_INHERITANCE, TV_IPA_VIRTUAL_CALL): New. * tree.c (type_in_anonymous_namespace_p): Break out from ... (types_same_for_odr): ... here. * tree.h (type_in_anonymous_namespace_p): Declare. * g++.dg/ipa/type-inheritance-1.C: New testcase. From-SVN: r201836
2013-08-06Commit the vtable verification feature.Caroline Tice1-0/+8
Commit the vtable verification feature. This feature is designed to detect, at run time, if/when the vtable pointer in a C++ object has been corrupted, before allowing virtual calls through that pointer. If pointer corruption is detected, execution of the program is halted. libstdc++-v3 ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * fragment.am: Add XTEMPLATE_FLAGS. * configure.ac: Add definitions for --enable-vtable-verify. * acinclude.m4: Add --enable-vtable-verify and --disable-vtable-verify; define --enable-vtable-verify; define VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS. * config/abi/pre/gnu.ver: Export symbols for vtable verification. * libsupc++/Makefile.am: Define vtv_sources and add it to libsupc___la_SOURCES and libsupc__convenience_la_SOURCES. * libsupc++/vtv_stubs.cc: New file. * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS. * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXLINKFLAGS to CXXLINK. * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK. * src/C++11/Makefile.am: Ditto. * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify. * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS. * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate libvtv if --enable-vtable-verify was used; set cxxvtvflags; add cxxvtvflags to cxx_final. * testsuite/18_support/bad_exception/23591_thread-1.c: Add -fvtable-verify=none to compiler flags. * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none to compiler flags. * configure: Regenerated. * Makefile.in: Regenerated. * python/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * config.h.in: Regenerated. * po/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. top level ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * configure.ac: Add target-libvtv to target_libraries; disable libvtv on non-linux systems; add target-libvtv to noconfigdirs; add libsupc++/.libs to C++ library search paths. * configure: Regenerated. * Makefile.def: Add libvtv to target_modules; make libvtv depend on libstdc++ and libgcc. * Makefile.in: Regenerated. include/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * vtv-change-permission.h: New file. contrib/ChangeLog: 2013-08-06 Caroline Tice4 <cmtice@google.com> * gcc_update: Add libvtv files. libgcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> config.host (extra_parts): Add vtv_start.o, vtv_end.o vtv_start_preinit.o and vtv_end_preinit.o. configure.ac: Add code to check/set enable_vtable_verify. Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is true. vtv_start_preinit.c: New file. vtv_end_preinit.c: New file. vtv_start.c: New file. vtv_end.c: New file. configure: Regenerated. gcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * gcc.c (VTABLE_VERIFICATION_SPEC): New definition. (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC. * tree-pass.h: Add pass_vtable_verify. * varasm.c (assemble_variable): Add code to properly set the comdat section and name for the .vtable_map_vars section. (assemble_vtyv_preinit_initializer): New function. (default_sectin_type_flags): Make sure .vtable_map_vars section has LINK_ONCE flag. * output.h: Add function decl for assemble_vtv_preinit_initializer. * vtable-verify.c: New file. * vtable-verify.h: New file. * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify initialiation levels. * timevar.def (TV_VTABLE_VERIFICATION): New definition. * passes.def: Insert pass_vtable_verify. * aclocal.m4: Reorder includes. * doc/invoke.texi: Add documentation for the flags -fvtable-verify=, -fvtv-debug and -fvtv-counts. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o, as appropriate, if -fvtable-verify=... is used. (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if -fvtable-verify=... is used. * Makefile.in (OBJS): Add vtable-verify.o to list. (vtable-verify.o): Add new build rule. (GTFILES): Add vtable-verify.c to list. * common.opt (fvtable-verify=): New flag. (vtv_priority): Values for fvtable-verify= flag. (fvtv-counts): New flag. (fvtv-debug): New flag. * tree.h (save_vtable_map_decl): New extern function decl. gcc/cp/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to list. (vtable-class-hierarchy.o): Add build rule. * cp-tree.h (vtv_start_verification_constructor_init_function): New extern function decl. (vtv_finish_verification_constructor_init_function): New extern function decl. (build_vtbl_address): New extern function decl. (get_mangled_vtable_map_var_name): New extern function decl. (vtv_compute_class_hierarchy_transitive_closure): New extern function decl. (vtv_generate_init_routine): New extern function decl. (vtv_save_class_info): New extern function decl. (vtv_recover_class_info): New extern function decl. (vtv_build_vtable_verify_fndecl): New extern function decl. * class.c (finish_struct_1): Add call to vtv_save_class_info if flag_vtable_verify is true. * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list. * vtable-class-hierarchy.c: New file. * mangle.c (get_mangled_vtable_map_var_name): New function. * decl2.c (start_objects): Update function comment. (cp_write_global_declarations): Call vtv_recover_class_info, vtv_compute_class_hierarchy_transitive_closure and vtv_build_vtable_verify_fndecl, before calling finalize_compilation_unit, and call vtv_generate_init_rount after, IFF flag_vtable_verify is true. (vtv_start_verification_constructor_init_function): New function. (vtv_finish_verification_constructor_init_function): New function. * init.c (build_vtbl_address): Remove static qualifier from function. libvtv/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> Initial check-in of new vtable verification feature. * configure.ac : New file. * acinclude.m4 : New file. * Makefile.am : New file. * aclocal.m4 : New file. * configure.tgt : New file. * configure: New file (generated). * Makefile.in: New file (generated). * vtv_set.h : New file. * vtv_utils.cc : New file. * vtv_utils.h : New file. * vtv_malloc.cc : New file. * vtv_rts.cc : New file. * vtv_malloc.h : New file. * vtv_rts.h : New file. * vtv_fail.cc : New file. * vtv_fail.h : New file. * vtv_map.h : New file. * scripts/run-testsuite.sh : New file. * scripts/sum-vtv-counts.c : New file. * testsuite/parts-test-main.h : New file. * testusite/dataentry.cc : New file. * testsuite/temp_deriv.cc : New file. * testsuite/register_pair.cc : New file. * testsuite/virtual_inheritance.cc : New file. * testsuite/field-test.cc : New file. * testsuite/nested_vcall_test.cc : New file. * testsuite/template-list-iostream.cc : New file. * testsuite/register_pair_inserts.cc : New file. * testsuite/register_pair_inserts_mt.cc : New file. * testsuite/event.list : New file. * testsuite/parts-test-extra-parts-views.cc : New file. * testsuite/parts-test-extra-parts-views.h : New file. * testsuite/environment-fail-32.s : New file. * testsuite/parts-test-extra-parts.h : New file. * testsuite/temp_deriv2.cc : New file. * testsuite/dlopen_mt.cc : New file. * testsuite/event.h : New file. * testsuite/template-list.cc : New file. * testsuite/replace-fail.cc : New file. * testsuite/Makefile.am : New file. * testsuite/Makefile.in: New file (generated). * testsuite/mempool_negative.c : New file. * testsuite/parts-test-main.cc : New file. * testsuite/event-private.cc : New file. * testsuite/thunk.cc : New file. * testsuite/event-defintiions.cc : New file. * testsuite/event-private.h : New file. * testsuite/parts-test.list : New file. * testusite/register_pair_mt.cc : New file. * testsuite/povray-derived.cc : New file. * testsuite/event-main.cc : New file. * testsuite/environment.cc : New file. * testsuite/template-list2.cc : New file. * testsuite/thunk_vtable_map_attack.cc : New file. * testsuite/parts-test-extra-parts.cc : New file. * testsuite/environment-fail-64.s : New file. * testsuite/dlopen.cc : New file. * testsuite/so.cc : New file. * testsuite/temp_deriv3.cc : New file. * testsuite/const_vtable.cc : New file. * testsuite/mempool_positive.c : New file. * testsuite/dup_name.cc : New file. From-SVN: r201555
2013-08-05Handwritten part of conversion of passes to C++ classesDavid Malcolm1-2/+2
gcc/ * Makefile.in (PASS_MANAGER_H): Add dep on pass-instances.def. (toplev.o): Add dep on PASS_MANAGER_H. * cgraphunit.c (cgraph_process_new_functions): Rework invocation of early local pases to reflect this moving from a global to a member of gcc::pass_manager. (cgraph_add_new_function): Likewise. * lto-cgraph.c (lto_output_node): Update for conversion of struct ipa_opt_pass_d to a C++ subclass of opt_pass. * passes.c (opt_pass::clone): New. (opt_pass::gate): New. (opt_pass::execute): New. (opt_pass::opt_pass): New. (pass_manager::execute_early_local_passes): New. (pass_manager::execute_pass_mode_switching): new. (finish_optimization_passes): Convert to... (pass_manager::finish_optimization_passes): ...this. (finish_optimization_passes): Update for conversion of passes to C++ classes. (register_dump_files_1): Use has_gate since we cannot portably check a vtable entry against NULL. (dump_one_pass): Likewise. (ipa_write_summaries_2): Likewise. (ipa_write_optimization_summaries_1): Likewise. (ipa_read_summaries_1): Likewise. (ipa_read_optimization_summaries_1): Likewise. (execute_ipa_stmt_fixups): Likewise. (pass_manager::pass_manager): Rewrite pass-creation, invoking pass-creation functions rather than wiring up globals, and storing the results in fields of pass_manager generated using pass-instances.def. (pass_manager::dump_profile_report): Update for conversion of passes to C++ classes. (pass_manager::execute_ipa_summary_passes): Likewise. (execute_one_ipa_transform_pass): Likewise. (execute_one_pass): Use has_gate and has_execute since we cannot portably check a vtable entry against NULL. * pass_manager.h (pass_manager::finish_optimization_passes): New. (pass_manager): Use pass-instances.def to add fields for the various pass instances. * toplev.c (finalize): Update for move of finish_optimization_passes to a method of gcc::pass_manager. * toplev.h (finish_optimization_passes): Move to method of class pass_manager. * tree-pass.h (struct pass_data): New. (opt_pass): Convert to C++ class, make it a subclass of pass_data. (opt_pass::gate): Convert to virtual function. (opt_pass::~opt_pass): New. (opt_pass::clone): New. (opt_pass::execute): Convert to virtual function. (opt_pass::opt_pass): New. (opt_pass::ctxt_): new. (gimple_opt_pass): Convert to subclass of opt_pass. (gimple_opt_pass::gimple_opt_pass): New. (rtl_opt_pass): Convert to subclass of opt_pass. (rtl_opt_pass::rtl_opt_pass): New. (ipa_opt_pass_d): Convert to subclass of opt_pass. (ipa_opt_pass_d::ipa_opt_pass_d): New. (simple_ipa_opt_pass): Convert to subclass of opt_pass. (simple_ipa_opt_pass::simple_ipa_opt_pass): New. * config/i386/i386.c (rest_of_handle_insert_vzeroupper): Rework invocation of pass_mode_switching to reflect this moving from a global to a member of gcc::pass_manager. (ix86_option_override): Rework how pass_insert_vzeroupper is added to the pass_manager to reflect autogenerated changes. * config/i386/t-i386 (i386.o) Add deps on CONTEXT_H and PASS_MANAGER_H. gcc/testsuite/ * g++.dg/plugin/dumb_plugin.c (plugin_init): Rework how the pass is created and added to the pass_manager to reflect autogenerated changes. * g++.dg/plugin/selfassign.c (plugin_init): Likewise. * gcc.dg/plugin/one_time_plugin.c (plugin_init): Likewise. * gcc.dg/plugin/selfassign.c (plugin_init): Likewise. From-SVN: r201505
2013-07-31Introduce gen-pass-instances.awk and pass-instances.defDavid Malcolm1-1/+5
Introduce a new gen-pass-instances.awk script, and use it at build time to make a pass-instances.def from passes.def. gcc/ * Makefile.in (pass-instances.def): New. (passes.o): Replace dependency on passes.def with one on pass-instances.def * gen-pass-instances.awk: New. * passes.c (pass_manager::pass_manager): Use pass-instances.def rather than passes.def, updating local definition of NEXT_PASS macro to add an extra NUM parameter (currently unused). From-SVN: r201359
2013-07-30Introduce beginnings of a pass_manager class.David Malcolm1-5/+10
This patch introduces a gcc::pass_manager class and moves various non-GTY globals relating to pass management into it. The gcc::context gains its first field: a pointer to the gcc::pass_manager instance. gcc/ * Makefile.in (PASS_MANAGER_H): New. (lto-cgraph.o): Depend on CONTEXT_H and PASS_MANAGER_H. (passes.o): Likewise. (statistics.o): Likewise. (cgraphunit.o): Likewise. (context.o): Depend on PASS_MANAGER_H. * pass_manager.h: New. * cgraphunit.c (cgraph_add_new_function): Update for moves of globals to fields of pass_manager. (analyze_function): Likewise. (expand_function): Likewise. (ipa_passes): Likewise. (compile): Likewise. * context.c (context::context): New. * context.h (context::context): New. (context::get_passes): New. (context::passes_): New. * lto-cgraph.c (input_node): Update for moves of globals to fields of pass_manager. * passes.c (all_passes): Remove, in favor of a field of the same name within the new class pass_manager. (all_small_ipa_passes): Likewise. (all_lowering_passes): Likewise. (all_regular_ipa_passes): Likewise. (all_late_ipa_passes): Likewise. (all_lto_gen_passes): Likewise. (passes_by_id): Likewise. (passes_by_id_size): Likewise. (gcc_pass_lists): Remove, in favor of "pass_lists" field within the new class pass_manager. (set_pass_for_id): Convert to... (pass_manager::set_pass_for_id): ...method. (get_pass_for_id): Convert to... (pass_manager::get_pass_for_id): ...method. (register_one_dump_file): Move body of implementation into... (pass_manager::register_one_dump_file): ...here. (register_dump_files_1): Convert to... (pass_manager::register_dump_files_1): ...method. (register_dump_files): Convert to... (pass_manager::register_dump_files): ...method. (create_pass_tab): Update for moves of globals to fields of pass_manager. (dump_passes): Move body of implementation into... (pass_manager::dump_passes): ...here. (register_pass): Move body of implementation into... (pass_manager::register_pass): ...here. (init_optimization_passes): Convert into... (pass_manager::pass_manager): ...constructor for new pass_manager class, and initialize the pass_lists array. (check_profile_consistency): Update for moves of globals to fields of pass_manager. (dump_profile_report): Move body of implementation into... (pass_manager::dump_profile_report): ...here. (ipa_write_summaries_1): Update for moves of pass lists from being globals to fields of pass_manager. (ipa_write_optimization_summaries): Likewise. (ipa_read_summaries): Likewise. (ipa_read_optimization_summaries): Likewise. (execute_all_ipa_stmt_fixups): Likewise. * statistics.c (statistics_fini): Update for moves of globals to fields of pass_manager. * toplev.c (general_init): Replace call to init_optimization_passes with construction of the pass_manager instance. * tree-pass.h (all_passes): Remove, in favor of a field of the same name within the new class pass_manager. (all_small_ipa_passes): Likewise. (all_lowering_passes): Likewise. (all_regular_ipa_passes): Likewise. (all_lto_gen_passes): Likewise. (all_late_ipa_passes): Likewise. (passes_by_id): Likewise. (passes_by_id_size): Likewise. (gcc_pass_lists): Remove, in favor of "pass_lists" field within the new class pass_manager. (get_pass_for_id): Remove. gcc/lto/ * Make-lang.in (lto/lto.o:): Depend on CONTEXT_H and PASS_MANAGER_H. * lto.c (do_whole_program_analysis): Update for move of all_regular_ipa_passes from a global to a field of class pass_manager. From-SVN: r201351
2013-07-25Introduce context class.David Malcolm1-1/+5
2013-07-24 David Malcolm <dmalcolm@redhat.com> Introduce context class. * Makefile.in (CONTEXT_H): New. (OBJS): Add context.o. (toplev.o): Add CONTEXT_H to dependencies. (context.o): New. * toplev.c (general_init): Create the singleton gcc::context instance. * context.c: New. * context.h: New. From-SVN: r201230
2013-07-18passes.def: New.David Malcolm1-1/+1
* passes.def: New. * passes.c (init_optimization_passes): Move the construction of the pass hierarchy into a new passes.def file. * Makefile.in (passes.o): Add dependency on passes.def. From-SVN: r201038
2013-07-08* Makefile.in: (c-family-warn): Define to $(STRICT_WARN)Graham Stott1-0/+2
From-SVN: r200783
2013-07-08* Makefile.in (tree-ssa-reassoc.o): Add dependency on $(PARAMS_H).Eric Botcazou1-1/+1
From-SVN: r200777
2013-06-27re PR c++/57208 (Latest chromium compilation fails with enabled LTO)Martin Jambor1-1/+2
2013-06-27 Martin Jambor <mjambor@suse.cz> PR lto/57208 * ipa-ref.h (ipa_maybe_record_reference): Declare. * ipa-ref.c (ipa_maybe_record_reference): New function. * cgraphclones.c (cgraph_create_virtual_clone): Use it. * ipa-cp.c (create_specialized_node): Record potential references from aggvals. * Makefile.in (ipa-ref.o): Add IPA_REF_H to dependencies. From-SVN: r200468
2013-06-18Makefile.in (LTO_STREAMER_H): Add pointer-set.h dependency.Richard Biener1-1/+1
2013-06-18 Richard Biener <rguenther@suse.de> * Makefile.in (LTO_STREAMER_H): Add pointer-set.h dependency. * lto-streamer.h: Include pointer-set.h. (struct lto_decl_slot): Remove. (struct lto_tree_ref_encoder): Make tree_hash_table a pointer-map. Remove next_index entry. (lto_hash_decl_slot_node, lto_eq_decl_slot_node, lto_hash_type_slot_node, lto_eq_type_slot_node): Remove. (lto_init_tree_ref_encoder): Adjust. (lto_destroy_tree_ref_encoder): Likewise. * lto-section-out.c (lto_hash_decl_slot_node, lto_eq_decl_slot_node, lto_hash_type_slot_node, lto_eq_type_slot_node): Remove. (lto_output_decl_index): Adjust. (lto_new_out_decl_state): Likewise. (lto_record_function_out_decl_state): Likewise. * lto-streamer-out.c (copy_function): Likewise. From-SVN: r200171
2013-06-18Makefile.in (cgraphunit.o): Add $(CFGLOOP_H) dependency.Richard Biener1-1/+1
2013-06-18 Richard Biener <rguenther@suse.de> * Makefile.in (cgraphunit.o): Add $(CFGLOOP_H) dependency. * cgraphunit.c: Include cfgloop.h. (init_lowered_empty_function): Initialize the loop tree. (assemble_thunk): Insert new BBs into loops. From-SVN: r200169
2013-06-14* Makefile.in (TARGET_H): Add insn-codes.h.Mike Stump1-1/+1
From-SVN: r200093
2013-06-06re PR c++/53743 (ICE when compiling firefox with PGO and LTO)Teresa Johnson1-1/+1
2013-06-06 Teresa Johnson <tejohnson@google.com> PR c++/53743 * ifcvt.c (find_if_case_1): Replace BB_COPY_PARTITION with assert as this is now done by redirect_edge_and_branch_force. * function.c (thread_prologue_and_epilogue_insns): Insert new bb after barriers, and fix interaction with splitting. * emit-rtl.c (try_split): Copy REG_CROSSING_JUMP notes. * cfgcleanup.c (try_forward_edges): Fix early return value to properly reflect changes made in the routine. * bb-reorder.c (emit_barrier_after_bb): Move to cfgrtl.c. (fix_up_fall_thru_edges): Remove incorrect check for bb layout order since this is called in cfglayout mode, and replace partition fixup with assert as that is now done by force_nonfallthru_and_redirect. (add_reg_crossing_jump_notes): Handle the fact that some jumps may already be marked with region crossing note. (insert_section_boundary_note): Make non-static, gate on flag has_bb_partition, rewrite to also check for multiple partitions. (rest_of_handle_reorder_blocks): Remove call to insert_section_boundary_note, now done later during free_cfg. (duplicate_computed_gotos): Don't duplicate partition crossing edge. * bb-reorder.h (insert_section_boundary_note): Declare. * Makefile.in (cfgrtl.o): Depend on bb-reorder.h * cfgrtl.c (rest_of_pass_free_cfg): If partitions exist invoke insert_section_boundary_note. (try_redirect_by_replacing_jump): Remove unnecessary check for region crossing note. (fixup_partition_crossing): New function. (rtl_redirect_edge_and_branch): Fixup partition boundaries. (emit_barrier_after_bb): Move here from bb-reorder.c, handle insertion in non-cfglayout mode. (force_nonfallthru_and_redirect): Fixup partition boundaries, remove old code that tried to do this. Emit barrier correctly when we are in cfglayout mode. (last_bb_in_partition): New function. (rtl_split_edge): Correctly fixup partition boundaries. (commit_one_edge_insertion): Remove old code that tried to fixup region crossing edge since this is now handled in split_block, and set up insertion point correctly since block may now end in a jump. (verify_hot_cold_block_grouping): Guard against checking when not in linearized RTL mode. (rtl_verify_edges): Add checks for incorrect/missing REG_CROSSING_JUMP notes. (rtl_verify_flow_info_1): Move verify_hot_cold_block_grouping to rtl_verify_flow_info, so not called in cfglayout mode. (rtl_verify_flow_info): Move verify_hot_cold_block_grouping here. (fixup_reorder_chain): Remove old code that attempted to fixup region crossing note as this is now handled in force_nonfallthru_and_redirect. (duplicate_insn_chain): Don't duplicate switch section notes. (rtl_can_remove_branch_p): Remove unnecessary check for region crossing note. * basic-block.h (emit_barrier_after_bb): Declare. * testsuite/gcc.dg/tree-prof/va-arg-pack-1.c: Cloned from c-torture, made into -freorder-blocks-and-partition test. * testsuite/gcc.dg/tree-prof/comp-goto-1.c: Ditto. * testsuite/gcc.dg/tree-prof/20041218-1.c: Ditto. * testsuite/gcc.dg/tree-prof/pr52027.c: Use -O2. * testsuite/gcc.dg/tree-prof/pr50907.c: Ditto. * testsuite/gcc.dg/tree-prof/pr45354.c: Ditto. * testsuite/g++.dg/tree-prof/partition2.C: Ditto. * testsuite/g++.dg/tree-prof/partition3.C: Ditto. From-SVN: r199744