OSDN Git Service

Inline some java.lang.Math functions.
authorAndy McFadden <fadden@android.com>
Tue, 30 Jun 2009 00:04:04 +0000 (17:04 -0700)
committerAndy McFadden <fadden@android.com>
Tue, 30 Jun 2009 18:22:29 +0000 (11:22 -0700)
commit87cf7312247b341b54be26904e3600e98967d695
tree6efc33ac43398472e7e7ed0c4b36f06b8deab1e7
parent44d7864f79a22fe110b8e6187ac21e908f41fb1d
Inline some java.lang.Math functions.

For a first pass, I inlined the various flavors of abs(), min()/max() on
integers, sqrt(), cos(), and sin().  These were selected based on a
static analysis of a few of our jar files.

A test of repeated sin/cos/sqrt calls on a G1-class device showed an
improvement of 28%.  This would improve more on devices with VFP
support if the VM is compiled with -mfpu=vfp.

Also: clarified a warning and removed some "#if 0" stuff.
dexopt/OptMain.c
tests/003-omnibus-opcodes/expected.txt
tests/003-omnibus-opcodes/src/FloatMath.java
tests/003-omnibus-opcodes/src/IntMath.java
vm/Android.mk
vm/DalvikVersion.h
vm/InlineNative.c
vm/Misc.h