what optimizations are invalid in java?

Tom Tromey tromey@redhat.com
Tue Mar 12 11:18:00 GMT 2002


>>>>> "Jan" == Jan Hubicka <jh@suse.cz> writes:

Jan> thinking more about Java and exceptions, can someone who
Jan> understand standard better than I do comment what transfromations
Jan> are valid and what invalid:
Jan> fold_const: We can remove dead parts of expresisons poossibly eliminating
Jan> trap.
If they are dead then they can't be executed, correct?
In that case no trap could occur.
Jan> cleanup_cfg: We may eliminate fp comparison that traps in case the associated
Jan> branch is not needed.
Floating point operations never result in traps in Java.
Integer division and mod are the only arithmetic operators to do this.
Jan> GCSE: Can we do code motion that reorder traps? I guess not.
Nope. Java has fairly strict ordering. The effects of an assignment
occurring before such a trap must be visible after the exception is
thrown.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /