Chromium Code Reviews
DescriptionAOT: Enable branch merging for checked smi comparisons
This generates better code for smi comparisons in AOT code where the inputs
are not known smis: It avoids materializing the bool-value before branching.
Before:
;; v46 <- CheckedSmiOp:86(==, v35, v77)
;; Branch if StrictCompare:88(!==, v46, v38) goto (8, 9)
0x10e0c2ca3 f6c201 testb rdx,1
0x10e0c2ca6 0f8526010000 jnz 0x10e0c2dd2
0x10e0c2cac 483bca cmpq rcx,rdx
0x10e0c2caf 0f8409000000 jz 0x10e0c2cbe
0x10e0c2cb5 498b5e58 movq rbx,[thr+0x58] false
0x10e0c2cb9 e904000000 jmp 0x10e0c2cc2
0x10e0c2cbe 498b5e50 movq rbx,[thr+0x50] true
0x10e0c2cc2 493b5e50 cmpq rbx,[thr+0x50] true
0x10e0c2cc6 0f8429000000 jz 0x10e0c2cf5 ;; B9
;; B8
===
After:
;; Branch if CheckedSmiComparison:86(!=, v35, v77) goto (8, 9)
0x118b3ce15 f6c201 testb rdx,1
0x118b3ce18 0f850c010000 jnz 0x118b3cf2a
0x118b3ce1e 483bca cmpq rcx,rdx
0x118b3ce21 0f8429000000 jz 0x118b3ce50 ;; B9
;; B8
R=vegorov@google.com
Committed: https://github.com/dart-lang/sdk/commit/0294f8650d5dab0b786f10fb180e32008a131aae
BUG=#27459
Patch Set 1 #Patch Set 2 : merged #Patch Set 3 : ported to all architectures #
Total comments: 4
Patch Set 4 : addressed comments #
Messages
Total messages: 8 (3 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||