diff options
author | 2016-02-25 11:32:32 -0800 | |
---|---|---|
committer | 2016-02-26 09:16:07 -0800 | |
commit | 2a6aad9d388bd29bff04aeec3eb9429d436d1873 (patch) | |
tree | a5fa70df33d410af1be1064c460b6e34f07caf93 /runtime/quick/inline_method_analyser.h | |
parent | 9ec486cc08ad658eee33f9bde405b97502562840 (diff) |
Implement fp to bits methods as intrinsics.
Rationale:
Better optimization, better performance.
Results on libcore benchmark:
Most gain is from moving the invariant call out of the loop
after we detect everything is a side-effect free intrinsic.
But generated code in general case is much cleaner too.
Before:
timeFloatToIntBits() in 181 ms.
timeFloatToRawIntBits() in 35 ms.
timeDoubleToLongBits() in 208 ms.
timeDoubleToRawLongBits() in 35 ms.
After:
timeFloatToIntBits() in 36 ms.
timeFloatToRawIntBits() in 35 ms.
timeDoubleToLongBits() in 35 ms.
timeDoubleToRawLongBits() in 34 ms.
bug=11548336
Change-Id: I6e001bd3708e800bd75a82b8950fb3a0fc01766e
Diffstat (limited to 'runtime/quick/inline_method_analyser.h')
-rw-r--r-- | runtime/quick/inline_method_analyser.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/quick/inline_method_analyser.h b/runtime/quick/inline_method_analyser.h index 0b09a70be4..7e84b405e7 100644 --- a/runtime/quick/inline_method_analyser.h +++ b/runtime/quick/inline_method_analyser.h @@ -37,6 +37,8 @@ class MethodVerifier; enum InlineMethodOpcode : uint16_t { kIntrinsicDoubleCvt, kIntrinsicFloatCvt, + kIntrinsicFloat2Int, + kIntrinsicDouble2Long, kIntrinsicFloatIsInfinite, kIntrinsicDoubleIsInfinite, kIntrinsicFloatIsNaN, |