diff options
author | Richard Biener <rguenth@gcc.gnu.org> | 2008-07-28 14:33:56 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-07-28 14:33:56 +0000 |
commit | 726a989a8b74bf238a96029860bcf7ba14eff317 (patch) | |
tree | 2926705dd533a8904679724ab1cec40dfee45094 /gcc/java | |
parent | 0d48657d7378a4b1cb25ed181bca8020eae520f1 (diff) | |
download | gcc-726a989a8b74bf238a96029860bcf7ba14eff317.zip gcc-726a989a8b74bf238a96029860bcf7ba14eff317.tar.gz gcc-726a989a8b74bf238a96029860bcf7ba14eff317.tar.bz2 |
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge from gimple-tuples-branch.
* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
* gimple.def: New file.
* gsstruct.def: Likewise.
* gimple-iterator.c: Likewise.
* gimple-pretty-print.c: Likewise.
* tree-gimple.c: Removed. Merged into ...
* gimple.c: ... here. New file.
* tree-gimple.h: Removed. Merged into ...
* gimple.h: ... here. New file.
* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
--enable-checking=gimple flag.
* config.in: Likewise.
* configure: Regenerated.
* tree-ssa-operands.h: Tuplified.
* tree-vrp.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-dump.c: Likewise.
* tree-complex.c: Likewise.
* cgraphbuild.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-pretty-print.c: Likewise.
* tracer.c: Likewise.
* gengtype.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* value-prof.c: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-tailcall.c: Likewise.
* value-prof.h: Likewise.
* tree.c: Likewise.
* tree.h: Likewise.
* tree-pass.h: Likewise.
* ipa-cp.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-scalar-evolution.h: Likewise.
* target.h: Likewise.
* lambda-mat.c: Likewise.
* tree-phinodes.c: Likewise.
* diagnostic.h: Likewise.
* builtins.c: Likewise.
* tree-ssa-alias-warnings.c: Likewise.
* cfghooks.c: Likewise.
* fold-const.c: Likewise.
* cfghooks.h: Likewise.
* omp-low.c: Likewise.
* tree-ssa-dse.c: Likewise.
* ipa-reference.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* toplev.c: Likewise.
* tree-gimple.c: Likewise.
* tree-gimple.h: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sccvn.h: Likewise.
* cgraphunit.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-call-cdce.c: Likewise.
* ipa-pure-const.c: Likewise.
* c-format.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-nrv.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* ipa-utils.c: Likewise.
* tree-ssa-propagate.h: Likewise.
* tree-ssa-alias.c: Likewise.
* gimple-low.c: Likewise.
* tree-ssa-sink.c: Likewise.
* ipa-inline.c: Likewise.
* c-semantics.c: Likewise.
* dwarf2out.c: Likewise.
* expr.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* predict.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-parloops.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* matrix-reorg.c: Likewise.
* c-decl.c: Likewise.
* tree-eh.c: Likewise.
* c-pretty-print.c: Likewise.
* lambda-trans.c: Likewise.
* function.c: Likewise.
* langhooks.c: Likewise.
* ebitmap.h: Likewise.
* tree-vectorizer.c: Likewise.
* function.h: Likewise.
* langhooks.h: Likewise.
* tree-vectorizer.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* domwalk.c: Likewise.
* tree-if-conv.c: Likewise.
* profile.c: Likewise.
* domwalk.h: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-flow-inline.h: Likewise.
* tree-affine.c: Likewise.
* tree-vect-analyze.c: Likewise.
* c-typeck.c: Likewise.
* gimplify.c: Likewise.
* coretypes.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* calls.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree.def: Likewise.
* tree-dfa.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* cfgexpand.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-predcom.c: Likewise.
* lambda.h: Likewise.
* tree-mudflap.c: Likewise.
* ipa-prop.c: Likewise.
* print-tree.c: Likewise.
* tree-ssa-copy.c: Likewise.
* ipa-prop.h: Likewise.
* tree-ssa-forwprop.c: Likewise.
* ggc-page.c: Likewise.
* c-omp.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-nested.c: Likewise.
* tree-ssa.c: Likewise.
* lambda-code.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-iterator.c: Likewise.
* tree-optimize.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-vect-transform.c: Likewise.
* tree-object-size.c: Likewise.
* tree-outof-ssa.c: Likewise.
* cfgloop.c: Likewise.
* system.h: Likewise.
* tree-profile.c: Likewise.
* cfgloop.h: Likewise.
* c-gimplify.c: Likewise.
* c-common.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-flow.h: Likewise.
* c-common.h: Likewise.
* basic-block.h: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-ssa-structalias.h: Likewise.
* tree-cfg.c: Likewise.
* passes.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* tree-ssa-reassoc.c: Likewise.
* cfgrtl.c: Likewise.
* varpool.c: Likewise.
* stmt.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* langhooks-def.h: Likewise.
* tree-ssa-operands.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/frv/frv.c: Likewise.
* config/s390/s390.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32c/m32c-protos.h: Likewise.
* config/spu/spu.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/i386/i386.c: Likewise.
* config/sh/sh.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/pa/pa.c: Likewise.
* config/mips/mips.c: Likewise.
From-SVN: r138207
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 45 | ||||
-rw-r--r-- | gcc/java/Make-lang.in | 5 | ||||
-rw-r--r-- | gcc/java/expr.c | 15 | ||||
-rw-r--r-- | gcc/java/java-gimplify.c | 25 | ||||
-rw-r--r-- | gcc/java/java-tree.h | 4 |
5 files changed, 74 insertions, 20 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 7fb266d..a2c3cca 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,48 @@ +2008-07-28 Richard Guenther <rguenther@suse.de> + + Merge from gimple-tuples-branch. + + 2008-07-18 Richard Guenther <rguenther@suse.de> + + * expr.c: Include tree-iterator.h. + * Make-lang.in (expr.o): Add tree-iterator.h dependency. + + 2008-07-18 Aldy Hernandez <aldyh@redhat.com> + + * java-gimplify.c: Include gimple.h instead of tree-gimple.h. + * expr.c: Same. + + 2008-07-14 Aldy Hernandez <aldyh@redhat.com> + + * java-gimplify.c (java_gimplify_expr): Same. + (java_gimplify_modify_expr): Same. + * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN. + + 2008-05-02 Diego Novillo <dnovillo@google.com> + + * expr.c (build_java_throw_out_of_bounds_exception): Fix + mixed declarations and code. + + 2008-05-02 Doug Kwan <dougkwan@google.com> + + * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to + _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0. + + 2008-02-19 Diego Novillo <dnovillo@google.com> + + http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html + + * java-gimplify.c (java_gimplify_self_mod_expr): Change + gimple_seq arguments to gimple_seq *. Update all users. + + 2007-11-26 Aldy Hernandez <aldyh@redhat.com> + + * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p + sequences. + (java_gimplify_self_mod_expr): Same. + * java-tree.h (java_gimplify_expr): Make pre_p and post_p + sequences. + 2008-07-24 Jan Hubicka <jh@suse.cz> * java/decl.c: Include cgraph.h diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index c5446db..f188c7d 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -269,7 +269,8 @@ java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \ java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h $(REAL_H) \ $(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \ java/java-except.h java/java-except.h java/parse.h toplev.h \ - $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h $(TARGET_H) + $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) gt-java-expr.h $(TARGET_H) \ + tree-iterator.h java/jcf-depend.o: java/jcf-depend.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) java/jcf.h java/jcf-parse.o: java/jcf-parse.c $(CONFIG_H) $(JAVA_TREE_H) $(FLAGS_H) \ @@ -298,7 +299,7 @@ java/verify-impl.o: java/verify-impl.c $(CONFIG_H) java/verify.h $(SYSTEM_H) \ java/zextract.o: java/zextract.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ java/zipfile.h java/java-gimplify.o: java/java-gimplify.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TM_H) $(JAVA_TREE_H) $(TREE_GIMPLE_H) toplev.h + coretypes.h $(TM_H) $(JAVA_TREE_H) $(GIMPLE_H) toplev.h # jcf-io.o needs $(ZLIBINC) added to cflags. java/jcf-io.o: java/jcf-io.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ diff --git a/gcc/java/expr.c b/gcc/java/expr.c index c64f6d6..ff28bbb 100644 --- a/gcc/java/expr.c +++ b/gcc/java/expr.c @@ -42,7 +42,8 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "toplev.h" #include "except.h" #include "ggc.h" -#include "tree-gimple.h" +#include "tree-iterator.h" +#include "gimple.h" #include "target.h" static void flush_quick_stack (void); @@ -814,10 +815,20 @@ encode_newarray_type (tree type) static tree build_java_throw_out_of_bounds_exception (tree index) { - tree node = build_call_nary (int_type_node, + tree node; + + /* We need to build a COMPOUND_EXPR because _Jv_ThrowBadArrayIndex() + has void return type. We cannot just set the type of the CALL_EXPR below + to int_type_node because we would lose it during gimplification. */ + gcc_assert (VOID_TYPE_P (TREE_TYPE (TREE_TYPE (soft_badarrayindex_node)))); + node = build_call_nary (void_type_node, build_address_of (soft_badarrayindex_node), 1, index); + TREE_SIDE_EFFECTS (node) = 1; + + node = build2 (COMPOUND_EXPR, int_type_node, node, integer_zero_node); TREE_SIDE_EFFECTS (node) = 1; /* Allows expansion within ANDIF */ + return (node); } diff --git a/gcc/java/java-gimplify.c b/gcc/java/java-gimplify.c index 5358241..790cb13 100644 --- a/gcc/java/java-gimplify.c +++ b/gcc/java/java-gimplify.c @@ -28,12 +28,13 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ #include "tree.h" #include "java-tree.h" #include "tree-dump.h" -#include "tree-gimple.h" +#include "gimple.h" #include "toplev.h" static tree java_gimplify_block (tree); static enum gimplify_status java_gimplify_modify_expr (tree *); -static enum gimplify_status java_gimplify_self_mod_expr (tree*, tree*, tree *); +static enum gimplify_status java_gimplify_self_mod_expr (tree *, gimple_seq *, + gimple_seq *); static void dump_java_tree (enum tree_dump_index, tree); @@ -53,8 +54,7 @@ java_genericize (tree fndecl) /* Gimplify a Java tree. */ int -java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, - tree *post_p ATTRIBUTE_UNUSED) +java_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) { enum tree_code code = TREE_CODE (*expr_p); @@ -68,9 +68,6 @@ java_gimplify_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, *expr_p = java_replace_reference (*expr_p, /* want_lvalue */ false); return GS_UNHANDLED; - /* We don't handle GIMPLE_MODIFY_STMT, as MODIFY_EXPRs with java - semantics should only be generated by the front-end, and never - by anything after gimplification. */ case MODIFY_EXPR: return java_gimplify_modify_expr (expr_p); @@ -142,7 +139,7 @@ java_gimplify_modify_expr (tree *modify_expr_p) { tree new_lhs = java_replace_reference (lhs, /* want_lvalue */ true); tree new_rhs = build1 (NOP_EXPR, TREE_TYPE (new_lhs), rhs); - modify_expr = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (new_lhs), + modify_expr = build2 (MODIFY_EXPR, TREE_TYPE (new_lhs), new_lhs, new_rhs); modify_expr = build1 (NOP_EXPR, lhs_type, modify_expr); } @@ -160,8 +157,8 @@ java_gimplify_modify_expr (tree *modify_expr_p) between the reading and the writing. */ static enum gimplify_status -java_gimplify_self_mod_expr (tree *expr_p, tree *pre_p ATTRIBUTE_UNUSED, - tree *post_p ATTRIBUTE_UNUSED) +java_gimplify_self_mod_expr (tree *expr_p, gimple_seq *pre_p ATTRIBUTE_UNUSED, + gimple_seq *post_p ATTRIBUTE_UNUSED) { tree lhs = TREE_OPERAND (*expr_p, 0); @@ -180,7 +177,7 @@ java_gimplify_block (tree java_block) { tree decls = BLOCK_VARS (java_block); tree body = BLOCK_EXPR_BODY (java_block); - tree outer = gimple_current_bind_expr (); + gimple outer = gimple_current_bind_expr (); tree block; /* Don't bother with empty blocks. */ @@ -199,10 +196,10 @@ java_gimplify_block (tree java_block) routines generate info for the variables in that block. */ TREE_USED (block) = 1; - if (outer != NULL_TREE) + if (outer != NULL) { - outer = BIND_EXPR_BLOCK (outer); - BLOCK_SUBBLOCKS (outer) = chainon (BLOCK_SUBBLOCKS (outer), block); + tree b = gimple_bind_block (outer); + BLOCK_SUBBLOCKS (b) = chainon (BLOCK_SUBBLOCKS (b), block); } BLOCK_EXPR_BODY (java_block) = NULL_TREE; diff --git a/gcc/java/java-tree.h b/gcc/java/java-tree.h index a046a0f..7ae71d9 100644 --- a/gcc/java/java-tree.h +++ b/gcc/java/java-tree.h @@ -649,7 +649,7 @@ struct lang_identifier GTY(()) /* The resulting tree type. */ union lang_tree_node GTY((desc ("TREE_CODE (&%h.generic) == IDENTIFIER_NODE"), - chain_next ("(union lang_tree_node *)GENERIC_NEXT (&%h.generic)"))) + chain_next ("(union lang_tree_node *)TREE_CHAIN (&%h.generic)"))) { union tree_node GTY ((tag ("0"), @@ -1555,7 +1555,7 @@ enum #undef DEBUG_JAVA_BINDING_LEVELS extern void java_genericize (tree); -extern int java_gimplify_expr (tree *, tree *, tree *); +extern int java_gimplify_expr (tree *, gimple_seq *, gimple_seq *); extern FILE *finput; |