PATCH: re-enable static initializer optimization
Per Bothner
per@bothner.com
Thu Dec 6 13:37:00 GMT 2001
Here is my patch to re-enable the static initialier optimizaton.
The critical change is in the code that checks whether
one of the initilier variables is always set. I moved
this to check_init instead of java_complete_expand_method,
the old code would return a bitset, but that was not safe.
I made some other tweaks, te most inportant was to get
rid of DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND
as a hashtable, and just use a list. I didn't see any
reason why we actully needed a hashtable.
I also think it might be reasonable to combine the
remaining two per-method hashtables, given that they
have the same key and that all value stored in
DECL_FUNCTION_INITIALIZED_CLASS_TABLE is just a single
bit indocating its existence. It should be straight-forward
to replace that hashtable and just use init_test_table.
However, I did not do that.
I'll let Alex take a look before I check this in.
I've done a bootstrap and the testsuite has no regressions.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: opt-init.patch
URL: <http://gcc.gnu.org/pipermail/java/attachments/20011206/db9f1301/attachment.ksh>
More information about the Java
mailing list