Bug 68177

Summary: The DFG non-speculative JIT is no longer used and should be removed.
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, fpizlo, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 68186    
Bug Blocks:    
Attachments:
Description Flags
the patch ggaren: review+

Description Filip Pizlo 2011-09-15 12:01:31 PDT
Tiered compilation is enabled in ToT and produces a pure win.  Tiered compilation does not use the non-speculative JIT.  The non-speculative JIT is not used by anyone.  It should be removed.

This also implies removing the spec->non-spec failure code (since we now use OSR instead), the SpeculationCheck code (since we now use OSRExit instead), and any configuration options in DFGNode or elsewhere that pertain to non-speculative.

As part of its removal, any useful functionality that it did have that we intend on using in the speculative JIT should be transformed into a helper function on JITCodeGenerator.
Comment 1 Filip Pizlo 2011-09-15 15:36:47 PDT
Created attachment 107557 [details]
the patch

Will let this sit here for the bots to chew on.  I don't know if I killed the references to non-spec in a way that non-Mac platforms will like.
Comment 2 Filip Pizlo 2011-09-15 15:41:48 PDT
Performance tests indicate that this refactoring didn't break anything big.  Still running layout tests.



Benchmark report for SunSpider, V8, and Kraken.

VMs tested:
"TipOfTree" at /Volumes/Data/pizlo/septenary/OpenSource/WebKitBuild/Release/jsc
"TheNonSpecThe" at /Volumes/Data/pizlo/quartary/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             TheNonSpecThe                                  
SunSpider:
   3d-cube                                7.6177+-0.1156    ?     7.7606+-0.1962       ? might be 1.0188x slower
   3d-morph                               7.5393+-0.2320    ?     7.6219+-0.1830       ? might be 1.0110x slower
   3d-raytrace                            7.7714+-0.2578          7.5804+-0.2339         might be 1.0252x faster
   access-binary-trees                    2.3403+-0.1317    ?     2.3491+-0.0605       ?
   access-fannkuch                       11.5210+-0.2266         11.4543+-0.2352       
   access-nbody                           4.2669+-0.0950          4.1249+-0.0852         might be 1.0344x faster
   access-nsieve                          2.6167+-0.0547          2.5910+-0.0570       
   bitops-3bit-bits-in-byte               1.7149+-0.0711          1.6641+-0.0414         might be 1.0305x faster
   bitops-bits-in-byte                    2.7302+-0.0770    ?     2.7872+-0.0475       ? might be 1.0209x slower
   bitops-bitwise-and                     3.6835+-0.1097          3.5397+-0.0759         might be 1.0406x faster
   bitops-nsieve-bits                     5.2826+-0.1478          5.2773+-0.0838       
   controlflow-recursive                  1.9993+-0.0516          1.9780+-0.0702         might be 1.0108x faster
   crypto-aes                             7.0485+-0.4404          6.9846+-0.2883       
   crypto-md5                             2.8006+-0.0772    ?     3.3002+-0.6366       ? might be 1.1784x slower
   crypto-sha1                            2.1984+-0.0615    ?     2.2656+-0.0758       ? might be 1.0305x slower
   date-format-tofte                     10.6388+-0.4510         10.2994+-0.2232         might be 1.0330x faster
   date-format-xparb                      9.0774+-0.6078          8.8395+-0.2180         might be 1.0269x faster
   math-cordic                            6.2369+-0.1227          6.2271+-0.0884       
   math-partial-sums                      7.4144+-0.1098          7.3608+-0.1278       
   math-spectral-norm                     2.6606+-0.1141          2.6382+-0.0876       
   regexp-dna                            11.1858+-0.4029         11.0782+-0.3356       
   string-base64                          5.8766+-0.3127          5.7979+-0.2424         might be 1.0136x faster
   string-fasta                           7.1525+-0.1607          7.0287+-0.2103         might be 1.0176x faster
   string-tagcloud                       12.1184+-0.3133    ?    12.1203+-0.4079       ?
   string-unpack-code                    18.6965+-0.5085    ?    19.0846+-0.5797       ? might be 1.0208x slower
   string-validate-input                  6.7369+-0.2145          6.7058+-0.2513       

   <arithmetic>                           6.4972+-0.0399          6.4792+-0.0494       
   <geometric>                            5.3523+-0.0373          5.3443+-0.0431       
   <harmonic>                             4.3619+-0.0507          4.3610+-0.0394       

                                            TipOfTree             TheNonSpecThe                                  
V8:
   crypto                                83.4792+-0.6764         83.1459+-0.4669       
   deltablue                            245.5458+-1.6084        244.7773+-2.4858       
   earley-boyer                          95.4794+-1.0822    ?    95.8919+-0.8258       ?
   raytrace                              73.3252+-0.5046         73.1796+-0.7989       
   regexp                               107.4445+-0.6514    ?   107.7198+-0.5681       ?
   richards                             221.3328+-1.8472        220.4779+-1.2757       
   splay                                100.5540+-1.1823         99.2863+-1.3507         might be 1.0128x faster

   <arithmetic>                         132.4516+-0.4749        132.0684+-0.7092       
   <geometric>                          119.2531+-0.4279        118.9338+-0.5794       
   <harmonic>                           109.4740+-0.4200        109.1951+-0.5315       

                                            TipOfTree             TheNonSpecThe                                  
Kraken:
   ai-astar                             633.2072+-3.1198    ?   634.0155+-5.6007       ?
   audio-beat-detection                 483.5001+-6.8955        480.5581+-7.4540       
   audio-dft                            431.6491+-6.5128        429.2882+-5.2847       
   audio-fft                            372.8691+-1.7360        369.3022+-1.9860       
   audio-oscillator                     317.6334+-1.8057    ?   317.8665+-1.2358       ?
   imaging-darkroom                     428.3435+-9.1983        419.3040+-1.7876         might be 1.0216x faster
   imaging-desaturate                   207.9498+-0.5476    ?   209.7226+-1.7717       ?
   imaging-gaussian-blur               1730.3700+-2.7285    ?  1734.7773+-5.0711       ?
   json-parse-financial                  49.0744+-0.4401    ?    49.1756+-0.2212       ?
   json-stringify-tinderbox              69.9297+-0.5986    ?    70.2837+-1.3321       ?
   stanford-crypto-aes                  145.6043+-0.9866        145.1874+-0.8767       
   stanford-crypto-ccm                  113.0345+-0.9881        112.1558+-0.6815       
   stanford-crypto-pbkdf2               397.3920+-2.2566    ?   398.4926+-2.9769       ?
   stanford-crypto-sha256-iterative     150.0585+-1.5669        149.3581+-0.5932       

   <arithmetic>                         395.0440+-0.9378        394.2491+-1.1606       
   <geometric>                          264.2923+-0.5908        263.6392+-0.6825       
   <harmonic>                           176.9877+-0.5693        176.8618+-0.5881       

                                            TipOfTree             TheNonSpecThe                                  
All benchmarks:
   <arithmetic>                         140.9937+-0.2860        140.6899+-0.3304       
   <geometric>                           27.1488+-0.1023         27.0951+-0.1256       
   <harmonic>                             7.7001+-0.0873          7.6982+-0.0679
Comment 3 Filip Pizlo 2011-09-15 15:53:19 PDT
Comment on attachment 107557 [details]
the patch

Tests pass.  It appears that it's good.
Comment 4 Geoffrey Garen 2011-09-15 16:19:03 PDT
Comment on attachment 107557 [details]
the patch

r=me
Comment 5 Filip Pizlo 2011-09-15 16:23:56 PDT
Landed in r95240.