From 41a8aa412689c9823fdab11b453487e3075a6816 Mon Sep 17 00:00:00 2001 From: dnovillo Date: Mon, 21 Oct 2013 19:36:37 +0000 Subject: Re-factor inclusion of tree.h. This moves tree.h out of every header. This exposes dependencies of tree.h in files that should probably not need it after tree and gimple are separated. After this change, no header should include tree.h directly. It should only be included by a .c file. Unfortunately, I did not find an automatic way of forcing this. Tested on x86_64 with all languages enabled and using contrib/config-list.mk. 2013-10-21 Diego Novillo * asan.c: Include tree.h * bb-reorder.c: Likewise. * cfgcleanup.c: Likewise. * cfgloopmanip.c: Likewise. * data-streamer-in.c: Likewise. * data-streamer-out.c: Likewise. * data-streamer.c: Likewise. * dwarf2cfi.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.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. * ipa-devirt.c: Likewise. * ipa-profile.c: Likewise. * ipa.c: Likewise. * ira.c: Likewise. * loop-init.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto/lto-object.c: Likewise. * recog.c: Likewise. * reginfo.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-parloops.c: Likewise. * tree-ssa-strlen.c: Likewise. * tree-streamer.c: Likewise. * value-prof.c: Likewise. * target-globals.c: Likewise. * expr.h: Include tree-core.h instead of tree.h. * gimple.h: Likewise. * ipa-prop.h: Likewise. * ipa-utils.h: Likewise. * lto-streamer.h: Likewise. * streamer-hooks.h: Likewise. * ipa-reference.h: Include cgraph.h instead of tree.h. * cgraph.h: Include basic-block.h instead of tree.h. * tree-streamer.h: Do not include tree.h. * genattrtab.c (write_header): Generate inclusion of tree.h. * genautomata.c (main): Likewise. * genemit.c: Likewise. * genopinit.c: Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c: Likewise. testsuite/ChangeLog * g++.dg/plugin/selfassign.c: Include tree.h. * gcc.dg/plugin/finish_unit_plugin.c: Likewise. * gcc.dg/plugin/ggcplug.c: Likewise. * gcc.dg/plugin/one_time_plugin.c: Likewise. * gcc.dg/plugin/selfassign.c: Likewise. * gcc.dg/plugin/start_unit_plugin.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203908 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/graphite-clast-to-gimple.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/graphite-clast-to-gimple.c') diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index d0e23021f5d..7db4da6eac2 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "coretypes.h" #include "diagnostic-core.h" +#include "tree.h" #include "tree-ssa.h" #include "tree-pass.h" #include "cfgloop.h" -- cgit v1.2.1 From 073c1fd518ba7712e61c3f8f54eeb8addd769e0e Mon Sep 17 00:00:00 2001 From: amacleod Date: Wed, 23 Oct 2013 12:16:58 +0000 Subject: * tree-ssa.h: Remove all #include's * gengtype.c (open_base_files): Adjust include list for gtype-desc.c. * alias.c: Move required includes from tree-ssa.h. * asan.c: Likewise. * builtins.c: Likewise. * calls.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfgloop.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * cgraphbuild.c: Likewise. * cgraphclones.c: Likewise. * cgraphunit.c: Likewise. * dse.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * ggc-page.c: Likewise. * gimple-builder.c: Likewise. * gimple-fold.c: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple-ssa-strength-reduction.c: Likewise. * gimple-streamer-in.c: Likewise. * gimple-streamer-out.c: Likewise. * gimplify.c: Likewise. * graphite-blocking.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * graphite-dependences.c: Likewise. * graphite-interchange.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. * ipa-cp.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * loop-init.c: Likewise. * lto-cgraph.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. * omp-low.c: Likewise. * passes.c: Likewise. * predict.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * sese.c: Likewise. * targhooks.c: Likewise. * tracer.c: Likewise. * trans-mem.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-dfa.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-loop-distribution.c: Likewise. * tree-mudflap.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-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-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. * value-prof.c: Likewise. * var-tracking.c: Likewise. * varpool.c: Likewise. * vtable-verify.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203967 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/graphite-clast-to-gimple.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/graphite-clast-to-gimple.c') diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 7db4da6eac2..de513e5de3a 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -36,7 +36,10 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "diagnostic-core.h" #include "tree.h" -#include "tree-ssa.h" +#include "gimple.h" +#include "gimple-ssa.h" +#include "tree-ssa-loop.h" +#include "tree-into-ssa.h" #include "tree-pass.h" #include "cfgloop.h" #include "tree-chrec.h" -- cgit v1.2.1 From 05d9c18a6704d4cbcd8368f3b5e10b1a26289ac7 Mon Sep 17 00:00:00 2001 From: amacleod Date: Wed, 23 Oct 2013 18:55:46 +0000 Subject: * tree-ssa-loop.h: Remove include files. * gengtype.c (open_base_files): Adjust include list for gtype-desc.c. * cfgloopmanip.c: Move required includes from tree-ssa-loop.h. * graphite-clast-to-gimple.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite-sese-to-poly.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-pure-const.c: Likewise. * loop-init.c: Likewise. * passes.c: Likewise. * predict.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-data-ref.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-parloops.c: Likewise. * tree-predcom.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-loop.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-reassoc.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vrp.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203987 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/graphite-clast-to-gimple.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/graphite-clast-to-gimple.c') diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index de513e5de3a..04c23c5bff7 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see #include "tree.h" #include "gimple.h" #include "gimple-ssa.h" +#include "tree-ssa-loop-manip.h" #include "tree-ssa-loop.h" #include "tree-into-ssa.h" #include "tree-pass.h" -- cgit v1.2.1 From e85cf4e5d0d8c9388d3eaaaa606b5db4e9ed62e8 Mon Sep 17 00:00:00 2001 From: dnovillo Date: Fri, 1 Nov 2013 20:31:32 +0000 Subject: Replace some heap vectors with stack vectors. From http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02735.html This patch is pretty dull, it just replaces a bunch of things of the form vec x; x.create (N); // N is a constant blah blah x.release (); by stack_vec x; blah blah 2013-11-01 Trevor Saunders gcc/ * function.c (reorder_blocks): Convert block_stack to a stack_vec. * gimplify.c (gimplify_compound_lval): Likewise. * graphite-clast-to-gimple.c (gloog): Likewise. * graphite-dependences.c (loop_is_parallel_p): Likewise. * graphite-scop-detection.c (scopdet_basic_block_info): Likewise. (limit_scop); Likewise. (build_scops): Likewise. (dot_scop): Likewise. * graphite-sese-to-poly.c (sese_dom_walker): Likewise. (build_scop_drs): Likewise. (insert_stmts): Likewise. (insert_out_of_ssa_copy): Likewise. (remove_phi): Likewise. (rewrite_commutative_reductions_out_of_ssa_close_phi): Likewise. * hw-doloop.c (discover_loop): Likewise. * tree-call-cdce.c (shrink_wrap_one_built_in_call): Likewise. * tree-dfa.c (dump_enumerated_decls): Likewise. * tree-if-conv.c (if_convertable_loop_p): Likewise. * tree-inline.c (tree_function_versioning): Likewise. * tree-loop-distribution.c (build_rdg): Likewise. (rdg_flag_vertex_and_dependent): Likewise. (distribute_loop): Likewise. * tree-parloops.c (loop_parallel_p): Likewise. (eliminate_local_variables): Likewise. (separate_decls_in_region): Likewise. * tree-predcom.c (tree_predictive_commoning_loop): Likewise. * tree-ssa-phiopt.c (cond_if_else_store_replacement): Likewise. * tree-ssa-uncprop.c (uncprop_dom_walker): Likewise. * tree-vect-loop.c (vect_analyze_scaler_cycles_1): Likewise. * tree-vect-patterns.c (vect_pattern_recog): Likewise. * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise. (vectorizable_condition): Likewise. gcc/cp/ * semantics.c (build_anon_member_initialization): Convert fields to be a stack_vec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204301 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/graphite-clast-to-gimple.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gcc/graphite-clast-to-gimple.c') diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 04c23c5bff7..ec4c1d1f461 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -1652,8 +1652,7 @@ debug_generated_program (scop_p scop) bool gloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping) { - vec newivs; - newivs.create (10); + stack_vec newivs; loop_p context_loop; sese region = SCOP_REGION (scop); ifsese if_region = NULL; @@ -1711,7 +1710,6 @@ gloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping) newivs_index.dispose (); params_index.dispose (); - newivs.release (); cloog_clast_free (clast); timevar_pop (TV_GRAPHITE_CODE_GEN); -- cgit v1.2.1