Bug 67554 - DFG variable predictions only work for local variables, not temporaries
Summary: DFG variable predictions only work for local variables, not temporaries
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-09-02 23:14 PDT by Filip Pizlo
Modified: 2011-09-03 00:48 PDT (History)
1 user (show)

See Also:


Attachments
the patch (1.84 KB, patch)
2011-09-02 23:18 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-09-02 23:14:29 PDT
The local variable prediction code in DFG::Graph does not work for temporaries, even though it easily could, and probably should.  This causes speculation logic to be overly conservative if a temporary is live across multiple basic blocks.
Comment 1 Filip Pizlo 2011-09-02 23:18:14 PDT
Created attachment 106247 [details]
the patch
Comment 2 Filip Pizlo 2011-09-02 23:21:39 PDT
This is the performance:



Benchmark report for SunSpider, V8, and Kraken.

VMs tested:
"TipOfTree" at /Volumes/Data/pizlo/quinary/OpenSource/WebKitBuild/Release/jsc
"ResizeVarPreds" at /Volumes/Data/pizlo/septenary/OpenSource/WebKitBuild/Release/jsc

Collected 12 samples per benchmark/VM, with 4 VM invocations per benchmark. Used 1 benchmark iteration per VM
invocation for warm-up. Used the jsc-specific preciseTime() function to get microsecond-level timing. Reporting
benchmark execution times with 95% confidence intervals in milliseconds.

                                            TipOfTree             ResizeVarPreds                                 
SunSpider:
   3d-cube                                8.0769+-0.2633          7.8421+-0.1866         might be 1.0299x faster
   3d-morph                               7.9217+-0.1421    ^     7.6166+-0.1522       ^ definitely 1.0401x faster
   3d-raytrace                            7.5407+-0.2822    ?     7.5764+-0.1596       ?
   access-binary-trees                    2.3041+-0.0434          2.2708+-0.0502         might be 1.0147x faster
   access-fannkuch                       11.9338+-0.2432         11.9160+-0.2582       
   access-nbody                           4.2317+-0.0457    ?     4.3202+-0.0630       ? might be 1.0209x slower
   access-nsieve                          2.6031+-0.1330          2.5357+-0.0514         might be 1.0266x faster
   bitops-3bit-bits-in-byte               1.7767+-0.0823          1.7109+-0.0568         might be 1.0385x faster
   bitops-bits-in-byte                    4.5004+-0.1841    ?     4.6038+-0.2552       ? might be 1.0230x slower
   bitops-bitwise-and                     3.7526+-0.1117          3.7345+-0.0547       
   bitops-nsieve-bits                     5.4707+-0.1478    ?     5.5343+-0.1609       ? might be 1.0116x slower
   controlflow-recursive                  2.0275+-0.0386    ?     2.1304+-0.0970       ? might be 1.0507x slower
   crypto-aes                             6.5957+-0.1562          6.5791+-0.1279       
   crypto-md5                             2.7703+-0.0633          2.7343+-0.0570         might be 1.0132x faster
   crypto-sha1                            2.3163+-0.0783          2.2194+-0.0506         might be 1.0437x faster
   date-format-tofte                     10.3854+-0.2497    ?    10.3987+-0.3102       ?
   date-format-xparb                      8.8015+-0.2505          8.7822+-0.2139       
   math-cordic                            6.4468+-0.0492    ?     6.4918+-0.0753       ?
   math-partial-sums                      8.1159+-0.2666          7.8487+-0.2188         might be 1.0340x faster
   math-spectral-norm                     2.5621+-0.0720          2.5355+-0.0520         might be 1.0105x faster
   regexp-dna                            10.3926+-0.0760    ?    10.4463+-0.1122       ?
   string-base64                          6.1697+-0.2178    ?     6.2009+-0.2772       ?
   string-fasta                           7.5724+-0.1146          7.4252+-0.1236         might be 1.0198x faster
   string-tagcloud                       12.3140+-0.4933         12.2323+-0.2761       
   string-unpack-code                    18.9475+-0.4868    ?    19.3867+-0.4740       ? might be 1.0232x slower
   string-validate-input                  7.4412+-0.2151    ?     7.4739+-0.2596       ?

   <arithmetic>                           6.6527+-0.0453          6.6364+-0.0350       
   <geometric>                            5.5332+-0.0355          5.5064+-0.0282       
   <harmonic>                             4.5285+-0.0383          4.4957+-0.0263       

                                            TipOfTree             ResizeVarPreds                                 
V8:
   crypto                                92.3651+-0.3348         92.3497+-0.5405       
   deltablue                            144.0207+-0.8783        143.1391+-1.0990       
   earley-boyer                         100.5560+-0.5754    ?   100.5589+-0.5720       ?
   raytrace                              52.9002+-0.3640         52.4050+-0.3120       
   regexp                               111.1890+-0.4171    ?   111.7704+-0.8885       ?
   richards                             246.2668+-0.7304    ?   249.7471+-4.0842       ? might be 1.0141x slower
   splay                                104.8678+-0.6789    ?   104.9036+-0.6532       ?

   <arithmetic>                         121.7380+-0.2460    ?   122.1249+-0.5218       ?
   <geometric>                          110.6561+-0.2208    ?   110.7121+-0.2636       ?
   <harmonic>                           101.1378+-0.2360        100.9628+-0.2184       

                                            TipOfTree             ResizeVarPreds                                 
Kraken:
   ai-astar                            1117.1826+-7.3669       1107.8483+-4.7591       
   audio-beat-detection                 479.5615+-1.5012    ?   481.1826+-1.6781       ?
   audio-dft                            437.8244+-5.0489    ?   439.3640+-3.1897       ?
   audio-fft                            373.5425+-0.4485    ?   373.8119+-1.7038       ?
   audio-oscillator                     386.2704+-2.5483        385.2089+-1.5145       
   imaging-darkroom                     560.4767+-1.9983    ^   553.5504+-1.7509       ^ definitely 1.0125x faster
   imaging-desaturate                   601.5663+-7.9396        600.6047+-6.4242       
   imaging-gaussian-blur               1756.0249+-3.8117    ?  1760.0847+-4.2614       ?
   json-parse-financial                  48.0583+-0.4829    ?    48.1131+-0.2504       ?
   json-stringify-tinderbox              73.4140+-0.3952    ?    73.4151+-0.3149       ?
   stanford-crypto-aes                  148.1695+-2.6645        146.9939+-0.8603       
   stanford-crypto-ccm                  118.6461+-4.4542    ^   113.2232+-0.5431       ^ definitely 1.0479x faster
   stanford-crypto-pbkdf2               351.8983+-2.5204        348.3458+-1.5261         might be 1.0102x faster
   stanford-crypto-sha256-iterative     134.3091+-0.8045    ^   132.5642+-0.6250       ^ definitely 1.0132x faster

   <arithmetic>                         470.4960+-1.0338    ^   468.8793+-0.5025       ^ definitely 1.0034x faster
   <geometric>                          304.3833+-1.0155    ^   302.4315+-0.3470       ^ definitely 1.0065x faster
   <harmonic>                           187.9824+-0.9233    ^   186.6012+-0.3609       ^ definitely 1.0074x faster

                                            TipOfTree             ResizeVarPreds                                 
All benchmarks:
   <arithmetic>                         161.9592+-0.3159        161.5262+-0.1479       
   <geometric>                           28.5211+-0.1086         28.3923+-0.0794       
   <harmonic>                             7.9863+-0.0660          7.9289+-0.0452
Comment 3 Filip Pizlo 2011-09-02 23:33:44 PDT
Comment on attachment 106247 [details]
the patch

Passes tests.
Comment 4 WebKit Review Bot 2011-09-03 00:48:21 PDT
Comment on attachment 106247 [details]
the patch

Clearing flags on attachment: 106247

Committed r94484: <http://trac.webkit.org/changeset/94484>
Comment 5 WebKit Review Bot 2011-09-03 00:48:25 PDT
All reviewed patches have been landed.  Closing bug.