[Webkit-unassigned] [Bug 63565] DFG non-speculative JIT does not reuse registers when compiling comparisons

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 28 15:07:18 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=63565


Gavin Barraclough <barraclough at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #98975|review?                     |review-
               Flag|                            |




--- Comment #2 from Gavin Barraclough <barraclough at apple.com>  2011-06-28 15:07:19 PST ---
(From update of attachment 98975)
View in context: https://bugs.webkit.org/attachment.cgi?id=98975&action=review

r- based on above comments, I think we can simplify further by switching to the 3-op branchAdd32 etc calls.

In basicArithOp we're also retagging arg2 in the case of overflow (& a register has been reused), which I think we can remove if we stop zero-extending the operands.

> Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp:-176
> -        

Actually, I think we can just remove this - the macro assembler has a 3-op form:
branchAdd32(ResultCondition cond, RegisterID src, TrustedImm32 imm, RegisterID dest) (& branchSub32).
These should be more helpful for platforms with 3-op instructions, like arm.

BTW, if we didn't have the 3-op branchAdd32, then I don't think you need zero extension here (since 32bit ops ignore the high bits coming in, and always set high bits to zero), so I think you could just use a move.  And the macro assembler will automatically elide moves to the same register, so you wouldn't need the if check.

> Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp:291
>      m_jit.zeroExtend32ToPtr(arg1GPR, resultGPR);

Looking over this, again, I don't think we need the zero extends here, and as such, I don't think we need use to use a temporary, at minimum in the case of no overflow.  Again, there are 3-op branchAdd/Sub/Mul calls, which should allow us to plant this in a single instruction on arm.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list