This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR java/15576, class initialization optimization disable

This patch cleans up a little the class initialization and fixes
it so that it works with the tree-ssa/gimplifier.  What needed
to be done was to add a DECL_EXPR for the decl so that the
initializer was expanded and also we needed to ignore DECL_EXPR
in check_init as nobody else in the java front-end uses it and
the variable was only a scaler type with a constant initializer.

I also think this optimization can now be turned on for class file
to native compiling as we now do it function at a time compiling for
them (I think we don't do unit-at-a-time yet though) but that is for
another patch.

Built on powerpc-darwin.  I am in the middle of testing it. OK if
everthing passes?

Andrew Pinski

	* check-init.c (check_init): Ignore DECL_EXPR.
	* expr.c (always_initialize_class_p): Reenable.
	(build_class_init): Use a variable to store the decl.  Also use
	boolean_false_node instead of integer_zero_node.
	* parse.y (attach_init_test_initialization_flags): Add a decl_expr
	to the block.


Attachment: temp1.diff.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]