gimple-expr.h (create_tmp_var_name, [...]): Relocate prototypes from gimple.h.

2013-11-12  Andrew MacLeod  <amacleod@redhat.com>

	* gimple-expr.h (create_tmp_var_name, create_tmp_var_raw,
	create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs):
	Relocate prototypes from gimple.h.
	* gimplify.h: New File.  Relocate some prototypes from gimple.h here.
	(gimple_predicate, enum fallback, enum gimplify_status): Relocate
	from gimple.h.
	* gimple.h: Move some prototypes to gimplify.h.
	(gimple_predicate, enum fallback, enum gimplify_status): Move to
	gimplify.h.
	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location):
	Relocate from gimpify.c.
	* gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name,
	create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable,
	is_gimple_reg_rhs) Relocate from gimplify.c.
	* gimplify.c (mark_addressable): Move to gimple-expr.c.
	(gimple_seq_add_stmt_without_update): Move to gimple.c.
	(remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw,
	create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to 
	gimple-expr.c.
	(should_carry_location_p): Move to gimple.c.
	(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move
	to gimple.h.
	(annotate_one_with_location, annotate_all_with_location_after,
	annotate_all_with_location): Move to gimple.c.
	(compare_case_labels, sort_case_labels,
	preprocess_case_label_vec_for_gimple): Move to gimple.c.
	(rhs_predicate_for): Make static.
	(gimplify_assign): Relocate from gimple.c.
	* gimple.c (gimplify_assign): Move to gimplify.c.
	(gimple_seq_add_stmt_without_update, should_carry_location_p,
	annotate_one_with_location, annotate_all_with_location_after,
	annotate_all_with_location, compare_case_labels, sort_case_labels,
	preprocess_case_label_vec_for_gimple): Relocate from gimplify.c.
	* tree.h (unshare_expr, unshare_expr_without_location,
	mark_addressable): Move prototypes to gimplify.h.
	* Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for
	tmp_var_id_num
	* asan.c: Include gimplify.h rather than gimple.h.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* dwarf2out.c: Dont include gimple.h.
	* fold-const.c: Include gimplify.h rather than gimple.h.
	* function.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa.c: Likewise.
	* langhooks.c: Dont include gimple.h.
	* loop-init.c: Include gimplify.h rather than gimple.h.
	* omp-low.c: Likewise.
	* sese.c: Likewise.
	* stor-layout.c: Likewise.
	* targhooks.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-loop-im.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-math-opts.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-strlen.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-switch-conversio: Likewise.n.c
	* 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-stmts.c: Likewise.
	* tsan.c: Likewise.
	* value-prof.c: Likewise.
	* config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h.
	* config/alpha/alpha.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

	* ada/gcc-interface/trans.c: Include gimplify.h.

	* c/c-typeck.c: Include gimplify.h.

	* c-family/c-common.c: Include gimplify.h.
	* c-family/c-gimplify.c: Likewise.
	* c-family/cilk.c: Likewise.
	* c-family/c-omp.c: Include gimple-expr.h instead of gimple.h.
	* c-family/c-ubsan.c: Don't include gimple.h.

	* cp/class.c: Include gimplify.h.
	* cp/cp-gimplify.c: Likewise.
	* cp/error.c: Likewise.
	* cp/init.c: Likewise.
	* cp/optimize.c: Likewise.
	* cp/pt.c: Likewise.
	* cp/semantics.c: Likewise.
	* cp/tree.c: Likewise.
	* cp/vtable-class-hierarchy.c: Likewise.
	* cp/decl2.c: Don't include gimple.h.
	* cp/except.c: Likewise.
	* cp/method.c: Include pointer-set.h instead of gimple.h.

	* fortran/f95-lang.c: Don't include gimple.h.
	* fortran/trans-array.c: Include gimple-expr.h instead of gimple.h.
	* fortran/trans.c: Likewise.
	* fortran/trans-decl.c: Likewise.
	* fortran/trans-expr.c: Include gimplify.h.
	* fortran/trans-openmp.c: Likewise.

	* go/go-lang.c: Include gimplify.h.

	* java/java-gimplify.c: Include gimplify.h.

	* objc/objc-act.c: Include gimplify.h.

From-SVN: r204717
This commit is contained in:
Andrew MacLeod 2013-11-12 20:26:43 +00:00 committed by Andrew Macleod
parent c9a584aa7a
commit 45b0be94be
126 changed files with 870 additions and 678 deletions

View File

@ -1,3 +1,124 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* gimple-expr.h (create_tmp_var_name, create_tmp_var_raw,
create_tmp_var, create_tmp_reg, mark_addressable, is_gimple_reg_rhs):
Relocate prototypes from gimple.h.
* gimplify.h: New File. Relocate some prototypes from gimple.h here.
(gimple_predicate, enum fallback, enum gimplify_status): Relocate
from gimple.h.
* gimple.h: Move some prototypes to gimplify.h.
(gimple_predicate, enum fallback, enum gimplify_status): Move to
gimplify.h.
(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location):
Relocate from gimpify.c.
* gimple-expr.c (remove_suffix, tmp_var_id_num, create_tmp_var_name,
create_tmp_var_raw, create_tmp_var, create_tmp_reg, mark_addressable,
is_gimple_reg_rhs) Relocate from gimplify.c.
* gimplify.c (mark_addressable): Move to gimple-expr.c.
(gimple_seq_add_stmt_without_update): Move to gimple.c.
(remove_suffix, tmp_var_id_num, create_tmp_var_name, create_tmp_var_raw,
create_tmp_var, create_tmp_reg, is_gimple_reg_rhs): Move to
gimple-expr.c.
(should_carry_location_p): Move to gimple.c.
(gimple_do_not_emit_location_p, gimple_set_do_not_emit_location): Move
to gimple.h.
(annotate_one_with_location, annotate_all_with_location_after,
annotate_all_with_location): Move to gimple.c.
(compare_case_labels, sort_case_labels,
preprocess_case_label_vec_for_gimple): Move to gimple.c.
(rhs_predicate_for): Make static.
(gimplify_assign): Relocate from gimple.c.
* gimple.c (gimplify_assign): Move to gimplify.c.
(gimple_seq_add_stmt_without_update, should_carry_location_p,
annotate_one_with_location, annotate_all_with_location_after,
annotate_all_with_location, compare_case_labels, sort_case_labels,
preprocess_case_label_vec_for_gimple): Relocate from gimplify.c.
* tree.h (unshare_expr, unshare_expr_without_location,
mark_addressable): Move prototypes to gimplify.h.
* Makefile.in (GTFILES): gimple-expr.c now has the GTY tag for
tmp_var_id_num
* asan.c: Include gimplify.h rather than gimple.h.
* cfgloopmanip.c: Likewise.
* cgraphunit.c: Likewise.
* cilk-common.c: Likewise.
* dwarf2out.c: Dont include gimple.h.
* fold-const.c: Include gimplify.h rather than gimple.h.
* function.c: Likewise.
* gimple-fold.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-split.c: Likewise.
* ipa.c: Likewise.
* langhooks.c: Dont include gimple.h.
* loop-init.c: Include gimplify.h rather than gimple.h.
* omp-low.c: Likewise.
* sese.c: Likewise.
* stor-layout.c: Likewise.
* targhooks.c: Likewise.
* trans-mem.c: Likewise.
* tree-affine.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-complex.c: Likewise.
* tree-if-conv.c: Likewise.
* tree-inline.c: Likewise.
* tree-iterator.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-nested.c: Likewise.
* tree-parloops.c: Likewise.
* tree-predcom.c: Likewise.
* tree-profile.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-ssa-forwprop.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* tree-ssa-loop-im.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-math-opts.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-strlen.c: Likewise.
* tree-ssa.c: Likewise.
* tree-switch-conversio: Likewise.n.c
* 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-stmts.c: Likewise.
* tsan.c: Likewise.
* value-prof.c: Likewise.
* config/aarch64/aarch64.c: Include gimplify.h instead of gimple.h.
* config/alpha/alpha.c: Likewise.
* config/darwin.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/mep/mep.c: Likewise.
* config/mips/mips.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/s390/s390.c: Likewise.
* config/sh/sh.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/tilegx/tilegx.c: Likewise.
* config/tilepro/tilepro.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
2013-11-12 Adam Butcher <adam@jessamine.co.uk>
* tree.c (grow_tree_vec_stat): New function ...

View File

@ -2255,7 +2255,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
$(srcdir)/tree-cfg.c \
$(srcdir)/tree-dfa.c \
$(srcdir)/tree-iterator.c $(srcdir)/gimplify.c \
$(srcdir)/tree-iterator.c $(srcdir)/gimple-expr.c \
$(srcdir)/tree-chrec.h \
$(srcdir)/tree-scalar-evolution.c \
$(srcdir)/tree-ssa-operands.h \

View File

@ -1,3 +1,7 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* ada/gcc-interface/trans.c: Include gimplify.h.
2013-11-11 Tristan Gingold <gingold@adacore.com>
Eric Botcazou <ebotcazou@adacore.com>

View File

@ -33,7 +33,7 @@
#include "output.h"
#include "libfuncs.h" /* For set_stack_check_libfunc. */
#include "tree-iterator.h"
#include "gimple.h"
#include "gimplify.h"
#include "bitmap.h"
#include "cgraph.h"
#include "diagnostic.h"

View File

@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-iterator.h"
#include "cgraph.h"
#include "tree-ssanames.h"

View File

@ -1,3 +1,11 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* c-family/c-common.c: Include gimplify.h.
* c-family/c-gimplify.c: Likewise.
* c-family/cilk.c: Likewise.
* c-family/c-omp.c: Include gimple-expr.h instead of gimple.h.
* c-family/c-ubsan.c: Don't include gimple.h.
2013-11-12 Joseph Myers <joseph@codesourcery.com>
* c-common.c (c_common_reswords): Add _Thread_local.

View File

@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "opts.h"
#include "cgraph.h"
#include "target-def.h"
#include "gimplify.h"
cpp_reader *parse_in; /* Declared in c-pragma.h. */

View File

@ -29,7 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "c-common.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-inline.h"
#include "diagnostic-core.h"
#include "langhooks.h"

View File

@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "c-common.h"
#include "c-pragma.h"
#include "gimple.h" /* For create_tmp_var_raw. */
#include "gimple-expr.h"
#include "langhooks.h"

View File

@ -24,7 +24,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "alloc-pool.h"
#include "cgraph.h"
#include "gimple.h"
#include "output.h"
#include "toplev.h"
#include "ubsan.h"

View File

@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tree.h"
#include "langhooks.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-iterator.h"
#include "tree-inline.h"
#include "c-family/c-common.h"

View File

@ -1,3 +1,7 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* c/c-typeck.c: Include gimplify.h.
2013-11-12 Joseph Myers <joseph@codesourcery.com>
* c-tree.h (struct c_declspecs): Add thread_gnu_p field.

View File

@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "tree-iterator.h"
#include "bitmap.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-inline.h"
#include "omp-low.h"
#include "c-family/c-objc.h"

View File

@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "cfgloop.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-ssa-loop-manip.h"
#include "dumpfile.h"

View File

@ -164,7 +164,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "output.h"
#include "rtl.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-into-ssa.h"

View File

@ -29,7 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "optabs.h"
#include "recog.h"
#include "tree-iterator.h"
#include "gimple.h"
#include "gimplify.h"
#include "cilk.h"
/* This structure holds all the important fields of the internal structures,

View File

@ -42,7 +42,7 @@
#include "recog.h"
#include "langhooks.h"
#include "diagnostic-core.h"
#include "gimple.h"
#include "gimplify.h"
#include "optabs.h"
#include "dwarf2.h"
#include "cfgloop.h"

View File

@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see
#include "debug.h"
#include "langhooks.h"
#include "splay-tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-ssanames.h"
#include "tree-stdarg.h"

View File

@ -45,7 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "debug.h"
#include "obstack.h"
#include "gimple.h"
#include "gimplify.h"
#include "lto-streamer.h"
/* Darwin supports a feature called fix-and-continue, which is used

View File

@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "reload.h"
#include "cgraph.h"
#include "gimple.h"
#include "gimplify.h"
#include "dwarf2.h"
#include "df.h"
#include "tm-constrs.h"

View File

@ -49,7 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "hash-table.h"
#include "langhooks.h"
#include "gimple.h"
#include "gimplify.h"
#include "intl.h"
#include "df.h"
#include "debug.h"

View File

@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "target-def.h"
#include "langhooks.h"
#include "df.h"
#include "gimple.h"
#include "gimplify.h"
#include "opts.h"
#include "dumpfile.h"

View File

@ -50,7 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "common/common-target.h"
#include "langhooks.h"
#include "sched-int.h"
#include "gimple.h"
#include "gimplify.h"
#include "bitmap.h"
#include "diagnostic.h"
#include "target-globals.h"

View File

@ -51,7 +51,7 @@
#include "reload.h"
#include "cfgloop.h"
#include "sched-int.h"
#include "gimple.h"
#include "gimplify.h"
#include "intl.h"
#include "params.h"
#include "tm-constrs.h"

View File

@ -47,7 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "debug.h"
#include "langhooks.h"
#include "optabs.h"
#include "gimple.h"
#include "gimplify.h"
#include "df.h"
#include "params.h"
#include "cfgloop.h"

View File

@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see
#include "sched-int.h"
#include "params.h"
#include "ggc.h"
#include "gimple.h"
#include "gimplify.h"
#include "cfgloop.h"
#include "alloc-pool.h"
#include "tm-constrs.h"

View File

@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "target-def.h"
#include "common/common-target.h"
#include "gimple.h"
#include "gimplify.h"
#include "langhooks.h"
#include "reload.h"
#include "params.h"

View File

@ -45,7 +45,7 @@
#include "sched-int.h"
#include "params.h"
#include "machmode.h"
#include "gimple.h"
#include "gimplify.h"
#include "tm-constrs.h"
#include "ddg.h"
#include "sbitmap.h"

View File

@ -43,7 +43,7 @@
#include "target-def.h"
#include "tm_p.h"
#include "langhooks.h"
#include "gimple.h"
#include "gimplify.h"
#include "df.h"
#include "reload.h"
#include "ggc.h"

View File

@ -40,7 +40,7 @@
#include "dwarf2.h"
#include "timevar.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "cfgloop.h"
#include "tilegx-builtins.h"
#include "tilegx-multiply.h"

View File

@ -41,7 +41,7 @@
#include "dwarf2.h"
#include "timevar.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "cfgloop.h"
#include "tilepro-builtins.h"
#include "tilepro-multiply.h"

View File

@ -46,7 +46,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "target-def.h"
#include "langhooks.h"
#include "gimple.h"
#include "gimplify.h"
#include "df.h"

View File

@ -1,3 +1,18 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* cp/class.c: Include gimplify.h.
* cp/cp-gimplify.c: Likewise.
* cp/error.c: Likewise.
* cp/init.c: Likewise.
* cp/optimize.c: Likewise.
* cp/pt.c: Likewise.
* cp/semantics.c: Likewise.
* cp/tree.c: Likewise.
* cp/vtable-class-hierarchy.c: Likewise.
* cp/decl2.c: Don't include gimple.h.
* cp/except.c: Likewise.
* cp/method.c: Include pointer-set.h instead of gimple.h.
2013-11-12 Adam Butcher <adam@jessamine.co.uk>
* pt.c (convert_generic_types_to_packs): New function to transform

View File

@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "splay-tree.h"
#include "pointer-set.h"
#include "hash-table.h"
#include "gimplify.h"
/* The number of nested classes being processed. If we are not in the
scope of any class, this is zero. */

View File

@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "cp-tree.h"
#include "c-family/c-common.h"
#include "tree-iterator.h"
#include "gimple.h"
#include "gimplify.h"
#include "hashtab.h"
#include "pointer-set.h"
#include "flags.h"

View File

@ -45,7 +45,6 @@ along with GCC; see the file COPYING3. If not see
#include "c-family/c-pragma.h"
#include "dumpfile.h"
#include "intl.h"
#include "gimple.h"
#include "pointer-set.h"
#include "splay-tree.h"
#include "langhooks.h"

View File

@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "pointer-set.h"
#include "c-family/c-objc.h"
#include "ubsan.h"
#include "gimplify.h"
#include <new> // For placement-new.

View File

@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "tree-inline.h"
#include "tree-iterator.h"
#include "target.h"
#include "gimple.h"
static void push_eh_cleanup (tree);
static tree prepare_eh_type (tree);

View File

@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "cp-tree.h"
#include "flags.h"
#include "target.h"
#include "gimplify.h"
static bool begin_init_stmts (tree *, tree *);
static tree finish_init_stmts (bool, tree, tree);

View File

@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "common/common-target.h"
#include "diagnostic.h"
#include "cgraph.h"
#include "gimple.h"
#include "pointer-set.h"
/* Various flags to control the mangling process. */

View File

@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "diagnostic-core.h"
#include "dumpfile.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-iterator.h"
#include "cgraph.h"

View File

@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "timevar.h"
#include "tree-iterator.h"
#include "type-utils.h"
#include "gimplify.h"
/* The type of functions taking a tree, and some additional data, and
returning an int. */

View File

@ -41,7 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-iterator.h"
#include "vec.h"
#include "target.h"
#include "gimple.h"
#include "gimplify.h"
#include "bitmap.h"
#include "hash-table.h"
#include "omp-low.h"

View File

@ -30,7 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "convert.h"
#include "cgraph.h"
#include "splay-tree.h"
#include "gimple.h" /* gimple_has_body_p */
#include "gimplify.h"
#include "hash-table.h"
static tree bot_manip (tree *, int *, void *);

View File

@ -118,7 +118,7 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h"
#include "tree-iterator.h"
#include "vtable-verify.h"
#include "gimple.h"
#include "gimplify.h"
static int num_calls_to_regset = 0;
static int num_calls_to_regpair = 0;

View File

@ -87,7 +87,6 @@ along with GCC; see the file COPYING3. If not see
#include "hash-table.h"
#include "cgraph.h"
#include "input.h"
#include "gimple.h"
#include "ira.h"
#include "lra.h"
#include "dumpfile.h"

View File

@ -57,7 +57,7 @@ along with GCC; see the file COPYING3. If not see
#include "hash-table.h"
#include "langhooks.h"
#include "md5.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-dfa.h"
/* Nonzero if we are folding constants inside an initializer; zero

View File

@ -1,3 +1,12 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* fortran/f95-lang.c: Don't include gimple.h.
* fortran/trans-array.c: Include gimple-expr.h instead of gimple.h.
* fortran/trans.c: Likewise.
* fortran/trans-decl.c: Likewise.
* fortran/trans-expr.c: Include gimplify.h.
* fortran/trans-openmp.c: Likewise.
2013-11-07 Janus Weil <janus@gcc.gnu.org>
PR fortran/58471

View File

@ -28,7 +28,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "flags.h"
#include "langhooks.h"
#include "langhooks-def.h"

View File

@ -79,7 +79,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h" /* For create_tmp_var_name. */
#include "gimple-expr.h"
#include "diagnostic-core.h" /* For internal_error/fatal_error. */
#include "flags.h"
#include "gfortran.h"

View File

@ -26,7 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "tree-dump.h"
#include "gimple.h" /* For create_tmp_var_raw. */
#include "gimple-expr.h" /* For create_tmp_var_raw. */
#include "ggc.h"
#include "diagnostic-core.h" /* For internal_error. */
#include "toplev.h" /* For announce_function. */

View File

@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
/* Only for gfc_trans_assign and gfc_trans_pointer_assign. */
#include "trans-stmt.h"
#include "dependency.h"
#include "gimplify.h"
/* Convert a scalar to an array descriptor. To be used for assumed-rank

View File

@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h" /* For create_tmp_var_raw. */
#include "gimplify.h" /* For create_tmp_var_raw. */
#include "diagnostic-core.h" /* For internal_error. */
#include "gfortran.h"
#include "trans.h"

View File

@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h" /* For create_tmp_var_raw. */
#include "gimple-expr.h" /* For create_tmp_var_raw. */
#include "tree-iterator.h"
#include "diagnostic-core.h" /* For internal_error. */
#include "flags.h"

View File

@ -55,7 +55,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "target.h"
#include "common/common-target.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-pass.h"
#include "predict.h"
#include "df.h"

View File

@ -24,8 +24,9 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "demangle.h"
#include "gimple-ssa.h"
/* ----- Type related ----- */
@ -406,6 +407,116 @@ gimple_can_coalesce_p (tree name1, tree name2)
return false;
}
/* Strip off a legitimate source ending from the input string NAME of
length LEN. Rather than having to know the names used by all of
our front ends, we strip off an ending of a period followed by
up to five characters. (Java uses ".class".) */
static inline void
remove_suffix (char *name, int len)
{
int i;
for (i = 2; i < 8 && len > i; i++)
{
if (name[len - i] == '.')
{
name[len - i] = '\0';
break;
}
}
}
/* Create a new temporary name with PREFIX. Return an identifier. */
static GTY(()) unsigned int tmp_var_id_num;
tree
create_tmp_var_name (const char *prefix)
{
char *tmp_name;
if (prefix)
{
char *preftmp = ASTRDUP (prefix);
remove_suffix (preftmp, strlen (preftmp));
clean_symbol_name (preftmp);
prefix = preftmp;
}
ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix ? prefix : "T", tmp_var_id_num++);
return get_identifier (tmp_name);
}
/* Create a new temporary variable declaration of type TYPE.
Do NOT push it into the current binding. */
tree
create_tmp_var_raw (tree type, const char *prefix)
{
tree tmp_var;
tmp_var = build_decl (input_location,
VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,
type);
/* The variable was declared by the compiler. */
DECL_ARTIFICIAL (tmp_var) = 1;
/* And we don't want debug info for it. */
DECL_IGNORED_P (tmp_var) = 1;
/* Make the variable writable. */
TREE_READONLY (tmp_var) = 0;
DECL_EXTERNAL (tmp_var) = 0;
TREE_STATIC (tmp_var) = 0;
TREE_USED (tmp_var) = 1;
return tmp_var;
}
/* Create a new temporary variable declaration of type TYPE. DO push the
variable into the current binding. Further, assume that this is called
only from gimplification or optimization, at which point the creation of
certain types are bugs. */
tree
create_tmp_var (tree type, const char *prefix)
{
tree tmp_var;
/* We don't allow types that are addressable (meaning we can't make copies),
or incomplete. We also used to reject every variable size objects here,
but now support those for which a constant upper bound can be obtained.
The processing for variable sizes is performed in gimple_add_tmp_var,
point at which it really matters and possibly reached via paths not going
through this function, e.g. after direct calls to create_tmp_var_raw. */
gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
tmp_var = create_tmp_var_raw (type, prefix);
gimple_add_tmp_var (tmp_var);
return tmp_var;
}
/* Create a new temporary variable declaration of type TYPE by calling
create_tmp_var and if TYPE is a vector or a complex number, mark the new
temporary as gimple register. */
tree
create_tmp_reg (tree type, const char *prefix)
{
tree tmp;
tmp = create_tmp_var (type, prefix);
if (TREE_CODE (type) == COMPLEX_TYPE
|| TREE_CODE (type) == VECTOR_TYPE)
DECL_GIMPLE_REG_P (tmp) = 1;
return tmp;
}
/* ----- Expression related ----- */
@ -719,3 +830,45 @@ is_gimple_mem_ref_addr (tree t)
&& (CONSTANT_CLASS_P (TREE_OPERAND (t, 0))
|| decl_address_invariant_p (TREE_OPERAND (t, 0)))));
}
/* Mark X addressable. Unlike the langhook we expect X to be in gimple
form and we don't do any syntax checking. */
void
mark_addressable (tree x)
{
while (handled_component_p (x))
x = TREE_OPERAND (x, 0);
if (TREE_CODE (x) == MEM_REF
&& TREE_CODE (TREE_OPERAND (x, 0)) == ADDR_EXPR)
x = TREE_OPERAND (TREE_OPERAND (x, 0), 0);
if (TREE_CODE (x) != VAR_DECL
&& TREE_CODE (x) != PARM_DECL
&& TREE_CODE (x) != RESULT_DECL)
return;
TREE_ADDRESSABLE (x) = 1;
/* Also mark the artificial SSA_NAME that points to the partition of X. */
if (TREE_CODE (x) == VAR_DECL
&& !DECL_EXTERNAL (x)
&& !TREE_STATIC (x)
&& cfun->gimple_df != NULL
&& cfun->gimple_df->decls_to_pointers != NULL)
{
void *namep
= pointer_map_contains (cfun->gimple_df->decls_to_pointers, x);
if (namep)
TREE_ADDRESSABLE (*(tree *)namep) = 1;
}
}
/* Returns true iff T is a valid RHS for an assignment to a renamed
user -- or front-end generated artificial -- variable. */
bool
is_gimple_reg_rhs (tree t)
{
return get_gimple_rhs_class (TREE_CODE (t)) != GIMPLE_INVALID_RHS;
}
#include "gt-gimple-expr.h"

View File

@ -22,12 +22,18 @@ along with GCC; see the file COPYING3. If not see
extern bool useless_type_conversion_p (tree, tree);
extern void gimple_set_body (tree, gimple_seq);
extern gimple_seq gimple_body (tree);
extern bool gimple_has_body_p (tree);
extern const char *gimple_decl_printable_name (tree, int);
extern tree copy_var_decl (tree, tree, tree);
extern bool gimple_can_coalesce_p (tree, tree);
extern tree create_tmp_var_name (const char *);
extern tree create_tmp_var_raw (tree, const char *);
extern tree create_tmp_var (tree, const char *);
extern tree create_tmp_reg (tree, const char *);
extern void extract_ops_from_tree_1 (tree, enum tree_code *, tree *, tree *,
tree *);
@ -46,6 +52,8 @@ extern bool is_gimple_asm_val (tree);
extern bool is_gimple_min_lval (tree);
extern bool is_gimple_call_addr (tree);
extern bool is_gimple_mem_ref_addr (tree);
extern void mark_addressable (tree);
extern bool is_gimple_reg_rhs (tree);
/* Return true if a conversion from either type of TYPE1 and TYPE2
to the other is not required. Otherwise return false. */

View File

@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "dumpfile.h"
#include "bitmap.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-ssanames.h"
#include "tree-into-ssa.h"

View File

@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "basic-block.h"
#include "tree-pass.h"
#include "cfgloop.h"

View File

@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "hard-reg-set.h"
#include "basic-block.h"
#include "gimple.h"
#include "gimplify.h"
#include "diagnostic.h"
#include "value-prof.h"
#include "flags.h"
@ -446,24 +447,6 @@ gimple_build_assign_with_ops (enum tree_code subcode, tree lhs, tree op1,
}
/* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
DST/SRC are the destination and source respectively. You can pass
ungimplified trees in DST or SRC, in which case they will be
converted to a gimple operand if necessary.
This function returns the newly created GIMPLE_ASSIGN tuple. */
gimple
gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
{
tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
gimplify_and_add (t, seq_p);
ggc_free (t);
return gimple_seq_last_stmt (*seq_p);
}
/* Build a GIMPLE_COND statement.
PRED is the condition used to compare LHS and the RHS.
@ -1172,6 +1155,23 @@ gimple_seq_add_stmt (gimple_seq *seq_p, gimple gs)
gsi_insert_after (&si, gs, GSI_NEW_STMT);
}
/* Link gimple statement GS to the end of the sequence *SEQ_P. If
*SEQ_P is NULL, a new sequence is allocated. This function is
similar to gimple_seq_add_stmt, but does not scan the operands.
During gimplification, we need to manipulate statement sequences
before the def/use vectors have been constructed. */
void
gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple gs)
{
gimple_stmt_iterator si;
if (gs == NULL)
return;
si = gsi_last (*seq_p);
gsi_insert_after_without_update (&si, gs, GSI_NEW_STMT);
}
/* Append sequence SRC to the end of sequence *DST_P. If *DST_P is
NULL, a new sequence is allocated. */
@ -1187,6 +1187,64 @@ gimple_seq_add_seq (gimple_seq *dst_p, gimple_seq src)
gsi_insert_seq_after (&si, src, GSI_NEW_STMT);
}
/* Determine whether to assign a location to the statement GS. */
static bool
should_carry_location_p (gimple gs)
{
/* Don't emit a line note for a label. We particularly don't want to
emit one for the break label, since it doesn't actually correspond
to the beginning of the loop/switch. */
if (gimple_code (gs) == GIMPLE_LABEL)
return false;
return true;
}
/* Set the location for gimple statement GS to LOCATION. */
static void
annotate_one_with_location (gimple gs, location_t location)
{
if (!gimple_has_location (gs)
&& !gimple_do_not_emit_location_p (gs)
&& should_carry_location_p (gs))
gimple_set_location (gs, location);
}
/* Set LOCATION for all the statements after iterator GSI in sequence
SEQ. If GSI is pointing to the end of the sequence, start with the
first statement in SEQ. */
void
annotate_all_with_location_after (gimple_seq seq, gimple_stmt_iterator gsi,
location_t location)
{
if (gsi_end_p (gsi))
gsi = gsi_start (seq);
else
gsi_next (&gsi);
for (; !gsi_end_p (gsi); gsi_next (&gsi))
annotate_one_with_location (gsi_stmt (gsi), location);
}
/* Set the location for all the statements in a sequence STMT_P to LOCATION. */
void
annotate_all_with_location (gimple_seq stmt_p, location_t location)
{
gimple_stmt_iterator i;
if (gimple_seq_empty_p (stmt_p))
return;
for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i))
{
gimple gs = gsi_stmt (i);
annotate_one_with_location (gs, location);
}
}
/* Helper function of empty_body_p. Return true if STMT is an empty
statement. */
@ -3428,3 +3486,205 @@ infer_nonnull_range (gimple stmt, tree op)
return false;
}
/* Compare two case labels. Because the front end should already have
made sure that case ranges do not overlap, it is enough to only compare
the CASE_LOW values of each case label. */
static int
compare_case_labels (const void *p1, const void *p2)
{
const_tree const case1 = *(const_tree const*)p1;
const_tree const case2 = *(const_tree const*)p2;
/* The 'default' case label always goes first. */
if (!CASE_LOW (case1))
return -1;
else if (!CASE_LOW (case2))
return 1;
else
return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
}
/* Sort the case labels in LABEL_VEC in place in ascending order. */
void
sort_case_labels (vec<tree> label_vec)
{
label_vec.qsort (compare_case_labels);
}
/* Prepare a vector of case labels to be used in a GIMPLE_SWITCH statement.
LABELS is a vector that contains all case labels to look at.
INDEX_TYPE is the type of the switch index expression. Case labels
in LABELS are discarded if their values are not in the value range
covered by INDEX_TYPE. The remaining case label values are folded
to INDEX_TYPE.
If a default case exists in LABELS, it is removed from LABELS and
returned in DEFAULT_CASEP. If no default case exists, but the
case labels already cover the whole range of INDEX_TYPE, a default
case is returned pointing to one of the existing case labels.
Otherwise DEFAULT_CASEP is set to NULL_TREE.
DEFAULT_CASEP may be NULL, in which case the above comment doesn't
apply and no action is taken regardless of whether a default case is
found or not. */
void
preprocess_case_label_vec_for_gimple (vec<tree> labels,
tree index_type,
tree *default_casep)
{
tree min_value, max_value;
tree default_case = NULL_TREE;
size_t i, len;
i = 0;
min_value = TYPE_MIN_VALUE (index_type);
max_value = TYPE_MAX_VALUE (index_type);
while (i < labels.length ())
{
tree elt = labels[i];
tree low = CASE_LOW (elt);
tree high = CASE_HIGH (elt);
bool remove_element = FALSE;
if (low)
{
gcc_checking_assert (TREE_CODE (low) == INTEGER_CST);
gcc_checking_assert (!high || TREE_CODE (high) == INTEGER_CST);
/* This is a non-default case label, i.e. it has a value.
See if the case label is reachable within the range of
the index type. Remove out-of-range case values. Turn
case ranges into a canonical form (high > low strictly)
and convert the case label values to the index type.
NB: The type of gimple_switch_index() may be the promoted
type, but the case labels retain the original type. */
if (high)
{
/* This is a case range. Discard empty ranges.
If the bounds or the range are equal, turn this
into a simple (one-value) case. */
int cmp = tree_int_cst_compare (high, low);
if (cmp < 0)
remove_element = TRUE;
else if (cmp == 0)
high = NULL_TREE;
}
if (! high)
{
/* If the simple case value is unreachable, ignore it. */
if ((TREE_CODE (min_value) == INTEGER_CST
&& tree_int_cst_compare (low, min_value) < 0)
|| (TREE_CODE (max_value) == INTEGER_CST
&& tree_int_cst_compare (low, max_value) > 0))
remove_element = TRUE;
else
low = fold_convert (index_type, low);
}
else
{
/* If the entire case range is unreachable, ignore it. */
if ((TREE_CODE (min_value) == INTEGER_CST
&& tree_int_cst_compare (high, min_value) < 0)
|| (TREE_CODE (max_value) == INTEGER_CST
&& tree_int_cst_compare (low, max_value) > 0))
remove_element = TRUE;
else
{
/* If the lower bound is less than the index type's
minimum value, truncate the range bounds. */
if (TREE_CODE (min_value) == INTEGER_CST
&& tree_int_cst_compare (low, min_value) < 0)
low = min_value;
low = fold_convert (index_type, low);
/* If the upper bound is greater than the index type's
maximum value, truncate the range bounds. */
if (TREE_CODE (max_value) == INTEGER_CST
&& tree_int_cst_compare (high, max_value) > 0)
high = max_value;
high = fold_convert (index_type, high);
/* We may have folded a case range to a one-value case. */
if (tree_int_cst_equal (low, high))
high = NULL_TREE;
}
}
CASE_LOW (elt) = low;
CASE_HIGH (elt) = high;
}
else
{
gcc_assert (!default_case);
default_case = elt;
/* The default case must be passed separately to the
gimple_build_switch routine. But if DEFAULT_CASEP
is NULL, we do not remove the default case (it would
be completely lost). */
if (default_casep)
remove_element = TRUE;
}
if (remove_element)
labels.ordered_remove (i);
else
i++;
}
len = i;
if (!labels.is_empty ())
sort_case_labels (labels);
if (default_casep && !default_case)
{
/* If the switch has no default label, add one, so that we jump
around the switch body. If the labels already cover the whole
range of the switch index_type, add the default label pointing
to one of the existing labels. */
if (len
&& TYPE_MIN_VALUE (index_type)
&& TYPE_MAX_VALUE (index_type)
&& tree_int_cst_equal (CASE_LOW (labels[0]),
TYPE_MIN_VALUE (index_type)))
{
tree low, high = CASE_HIGH (labels[len - 1]);
if (!high)
high = CASE_LOW (labels[len - 1]);
if (tree_int_cst_equal (high, TYPE_MAX_VALUE (index_type)))
{
for (i = 1; i < len; i++)
{
high = CASE_LOW (labels[i]);
low = CASE_HIGH (labels[i - 1]);
if (!low)
low = CASE_LOW (labels[i - 1]);
if ((TREE_INT_CST_LOW (low) + 1
!= TREE_INT_CST_LOW (high))
|| (TREE_INT_CST_HIGH (low)
+ (TREE_INT_CST_LOW (high) == 0)
!= TREE_INT_CST_HIGH (high)))
break;
}
if (i == len)
{
tree label = CASE_LABEL (labels[0]);
default_case = build_case_label (NULL_TREE, NULL_TREE,
label);
}
}
}
}
if (default_casep)
*default_casep = default_case;
}

View File

@ -766,7 +766,6 @@ gimple gimple_build_call_valist (tree, unsigned, va_list);
gimple gimple_build_call_internal (enum internal_fn, unsigned, ...);
gimple gimple_build_call_internal_vec (enum internal_fn, vec<tree> );
gimple gimple_build_call_from_tree (tree);
gimple gimplify_assign (tree, tree, gimple_seq *);
gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
gimple gimple_build_label (tree label);
gimple gimple_build_goto (tree dest);
@ -806,8 +805,6 @@ gimple gimple_build_omp_atomic_store (tree);
gimple gimple_build_transaction (gimple_seq, tree);
gimple gimple_build_predict (enum br_predictor, enum prediction);
enum gimple_statement_structure_enum gss_for_assign (enum tree_code);
void sort_case_labels (vec<tree> );
void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
gimple_seq gimple_seq_alloc (void);
void gimple_seq_free (gimple_seq);
void gimple_seq_add_seq (gimple_seq *, gimple_seq);
@ -834,8 +831,10 @@ bool gimple_has_side_effects (const_gimple);
bool gimple_could_trap_p (gimple);
bool gimple_could_trap_p_1 (gimple, bool, bool);
bool gimple_assign_rhs_could_trap_p (gimple);
void gimple_regimplify_operands (gimple, gimple_stmt_iterator *);
bool empty_body_p (gimple_seq);
extern void annotate_all_with_location_after (gimple_seq, gimple_stmt_iterator,
location_t);
extern void annotate_all_with_location (gimple_seq, location_t);
unsigned get_gimple_rhs_num_ops (enum tree_code);
#define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
@ -859,48 +858,8 @@ extern bool gimple_ior_addresses_taken (bitmap, gimple);
extern bool gimple_call_builtin_p (gimple, enum built_in_class);
extern bool gimple_call_builtin_p (gimple, enum built_in_function);
extern bool gimple_asm_clobbers_memory_p (const_gimple);
/* In gimplify.c */
extern tree create_tmp_var_raw (tree, const char *);
extern tree create_tmp_var_name (const char *);
extern tree create_tmp_var (tree, const char *);
extern tree create_tmp_reg (tree, const char *);
extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
extern tree get_formal_tmp_var (tree, gimple_seq *);
extern void declare_vars (tree, gimple, bool);
extern void annotate_all_with_location (gimple_seq, location_t);
extern unsigned gimple_call_get_nobnd_arg_index (const_gimple, unsigned);
/* Validation of GIMPLE expressions. Note that these predicates only check
the basic form of the expression, they don't recurse to make sure that
underlying nodes are also of the right form. */
typedef bool (*gimple_predicate)(tree);
/* FIXME we should deduce this from the predicate. */
enum fallback {
fb_none = 0, /* Do not generate a temporary. */
fb_rvalue = 1, /* Generate an rvalue to hold the result of a
gimplified expression. */
fb_lvalue = 2, /* Generate an lvalue to hold the result of a
gimplified expression. */
fb_mayfail = 4, /* Gimplification may fail. Error issued
afterwards. */
fb_either= fb_rvalue | fb_lvalue
};
typedef int fallback_t;
enum gimplify_status {
GS_ERROR = -2, /* Something Bad Seen. */
GS_UNHANDLED = -1, /* A langhook result for "I dunno". */
GS_OK = 0, /* We did something, maybe more to do. */
GS_ALL_DONE = 1 /* The expression is fully gimplified. */
};
/* Formal (expression) temporary table handling: multiple occurrences of
the same scalar expression are evaluated into the same temporary. */
@ -1010,31 +969,8 @@ inc_gimple_stmt_max_uid (struct function *fn)
return fn->last_stmt_uid++;
}
extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
bool (*) (tree), fallback_t);
extern void gimplify_type_sizes (tree, gimple_seq *);
extern void gimplify_one_sizepos (tree *, gimple_seq *);
enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *, gimple_seq *,
bool, tree);
extern bool gimplify_stmt (tree *, gimple_seq *);
extern gimple gimplify_body (tree, bool);
extern void push_gimplify_context (struct gimplify_ctx *);
extern void pop_gimplify_context (gimple);
extern void gimplify_and_add (tree, gimple_seq *);
/* Miscellaneous helpers. */
extern void gimple_add_tmp_var (tree);
extern gimple gimple_current_bind_expr (void);
extern vec<gimple> gimple_bind_expr_stack (void);
extern tree voidify_wrapper_expr (tree, tree);
extern tree build_and_jump (tree *);
extern tree force_labels_r (tree *, int *, void *);
extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
gimple_seq *);
struct gimplify_omp_ctx;
extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree);
extern tree gimple_boolify (tree);
extern gimple_predicate rhs_predicate_for (tree);
extern tree canonicalize_cond_expr_cond (tree);
extern void dump_decl_set (FILE *, bitmap);
extern bool nonfreeing_call_p (gimple);
@ -1048,9 +984,6 @@ extern void compute_transaction_bits (void);
extern void lower_nested_functions (tree);
extern void insert_field_into_struct (tree, tree);
/* In gimplify.c. */
extern void gimplify_function_tree (tree);
/* In cfgexpand.c. */
extern tree gimple_assign_rhs_to_tree (gimple);
@ -1121,14 +1054,8 @@ gimple_seq_empty_p (gimple_seq s)
return s == NULL;
}
void gimple_seq_add_stmt (gimple_seq *, gimple);
/* Link gimple statement GS to the end of the sequence *SEQ_P. If
*SEQ_P is NULL, a new sequence is allocated. This function is
similar to gimple_seq_add_stmt, but does not scan the operands.
During gimplification, we need to manipulate statement sequences
before the def/use vectors have been constructed. */
void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
extern void gimple_seq_add_stmt (gimple_seq *, gimple);
extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
/* Allocate a new sequence and initialize its first element with STMT. */
@ -5563,15 +5490,6 @@ void gsi_commit_one_edge_insert (edge, basic_block *);
void gsi_commit_edge_inserts (void);
gimple gimple_call_copy_skip_args (gimple, bitmap);
/* In gimplify.c. */
tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
tree force_gimple_operand (tree, gimple_seq *, bool, tree);
tree force_gimple_operand_gsi_1 (gimple_stmt_iterator *, tree,
gimple_predicate, tree,
bool, enum gsi_iterator_update);
tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
bool, enum gsi_iterator_update);
/* Convenience routines to walk all statements of a gimple function.
Note that this is useful exclusively before the code is converted
into SSA form. Once the program is in SSA form, the standard
@ -5684,6 +5602,27 @@ gimple_seq_set_location (gimple_seq seq, location_t loc)
gimple_set_location (gsi_stmt (i), loc);
}
/* Return true if a location should not be emitted for this statement
by annotate_all_with_location. */
static inline bool
gimple_do_not_emit_location_p (gimple g)
{
return gimple_plf (g, GF_PLF_1);
}
/* Mark statement G so a location will not be emitted by
annotate_one_with_location. */
static inline void
gimple_set_do_not_emit_location (gimple g)
{
/* The PLF flags are initialized to 0 when a new tuple is created,
so no need to initialize it anywhere. */
gimple_set_plf (g, GF_PLF_1, true);
}
/* Macros for showing usage statistics. */
#define SCALE(x) ((unsigned long) ((x) < 1024*10 \
? (x) \
@ -5695,4 +5634,7 @@ gimple_seq_set_location (gimple_seq seq, location_t loc)
#define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
extern void sort_case_labels (vec<tree> );
extern void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
#endif /* GCC_GIMPLE_H */

View File

@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-iterator.h"
#include "tree-inline.h"
#include "tree-pretty-print.h"
@ -108,55 +108,6 @@ static struct gimplify_omp_ctx *gimplify_omp_ctxp;
/* Forward declaration. */
static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq *, bool);
/* Mark X addressable. Unlike the langhook we expect X to be in gimple
form and we don't do any syntax checking. */
void
mark_addressable (tree x)
{
while (handled_component_p (x))
x = TREE_OPERAND (x, 0);
if (TREE_CODE (x) == MEM_REF
&& TREE_CODE (TREE_OPERAND (x, 0)) == ADDR_EXPR)
x = TREE_OPERAND (TREE_OPERAND (x, 0), 0);
if (TREE_CODE (x) != VAR_DECL
&& TREE_CODE (x) != PARM_DECL
&& TREE_CODE (x) != RESULT_DECL)
return;
TREE_ADDRESSABLE (x) = 1;
/* Also mark the artificial SSA_NAME that points to the partition of X. */
if (TREE_CODE (x) == VAR_DECL
&& !DECL_EXTERNAL (x)
&& !TREE_STATIC (x)
&& cfun->gimple_df != NULL
&& cfun->gimple_df->decls_to_pointers != NULL)
{
void *namep
= pointer_map_contains (cfun->gimple_df->decls_to_pointers, x);
if (namep)
TREE_ADDRESSABLE (*(tree *)namep) = 1;
}
}
/* Link gimple statement GS to the end of the sequence *SEQ_P. If
*SEQ_P is NULL, a new sequence is allocated. This function is
similar to gimple_seq_add_stmt, but does not scan the operands.
During gimplification, we need to manipulate statement sequences
before the def/use vectors have been constructed. */
void
gimple_seq_add_stmt_without_update (gimple_seq *seq_p, gimple gs)
{
gimple_stmt_iterator si;
if (gs == NULL)
return;
si = gsi_last (*seq_p);
gsi_insert_after_without_update (&si, gs, GSI_NEW_STMT);
}
/* Shorter alias name for the above function for use in gimplify.c
only. */
@ -365,125 +316,6 @@ gimplify_and_return_first (tree t, gimple_seq *seq_p)
return gimple_seq_first_stmt (*seq_p);
}
/* Strip off a legitimate source ending from the input string NAME of
length LEN. Rather than having to know the names used by all of
our front ends, we strip off an ending of a period followed by
up to five characters. (Java uses ".class".) */
static inline void
remove_suffix (char *name, int len)
{
int i;
for (i = 2; i < 8 && len > i; i++)
{
if (name[len - i] == '.')
{
name[len - i] = '\0';
break;
}
}
}
/* Create a new temporary name with PREFIX. Return an identifier. */
static GTY(()) unsigned int tmp_var_id_num;
tree
create_tmp_var_name (const char *prefix)
{
char *tmp_name;
if (prefix)
{
char *preftmp = ASTRDUP (prefix);
remove_suffix (preftmp, strlen (preftmp));
clean_symbol_name (preftmp);
prefix = preftmp;
}
ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix ? prefix : "T", tmp_var_id_num++);
return get_identifier (tmp_name);
}
/* Create a new temporary variable declaration of type TYPE.
Do NOT push it into the current binding. */
tree
create_tmp_var_raw (tree type, const char *prefix)
{
tree tmp_var;
tmp_var = build_decl (input_location,
VAR_DECL, prefix ? create_tmp_var_name (prefix) : NULL,
type);
/* The variable was declared by the compiler. */
DECL_ARTIFICIAL (tmp_var) = 1;
/* And we don't want debug info for it. */
DECL_IGNORED_P (tmp_var) = 1;
/* Make the variable writable. */
TREE_READONLY (tmp_var) = 0;
DECL_EXTERNAL (tmp_var) = 0;
TREE_STATIC (tmp_var) = 0;
TREE_USED (tmp_var) = 1;
return tmp_var;
}
/* Create a new temporary variable declaration of type TYPE. DO push the
variable into the current binding. Further, assume that this is called
only from gimplification or optimization, at which point the creation of
certain types are bugs. */
tree
create_tmp_var (tree type, const char *prefix)
{
tree tmp_var;
/* We don't allow types that are addressable (meaning we can't make copies),
or incomplete. We also used to reject every variable size objects here,
but now support those for which a constant upper bound can be obtained.
The processing for variable sizes is performed in gimple_add_tmp_var,
point at which it really matters and possibly reached via paths not going
through this function, e.g. after direct calls to create_tmp_var_raw. */
gcc_assert (!TREE_ADDRESSABLE (type) && COMPLETE_TYPE_P (type));
tmp_var = create_tmp_var_raw (type, prefix);
gimple_add_tmp_var (tmp_var);
return tmp_var;
}
/* Create a new temporary variable declaration of type TYPE by calling
create_tmp_var and if TYPE is a vector or a complex number, mark the new
temporary as gimple register. */
tree
create_tmp_reg (tree type, const char *prefix)
{
tree tmp;
tmp = create_tmp_var (type, prefix);
if (TREE_CODE (type) == COMPLEX_TYPE
|| TREE_CODE (type) == VECTOR_TYPE)
DECL_GIMPLE_REG_P (tmp) = 1;
return tmp;
}
/* Returns true iff T is a valid RHS for an assignment to a renamed
user -- or front-end generated artificial -- variable. */
static bool
is_gimple_reg_rhs (tree t)
{
return get_gimple_rhs_class (TREE_CODE (t)) != GIMPLE_INVALID_RHS;
}
/* Returns true iff T is a valid RHS for an assignment to an un-renamed
LHS, or for a call argument. */
@ -750,84 +582,7 @@ gimple_add_tmp_var (tree tmp)
}
}
/* Determine whether to assign a location to the statement GS. */
static bool
should_carry_location_p (gimple gs)
{
/* Don't emit a line note for a label. We particularly don't want to
emit one for the break label, since it doesn't actually correspond
to the beginning of the loop/switch. */
if (gimple_code (gs) == GIMPLE_LABEL)
return false;
return true;
}
/* Return true if a location should not be emitted for this statement
by annotate_one_with_location. */
static inline bool
gimple_do_not_emit_location_p (gimple g)
{
return gimple_plf (g, GF_PLF_1);
}
/* Mark statement G so a location will not be emitted by
annotate_one_with_location. */
static inline void
gimple_set_do_not_emit_location (gimple g)
{
/* The PLF flags are initialized to 0 when a new tuple is created,
so no need to initialize it anywhere. */
gimple_set_plf (g, GF_PLF_1, true);
}
/* Set the location for gimple statement GS to LOCATION. */
static void
annotate_one_with_location (gimple gs, location_t location)
{
if (!gimple_has_location (gs)
&& !gimple_do_not_emit_location_p (gs)
&& should_carry_location_p (gs))
gimple_set_location (gs, location);
}
/* Set LOCATION for all the statements after iterator GSI in sequence
SEQ. If GSI is pointing to the end of the sequence, start with the
first statement in SEQ. */
static void
annotate_all_with_location_after (gimple_seq seq, gimple_stmt_iterator gsi,
location_t location)
{
if (gsi_end_p (gsi))
gsi = gsi_start (seq);
else
gsi_next (&gsi);
for (; !gsi_end_p (gsi); gsi_next (&gsi))
annotate_one_with_location (gsi_stmt (gsi), location);
}
/* Set the location for all the statements in a sequence STMT_P to LOCATION. */
void
annotate_all_with_location (gimple_seq stmt_p, location_t location)
{
gimple_stmt_iterator i;
if (gimple_seq_empty_p (stmt_p))
return;
for (i = gsi_start (stmt_p); !gsi_end_p (i); gsi_next (&i))
{
gimple gs = gsi_stmt (i);
annotate_one_with_location (gs, location);
}
}
/* This page contains routines to unshare tree nodes, i.e. to duplicate tree
nodes that are referenced more than once in GENERIC functions. This is
@ -1441,6 +1196,20 @@ gimplify_vla_decl (tree decl, gimple_seq *seq_p)
gimplify_ctxp->save_stack = true;
}
/* A helper function to be called via walk_tree. Mark all labels under *TP
as being forced. To be called for DECL_INITIAL of static variables. */
static tree
force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
if (TYPE_P (*tp))
*walk_subtrees = 0;
if (TREE_CODE (*tp) == LABEL_DECL)
FORCED_LABEL (*tp) = 1;
return NULL_TREE;
}
/* Gimplify a DECL_EXPR node *STMT_P by making any necessary allocation
and initialization explicit. */
@ -1557,208 +1326,7 @@ gimplify_statement_list (tree *expr_p, gimple_seq *pre_p)
return GS_ALL_DONE;
}
/* Compare two case labels. Because the front end should already have
made sure that case ranges do not overlap, it is enough to only compare
the CASE_LOW values of each case label. */
static int
compare_case_labels (const void *p1, const void *p2)
{
const_tree const case1 = *(const_tree const*)p1;
const_tree const case2 = *(const_tree const*)p2;
/* The 'default' case label always goes first. */
if (!CASE_LOW (case1))
return -1;
else if (!CASE_LOW (case2))
return 1;
else
return tree_int_cst_compare (CASE_LOW (case1), CASE_LOW (case2));
}
/* Sort the case labels in LABEL_VEC in place in ascending order. */
void
sort_case_labels (vec<tree> label_vec)
{
label_vec.qsort (compare_case_labels);
}
/* Prepare a vector of case labels to be used in a GIMPLE_SWITCH statement.
LABELS is a vector that contains all case labels to look at.
INDEX_TYPE is the type of the switch index expression. Case labels
in LABELS are discarded if their values are not in the value range
covered by INDEX_TYPE. The remaining case label values are folded
to INDEX_TYPE.
If a default case exists in LABELS, it is removed from LABELS and
returned in DEFAULT_CASEP. If no default case exists, but the
case labels already cover the whole range of INDEX_TYPE, a default
case is returned pointing to one of the existing case labels.
Otherwise DEFAULT_CASEP is set to NULL_TREE.
DEFAULT_CASEP may be NULL, in which case the above comment doesn't
apply and no action is taken regardless of whether a default case is
found or not. */
void
preprocess_case_label_vec_for_gimple (vec<tree> labels,
tree index_type,
tree *default_casep)
{
tree min_value, max_value;
tree default_case = NULL_TREE;
size_t i, len;
i = 0;
min_value = TYPE_MIN_VALUE (index_type);
max_value = TYPE_MAX_VALUE (index_type);
while (i < labels.length ())
{
tree elt = labels[i];
tree low = CASE_LOW (elt);
tree high = CASE_HIGH (elt);
bool remove_element = FALSE;
if (low)
{
gcc_checking_assert (TREE_CODE (low) == INTEGER_CST);
gcc_checking_assert (!high || TREE_CODE (high) == INTEGER_CST);
/* This is a non-default case label, i.e. it has a value.
See if the case label is reachable within the range of
the index type. Remove out-of-range case values. Turn
case ranges into a canonical form (high > low strictly)
and convert the case label values to the index type.
NB: The type of gimple_switch_index() may be the promoted
type, but the case labels retain the original type. */
if (high)
{
/* This is a case range. Discard empty ranges.
If the bounds or the range are equal, turn this
into a simple (one-value) case. */
int cmp = tree_int_cst_compare (high, low);
if (cmp < 0)
remove_element = TRUE;
else if (cmp == 0)
high = NULL_TREE;
}
if (! high)
{
/* If the simple case value is unreachable, ignore it. */
if ((TREE_CODE (min_value) == INTEGER_CST
&& tree_int_cst_compare (low, min_value) < 0)
|| (TREE_CODE (max_value) == INTEGER_CST
&& tree_int_cst_compare (low, max_value) > 0))
remove_element = TRUE;
else
low = fold_convert (index_type, low);
}
else
{
/* If the entire case range is unreachable, ignore it. */
if ((TREE_CODE (min_value) == INTEGER_CST
&& tree_int_cst_compare (high, min_value) < 0)
|| (TREE_CODE (max_value) == INTEGER_CST
&& tree_int_cst_compare (low, max_value) > 0))
remove_element = TRUE;
else
{
/* If the lower bound is less than the index type's
minimum value, truncate the range bounds. */
if (TREE_CODE (min_value) == INTEGER_CST
&& tree_int_cst_compare (low, min_value) < 0)
low = min_value;
low = fold_convert (index_type, low);
/* If the upper bound is greater than the index type's
maximum value, truncate the range bounds. */
if (TREE_CODE (max_value) == INTEGER_CST
&& tree_int_cst_compare (high, max_value) > 0)
high = max_value;
high = fold_convert (index_type, high);
/* We may have folded a case range to a one-value case. */
if (tree_int_cst_equal (low, high))
high = NULL_TREE;
}
}
CASE_LOW (elt) = low;
CASE_HIGH (elt) = high;
}
else
{
gcc_assert (!default_case);
default_case = elt;
/* The default case must be passed separately to the
gimple_build_switch routine. But if DEFAULT_CASEP
is NULL, we do not remove the default case (it would
be completely lost). */
if (default_casep)
remove_element = TRUE;
}
if (remove_element)
labels.ordered_remove (i);
else
i++;
}
len = i;
if (!labels.is_empty ())
sort_case_labels (labels);
if (default_casep && !default_case)
{
/* If the switch has no default label, add one, so that we jump
around the switch body. If the labels already cover the whole
range of the switch index_type, add the default label pointing
to one of the existing labels. */
if (len
&& TYPE_MIN_VALUE (index_type)
&& TYPE_MAX_VALUE (index_type)
&& tree_int_cst_equal (CASE_LOW (labels[0]),
TYPE_MIN_VALUE (index_type)))
{
tree low, high = CASE_HIGH (labels[len - 1]);
if (!high)
high = CASE_LOW (labels[len - 1]);
if (tree_int_cst_equal (high, TYPE_MAX_VALUE (index_type)))
{
for (i = 1; i < len; i++)
{
high = CASE_LOW (labels[i]);
low = CASE_HIGH (labels[i - 1]);
if (!low)
low = CASE_LOW (labels[i - 1]);
if ((TREE_INT_CST_LOW (low) + 1
!= TREE_INT_CST_LOW (high))
|| (TREE_INT_CST_HIGH (low)
+ (TREE_INT_CST_LOW (high) == 0)
!= TREE_INT_CST_HIGH (high)))
break;
}
if (i == len)
{
tree label = CASE_LABEL (labels[0]);
default_case = build_case_label (NULL_TREE, NULL_TREE,
label);
}
}
}
}
if (default_casep)
*default_casep = default_case;
}
/* Gimplify a SWITCH_EXPR, and collect the vector of labels it can
branch to. */
@ -1882,20 +1450,6 @@ gimplify_exit_expr (tree *expr_p)
return GS_OK;
}
/* A helper function to be called via walk_tree. Mark all labels under *TP
as being forced. To be called for DECL_INITIAL of static variables. */
tree
force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
{
if (TYPE_P (*tp))
*walk_subtrees = 0;
if (TREE_CODE (*tp) == LABEL_DECL)
FORCED_LABEL (*tp) = 1;
return NULL_TREE;
}
/* *EXPR_P is a COMPONENT_REF being used as an rvalue. If its type is
different from its canonical type, wrap the whole thing inside a
NOP_EXPR and force the type of the COMPONENT_REF to be the canonical
@ -3838,7 +3392,7 @@ gimplify_init_ctor_eval (tree object, vec<constructor_elt, va_gc> *elts,
/* Return the appropriate RHS predicate for this LHS. */
gimple_predicate
static gimple_predicate
rhs_predicate_for (tree lhs)
{
if (is_gimple_reg (lhs))
@ -9419,4 +8973,20 @@ gimplify_va_arg_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
}
}
#include "gt-gimplify.h"
/* Build a new GIMPLE_ASSIGN tuple and append it to the end of *SEQ_P.
DST/SRC are the destination and source respectively. You can pass
ungimplified trees in DST or SRC, in which case they will be
converted to a gimple operand if necessary.
This function returns the newly created GIMPLE_ASSIGN tuple. */
gimple
gimplify_assign (tree dst, tree src, gimple_seq *seq_p)
{
tree t = build2 (MODIFY_EXPR, TREE_TYPE (dst), dst, src);
gimplify_and_add (t, seq_p);
ggc_free (t);
return gimple_seq_last_stmt (*seq_p);
}

92
gcc/gimplify.h Normal file
View File

@ -0,0 +1,92 @@
/* Header file for gimplification.
Copyright (C) 2013 Free Software Foundation, Inc.
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
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/>. */
#ifndef GCC_GIMPLIFY_H
#define GCC_GIMPLIFY_H
#include "gimple.h"
/* Validation of GIMPLE expressions. Note that these predicates only check
the basic form of the expression, they don't recurse to make sure that
underlying nodes are also of the right form. */
typedef bool (*gimple_predicate)(tree);
/* FIXME we should deduce this from the predicate. */
enum fallback {
fb_none = 0, /* Do not generate a temporary. */
fb_rvalue = 1, /* Generate an rvalue to hold the result of a
gimplified expression. */
fb_lvalue = 2, /* Generate an lvalue to hold the result of a
gimplified expression. */
fb_mayfail = 4, /* Gimplification may fail. Error issued
afterwards. */
fb_either= fb_rvalue | fb_lvalue
};
typedef int fallback_t;
enum gimplify_status {
GS_ERROR = -2, /* Something Bad Seen. */
GS_UNHANDLED = -1, /* A langhook result for "I dunno". */
GS_OK = 0, /* We did something, maybe more to do. */
GS_ALL_DONE = 1 /* The expression is fully gimplified. */
};
extern void push_gimplify_context (struct gimplify_ctx *);
extern void pop_gimplify_context (gimple);
extern gimple gimple_current_bind_expr (void);
extern vec<gimple> gimple_bind_expr_stack (void);
extern void gimplify_and_add (tree, gimple_seq *);
extern tree get_formal_tmp_var (tree, gimple_seq *);
extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
extern void declare_vars (tree, gimple, bool);
extern void gimple_add_tmp_var (tree);
extern tree unshare_expr (tree);
extern tree unshare_expr_without_location (tree);
extern tree voidify_wrapper_expr (tree, tree);
extern tree build_and_jump (tree *);
extern enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *,
gimple_seq *, bool, tree);
extern tree gimple_boolify (tree);
extern bool gimplify_stmt (tree *, gimple_seq *);
extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree);
extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
bool (*) (tree), fallback_t);
extern void gimplify_type_sizes (tree, gimple_seq *);
extern void gimplify_one_sizepos (tree *, gimple_seq *);
extern gimple gimplify_body (tree, bool);
extern void gimplify_function_tree (tree);
extern void gimple_regimplify_operands (gimple, gimple_stmt_iterator *);
extern tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
extern tree force_gimple_operand (tree, gimple_seq *, bool, tree);
extern tree force_gimple_operand_gsi_1 (gimple_stmt_iterator *, tree,
gimple_predicate, tree,
bool, enum gsi_iterator_update);
extern tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
bool, enum gsi_iterator_update);
extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
gimple_seq *);
gimple gimplify_assign (tree, tree, gimple_seq *);
#endif /* GCC_GIMPLIFY_H */

View File

@ -1,3 +1,7 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* go/go-lang.c: Include gimplify.h.
2013-11-06 Ian Lance Taylor <iant@google.com>
* go-lang.c (go_langhook_post_options): If

View File

@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "opts.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "ggc.h"
#include "toplev.h"
#include "debug.h"

View File

@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-ssa-loop-manip.h"
#include "tree-ssa-loop.h"

View File

@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -21,7 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "langhooks.h"
#include "ggc.h"
#include "target.h"

View File

@ -78,7 +78,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "target.h"
#include "ipa-prop.h"
#include "gimple-ssa.h"

View File

@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cgraph.h"
#include "tree-pass.h"
#include "gimple.h"
#include "gimplify.h"
#include "ggc.h"
#include "flags.h"
#include "pointer-set.h"

View File

@ -1,3 +1,7 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* java/java-gimplify.c: Include gimplify.h.
2013-11-07 Jeff Law <law@redhat.com>
* builtins.c (initialize_builtins): Provide __builtin_trap.

View File

@ -27,7 +27,7 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */
#include "tree.h"
#include "java-tree.h"
#include "dumpfile.h"
#include "gimple.h"
#include "gimplify.h"
static tree java_gimplify_block (tree);
static enum gimplify_status java_gimplify_modify_expr (tree *);

View File

@ -26,7 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "toplev.h"
#include "tree.h"
#include "tree-inline.h"
#include "gimple.h"
#include "gimplify.h"
#include "rtl.h"
#include "insn-config.h"
#include "flags.h"

View File

@ -31,7 +31,6 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "df.h"
#include "ggc.h"
#include "gimple.h"
#include "tree-ssa-loop-niter.h"

View File

@ -1,3 +1,7 @@
2013-11-12 Andrew MacLeod <amacleod@redhat.com>
* objc/objc-act.c: Include gimplify.h.
2013-11-07 Andrew MacLeod <amacleod@redhat.com>
* objc-act.c (objc_push_parm): Handle atomic qualifier.

View File

@ -60,7 +60,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pretty-print.h"
/* For enum gimplify_status */
#include "gimple.h"
#include "gimplify.h"
/* For encode_method_prototype(). */
#include "objc-encoding.h"

View File

@ -27,7 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "rtl.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-iterator.h"
#include "tree-inline.h"
#include "langhooks.h"

View File

@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "hash-table.h"
#include "tree.h"
#include "tree-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -37,7 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h"
#include "tree-inline.h"
#include "tree-dump.h"
#include "gimple.h"
#include "gimplify.h"
/* Data type for the expressions representing sizes of data types.
It is the first integer type laid out. */

View File

@ -68,7 +68,7 @@ along with GCC; see the file COPYING3. If not see
#include "recog.h"
#include "intl.h"
#include "opts.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-ssanames.h"
#include "tree-ssa-alias.h"
#include "insn-codes.h"

View File

@ -22,7 +22,7 @@
#include "coretypes.h"
#include "hash-table.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "cgraph.h"
#include "tree-cfg.h"

View File

@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pretty-print.h"
#include "pointer-set.h"
#include "tree-affine.h"
#include "gimple.h"
#include "gimplify.h"
#include "flags.h"
#include "dumpfile.h"

View File

@ -30,7 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "ggc.h"
#include "gimple-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "cgraph.h"
#include "tree-cfg.h"

View File

@ -29,7 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "ggc.h"
#include "langhooks.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "flags.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -88,7 +88,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "basic-block.h"
#include "gimple-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "tree-iterator.h"
#include "intl.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -22,7 +22,6 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "tree-iterator.h"
#include "ggc.h"

View File

@ -45,7 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -26,7 +26,7 @@
#include "function.h"
#include "tree-dump.h"
#include "tree-inline.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-iterator.h"
#include "bitmap.h"
#include "cgraph.h"

View File

@ -23,7 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -191,7 +191,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "tm_p.h"
#include "cfgloop.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-phinodes.h"
#include "ssa-iterators.h"

View File

@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "coverage.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "cgraph.h"
#include "tree-cfg.h"

View File

@ -259,7 +259,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "hash-table.h"
#include "gimple-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -78,7 +78,7 @@ along with GCC; see the file COPYING3. If not see
#include "alloc-pool.h"
#include "tm.h"
#include "tree.h"
#include "gimple.h"
#include "gimplify.h"
#include "bitmap.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"

View File

@ -28,7 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "basic-block.h"
#include "tree-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "tree-ssanames.h"
#include "tree-ssa-loop-ivopts.h"
#include "tree-dfa.h"

View File

@ -119,7 +119,7 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "function.h"
#include "gimple-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -50,7 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple-pretty-print.h"
#include "basic-block.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm_p.h"
#include "basic-block.h"
#include "gimple-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

View File

@ -29,7 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "basic-block.h"
#include "tree-pretty-print.h"
#include "gimple.h"
#include "gimplify.h"
#include "gimple-ssa.h"
#include "tree-cfg.h"
#include "tree-phinodes.h"

Some files were not shown because too many files have changed in this diff Show More