diff options
author | 2016-01-15 14:35:12 -0800 | |
---|---|---|
committer | 2016-01-20 20:14:00 -0800 | |
commit | 3f67e692860d281858485d48a4f1f81b907f1444 (patch) | |
tree | a14d3bdc1416dc3db74983d34a408a8b48cbce9c /runtime/quick/inline_method_analyser.h | |
parent | 6aadaef35ea52506db61e463910c2520b702ca5e (diff) |
Implemented BitCount as an intrinsic. With unit test.
Rationale:
Recognizing this important operation as an intrinsic has
various advantages:
(1) having the no-side-effects/no-throw allows for
much more GVN/LICM/BCE.
(2) Some architectures, like x86_64, provide direct
support for this operation.
Performance improvements on X86_64:
CheckersEvalBench (32-bit bitboard): 27,210KNS -> 36,798KNS = + 35%
ReversiEvalBench (64-bit bitboard): 52,562KNS -> 89,086KNS = + 69%
Change-Id: I65d549b0469b7909b12c6611cdc34a8640a5751f
Diffstat (limited to 'runtime/quick/inline_method_analyser.h')
-rw-r--r-- | runtime/quick/inline_method_analyser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/quick/inline_method_analyser.h b/runtime/quick/inline_method_analyser.h index 6cea90219e..ca456c2861 100644 --- a/runtime/quick/inline_method_analyser.h +++ b/runtime/quick/inline_method_analyser.h @@ -39,6 +39,7 @@ enum InlineMethodOpcode : uint16_t { kIntrinsicFloatCvt, kIntrinsicReverseBits, kIntrinsicReverseBytes, + kIntrinsicBitCount, kIntrinsicNumberOfLeadingZeros, kIntrinsicNumberOfTrailingZeros, kIntrinsicRotateRight, |