[PATCH] Java: expand divide, expand conversions

Tom Tromey tromey@cygnus.com
Mon Jul 19 10:52:00 GMT 1999


>>>>> "Andrew" == Andrew Haley <aph@pasanda.cygnus.co.uk> writes:

Andrew> I could easily do that, but it would result in evil code
Andrew> bloat.

Yeah.

>> It seems like we could potentially optimize the test away in some
>> situations (that is, if gcc has the necessary machinery for this,
>> which is something I don't know).

Andrew> The call to the divide subroutine isn't generated when
Andrew> dividing by a constant, so there's no overhead in that case.

Cool.  I also meant the case where we have "a / b" but can prove that
b != 0.  Can gcc do this?  (I'm just curious now; your patch is fine
with me.)

T


More information about the Java mailing list