Bug 63684 - DFG non-speculative JIT always performs slow C calls for div and mod
Summary: DFG non-speculative JIT always performs slow C calls for div and mod
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-29 21:10 PDT by Filip Pizlo
Modified: 2011-07-01 13:04 PDT (History)
1 user (show)

See Also:


Attachments
the patch (6.06 KB, patch)
2011-06-29 21:13 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (fix style) (6.00 KB, patch)
2011-06-29 21:17 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2011-06-29 21:10:16 PDT
For division it's safe to always do it using the FPU, and for modulo it's best to first try integer mod and then revert to FPU mod.  This strategy will outperform the current one, which always results in slow C calls and register spilling.
Comment 1 Filip Pizlo 2011-06-29 21:13:27 PDT
Created attachment 99229 [details]
the patch

This fixes the regression on string-fasta.  It also results in an overall 1% speed-up on sunspider.
Comment 2 WebKit Review Bot 2011-06-29 21:15:47 PDT
Attachment 99229 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1

Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp:683:  One line control clauses should not use braces.  [whitespace/braces] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Filip Pizlo 2011-06-29 21:17:15 PDT
Created attachment 99230 [details]
the patch (fix style)
Comment 4 WebKit Review Bot 2011-07-01 13:04:37 PDT
Comment on attachment 99230 [details]
the patch (fix style)

Clearing flags on attachment: 99230

Committed r90268: <http://trac.webkit.org/changeset/90268>
Comment 5 WebKit Review Bot 2011-07-01 13:04:41 PDT
All reviewed patches have been landed.  Closing bug.