| Summary: | Allow DFGClobberize to return non-node constants that must be later created | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Basile Clement <basile_clement> | ||||||||||||
| Component: | New Bugs | Assignee: | Basile Clement <basile_clement> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | commit-queue, fpizlo, ggaren, mark.lam, msaboff | ||||||||||||
| Priority: | P2 | ||||||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Basile Clement
2015-05-21 10:41:18 PDT
Created attachment 253532 [details]
Patch
It looks like your slow downs are within noise. One of the reasons why I hadn't added this capability previously is that our current benchmarks don't seem to need it. But it's an obviously desirable optimization and we don't limit ourselves to just those optimizations that make sense for existing benchmarks. Comment on attachment 253532 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253532&action=review > Source/JavaScriptCore/dfg/DFGLazyNode.h:183 > + NodeType m_op:16; It feels like you could make this be a pointer-width or 64-bit data structure. You only need to know the op for constants, and then there are only 3 choices. You sort of need 1 bit to determine if it's a node or frozen value, except that if the bit says "Node" then the op is superfluous. So you really have only four options for these two fields: Node, Frozen Value JS, Frozen Value Double, and Frozen Value Int52. This means that you only need two bits. You can always hide two bits in the low bits of a pointer. (In reply to comment #2) > It looks like your slow downs are within noise. One of the reasons why I > hadn't added this capability previously is that our current benchmarks don't > seem to need it. But it's an obviously desirable optimization and we don't > limit ourselves to just those optimizations that make sense for existing > benchmarks. Although the slowdown is relatively consistent throughout runs, I see your point. However, I was having doubts that this is really a desirable optimization. The really expensive operation here is the array allocation, not the access to the fields, so it may be a better place to handle this in object allocation sinking rather than CSE. Then we wouldn't have this in DFG mode, but then again, it is currently disabled in DFG for small blocks (see FIXME in DFGCSEPhase.cpp) already. (In reply to comment #3) > Comment on attachment 253532 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=253532&action=review > > > Source/JavaScriptCore/dfg/DFGLazyNode.h:183 > > + NodeType m_op:16; > > It feels like you could make this be a pointer-width or 64-bit data > structure. You only need to know the op for constants, and then there are > only 3 choices. You sort of need 1 bit to determine if it's a node or frozen > value, except that if the bit says "Node" then the op is superfluous. So you > really have only four options for these two fields: Node, Frozen Value JS, > Frozen Value Double, and Frozen Value Int52. This means that you only need > two bits. You can always hide two bits in the low bits of a pointer. Ah, I was not sure the "you can always hide two bits in the low bits of a pointer" thing was true for all the architectures we need to support, but this was my first idea as well. I will try changing that and see how it goes. Created attachment 253562 [details]
Patch
The benchmarks now look more reasonable to me. Benchmark report for SunSpider, LongSpider, V8Spider, Octane, Kraken, JSRegress, AsmBench, and CompressionBench on Basiles-Mac-Pro (MacPro6,1). VMs tested: "r184563" at /Volumes/Data/secondary/OpenSource/WebKitBuild/Release/jsc "LazyNode" at /Volumes/Data/secondary/OpenSource/WebKitBuild/LazyNode/Release/jsc Collected 6 samples per benchmark/VM, with 6 VM invocations per benchmark. Emitted a call to gc() between sample measurements. 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. r184563 LazyNode SunSpider: 3d-cube 6.8330+-0.0475 6.7893+-0.0757 3d-morph 7.5724+-0.0526 7.5501+-0.0345 3d-raytrace 8.4367+-0.0825 8.3979+-0.0792 access-binary-trees 2.9316+-0.0601 2.9127+-0.0458 access-fannkuch 7.7530+-0.1141 7.7306+-0.0592 access-nbody 3.9899+-0.3533 3.8789+-0.0217 might be 1.0286x faster access-nsieve 4.5555+-0.0956 4.5441+-0.0965 bitops-3bit-bits-in-byte 2.0670+-0.0231 ? 2.0887+-0.0301 ? might be 1.0105x slower bitops-bits-in-byte 4.6337+-0.0569 ? 4.6437+-0.0498 ? bitops-bitwise-and 2.9302+-0.3089 2.7927+-0.0409 might be 1.0492x faster bitops-nsieve-bits 4.0482+-0.0157 ? 4.0976+-0.1261 ? might be 1.0122x slower controlflow-recursive 2.8971+-0.0903 ? 2.9312+-0.0260 ? might be 1.0118x slower crypto-aes 5.9521+-0.0994 ? 6.0031+-0.1951 ? crypto-md5 3.6882+-0.2026 3.4843+-0.0635 might be 1.0585x faster crypto-sha1 3.3398+-0.1591 3.2673+-0.0356 might be 1.0222x faster date-format-tofte 11.9284+-0.1458 ! 12.3507+-0.1520 ! definitely 1.0354x slower date-format-xparb 7.4581+-0.0176 ? 7.5389+-0.1689 ? might be 1.0108x slower math-cordic 4.0256+-0.0378 ? 4.0315+-0.0362 ? math-partial-sums 7.1322+-0.1289 ? 7.2974+-0.6951 ? might be 1.0232x slower math-spectral-norm 2.5975+-0.0612 ? 2.6194+-0.0497 ? regexp-dna 9.3436+-0.1062 ? 9.3508+-0.2601 ? string-base64 6.0971+-0.0545 ? 6.2052+-0.0926 ? might be 1.0177x slower string-fasta 8.4609+-0.2305 ? 8.4733+-0.1045 ? string-tagcloud 11.9033+-0.1199 ? 12.1213+-0.2689 ? might be 1.0183x slower string-unpack-code 27.6075+-0.2129 ^ 26.8402+-0.2409 ^ definitely 1.0286x faster string-validate-input 6.2998+-0.0648 ? 6.5498+-0.4903 ? might be 1.0397x slower <arithmetic> 6.7109+-0.0356 ? 6.7112+-0.0442 ? might be 1.0000x slower r184563 LazyNode LongSpider: 3d-cube 1161.9515+-5.3153 ? 1162.6110+-6.7421 ? 3d-morph 2081.8644+-2.2101 ? 2083.4186+-2.5086 ? 3d-raytrace 964.9550+-2.9916 ? 966.9846+-2.1139 ? access-binary-trees 1202.8700+-8.3168 1197.4823+-4.8449 access-fannkuch 444.1959+-12.2446 442.2732+-6.5401 access-nbody 841.8930+-0.8430 841.6598+-0.7912 access-nsieve 554.6010+-3.1358 554.0694+-4.2611 bitops-3bit-bits-in-byte 62.2255+-0.5060 ? 62.5452+-0.7317 ? bitops-bits-in-byte 124.4947+-2.0777 122.8069+-2.2689 might be 1.0137x faster bitops-nsieve-bits 589.4498+-1.1096 ? 591.8050+-1.8722 ? controlflow-recursive 656.6624+-9.4780 648.2872+-9.5573 might be 1.0129x faster crypto-aes 895.3399+-4.6306 890.9220+-4.1307 crypto-md5 705.8483+-9.2472 ? 712.1329+-3.1710 ? crypto-sha1 829.9058+-4.3537 ? 833.7055+-5.6857 ? date-format-tofte 962.5408+-9.5784 ? 982.0764+-25.9311 ? might be 1.0203x slower date-format-xparb 1017.5420+-37.9460 ? 1018.2288+-34.2323 ? hash-map 217.5200+-2.3129 217.3473+-2.1448 math-cordic 802.0189+-0.2334 ? 802.4769+-0.5320 ? math-partial-sums 688.2911+-1.1601 ? 691.0188+-4.2164 ? math-spectral-norm 765.8102+-1.3822 ? 766.3490+-1.5090 ? string-base64 479.8174+-1.4370 ? 480.4628+-0.5954 ? string-fasta 554.6161+-2.8639 ? 557.9010+-1.7465 ? string-tagcloud 267.6748+-1.6707 ? 272.0585+-4.5248 ? might be 1.0164x slower <geometric> 592.3036+-1.3539 ? 593.1580+-1.7368 ? might be 1.0014x slower r184563 LazyNode V8Spider: crypto 67.8765+-0.7304 ? 68.8577+-0.8869 ? might be 1.0145x slower deltablue 87.3304+-1.2137 ? 90.1341+-1.9642 ? might be 1.0321x slower earley-boyer 58.1275+-0.6450 ? 58.4982+-0.8771 ? raytrace 39.8321+-0.7011 ? 40.1393+-1.0207 ? regexp 105.9992+-0.4087 105.9331+-0.3641 richards 96.4194+-1.8344 95.6577+-1.8872 splay 47.5691+-1.5622 ? 48.7973+-1.3452 ? might be 1.0258x slower <geometric> 67.9211+-0.6396 ? 68.6701+-0.6668 ? might be 1.0110x slower r184563 LazyNode Octane: encrypt 0.30665+-0.00084 0.30644+-0.00055 decrypt 5.27116+-0.07426 ? 5.27748+-0.03298 ? deltablue x2 0.25798+-0.00107 ? 0.25878+-0.00135 ? earley 0.48901+-0.00268 0.48662+-0.00319 boyer 6.80707+-0.00748 ? 6.81116+-0.01100 ? navier-stokes x2 7.07389+-0.00782 ? 7.07641+-0.00851 ? raytrace x2 1.59878+-0.04097 1.57785+-0.05824 might be 1.0133x faster richards x2 0.15653+-0.00117 ? 0.15700+-0.00070 ? splay x2 0.48774+-0.00735 0.48608+-0.00279 regexp x2 40.25384+-0.25656 40.19403+-0.16775 pdfjs x2 55.59378+-0.29521 55.33154+-0.79303 mandreel x2 70.09515+-0.11387 ? 70.13248+-0.12331 ? gbemu x2 58.79256+-0.83158 ? 59.55201+-0.29982 ? might be 1.0129x slower closure 0.80091+-0.00106 ? 0.80345+-0.00463 ? jquery 10.26737+-0.03920 ? 10.28985+-0.02669 ? box2d x2 17.66133+-0.03012 17.63529+-0.07021 zlib x2 522.48655+-1.13172 ? 524.45776+-1.31383 ? typescript x2 1067.58480+-10.78260 1066.17354+-19.13008 <geometric> 8.74833+-0.01868 8.74749+-0.02421 might be 1.0001x faster r184563 LazyNode Kraken: ai-astar 414.812+-9.575 ? 419.428+-8.245 ? might be 1.0111x slower audio-beat-detection 140.779+-0.497 ? 141.033+-0.475 ? audio-dft 150.777+-0.943 150.622+-0.920 audio-fft 106.523+-0.222 ? 106.716+-0.309 ? audio-oscillator 98.138+-0.346 98.075+-0.247 imaging-darkroom 140.572+-0.735 ? 141.701+-2.695 ? imaging-desaturate 87.098+-0.387 86.543+-0.765 imaging-gaussian-blur 147.334+-0.249 ! 147.951+-0.356 ! definitely 1.0042x slower json-parse-financial 61.215+-0.467 60.254+-1.002 might be 1.0159x faster json-stringify-tinderbox 38.096+-0.110 ! 38.592+-0.056 ! definitely 1.0130x slower stanford-crypto-aes 76.438+-0.882 ? 77.711+-1.001 ? might be 1.0166x slower stanford-crypto-ccm 67.328+-1.769 ? 68.584+-2.385 ? might be 1.0186x slower stanford-crypto-pbkdf2 156.226+-1.359 ? 156.816+-0.813 ? stanford-crypto-sha256-iterative 60.445+-1.163 ? 60.824+-1.035 ? <arithmetic> 124.699+-0.695 ? 125.346+-0.918 ? might be 1.0052x slower r184563 LazyNode JSRegress: abs-boolean 3.4178+-0.0279 ? 3.5374+-0.2717 ? might be 1.0350x slower adapt-to-double-divide 21.6469+-0.4053 ? 21.6964+-0.3932 ? aliased-arguments-getbyval 1.6172+-0.0669 ? 1.7248+-0.1007 ? might be 1.0665x slower allocate-big-object 3.2719+-0.0663 3.2494+-0.0864 arguments-named-and-reflective 14.6400+-0.2144 ? 14.7393+-0.2878 ? arguments-out-of-bounds 19.0353+-0.1864 ? 19.0456+-0.1572 ? arguments-strict-mode 13.6656+-0.2313 ? 13.7770+-0.1621 ? arguments 11.9782+-0.2766 ? 12.0895+-0.3368 ? arity-mismatch-inlining 1.2065+-0.0369 1.1986+-0.0163 array-access-polymorphic-structure 8.2675+-0.0966 ? 8.3089+-0.3119 ? array-nonarray-polymorhpic-access 43.4279+-0.5183 43.0363+-0.8880 array-prototype-every 110.6495+-0.5640 ! 112.1020+-0.8531 ! definitely 1.0131x slower array-prototype-forEach 108.1305+-0.8717 ? 108.3259+-0.4925 ? array-prototype-map 120.0226+-0.5378 ? 120.5019+-1.4066 ? array-prototype-some 110.5890+-0.5197 ! 111.7489+-0.4914 ! definitely 1.0105x slower array-splice-contiguous 59.4387+-0.6267 ^ 55.4790+-0.6437 ^ definitely 1.0714x faster array-with-double-add 5.2653+-0.0353 ? 5.3223+-0.0315 ? might be 1.0108x slower array-with-double-increment 4.2139+-0.0511 ? 4.2969+-0.0512 ? might be 1.0197x slower array-with-double-mul-add 6.5074+-0.0562 ? 6.5231+-0.0328 ? array-with-double-sum 4.3350+-0.1536 4.2725+-0.0295 might be 1.0146x faster array-with-int32-add-sub 8.5612+-0.0292 8.5173+-0.0425 array-with-int32-or-double-sum 4.5181+-0.3556 4.3278+-0.0428 might be 1.0440x faster ArrayBuffer-DataView-alloc-large-long-lived 39.1629+-0.2546 39.1202+-0.2436 ArrayBuffer-DataView-alloc-long-lived 17.6190+-1.0137 17.0061+-0.2081 might be 1.0360x faster ArrayBuffer-Int32Array-byteOffset 5.0165+-0.0408 ? 5.0182+-0.0463 ? ArrayBuffer-Int8Array-alloc-large-long-lived 40.5541+-0.7804 40.2592+-0.3610 ArrayBuffer-Int8Array-alloc-long-lived-buffer 29.0138+-0.9899 28.1208+-1.0348 might be 1.0318x faster ArrayBuffer-Int8Array-alloc-long-lived 16.5705+-0.6558 16.0205+-0.2552 might be 1.0343x faster ArrayBuffer-Int8Array-alloc 13.5181+-0.3285 13.4212+-0.1096 asmjs_bool_bug 9.6171+-0.2766 ? 9.6233+-0.1310 ? assign-custom-setter-polymorphic 4.2500+-0.0589 ^ 4.0730+-0.0610 ^ definitely 1.0435x faster assign-custom-setter 5.8684+-0.0515 ^ 5.4482+-0.0204 ^ definitely 1.0771x faster basic-set 10.9179+-0.3142 ? 11.0135+-0.1218 ? big-int-mul 5.1318+-0.0258 ? 5.1331+-0.0331 ? boolean-test 3.9740+-0.0437 ? 4.0060+-0.0609 ? branch-fold 4.9384+-0.2293 4.8723+-0.0739 might be 1.0136x faster branch-on-string-as-boolean 23.7963+-0.4765 23.6012+-0.1491 by-val-generic 10.1225+-0.2097 10.0118+-0.2062 might be 1.0111x faster call-spread-apply 37.5716+-0.3900 ? 37.7244+-0.8922 ? call-spread-call 31.9985+-0.2576 ? 32.4575+-1.0779 ? might be 1.0143x slower captured-assignments 0.5986+-0.0217 ? 0.6047+-0.0297 ? might be 1.0103x slower cast-int-to-double 6.6938+-0.0223 ? 6.7228+-0.0185 ? cell-argument 10.8730+-0.3684 10.7869+-0.2780 cfg-simplify 3.6572+-0.0939 ? 3.6809+-0.0799 ? chain-getter-access 11.6818+-0.1714 ? 11.7829+-0.0982 ? cmpeq-obj-to-obj-other 11.7673+-0.0503 ! 12.3144+-0.0685 ! definitely 1.0465x slower constant-test 6.3400+-0.0250 ? 6.3532+-0.0502 ? create-lots-of-functions 13.7738+-0.3406 ? 14.1885+-0.5074 ? might be 1.0301x slower DataView-custom-properties 45.6550+-0.2679 ? 46.3944+-0.8113 ? might be 1.0162x slower deconstructing-parameters-overridden-by-function 0.7536+-0.0403 0.7484+-0.0392 delay-tear-off-arguments-strictmode 17.4132+-0.0640 ! 17.9818+-0.2241 ! definitely 1.0326x slower deltablue-varargs 264.9302+-1.1502 ! 270.0520+-1.4848 ! definitely 1.0193x slower destructuring-arguments 21.9332+-0.3271 21.5148+-0.2426 might be 1.0194x faster destructuring-swap 6.5934+-0.2931 6.5222+-0.0837 might be 1.0109x faster direct-arguments-getbyval 1.6501+-0.0638 ? 1.7028+-0.0456 ? might be 1.0319x slower div-boolean-double 6.6481+-0.0117 ? 6.6491+-0.0207 ? div-boolean 9.9985+-0.0152 9.9870+-0.0189 double-get-by-val-out-of-bounds 5.6305+-0.1244 ^ 5.4458+-0.0412 ^ definitely 1.0339x faster double-pollution-getbyval 11.3972+-0.0211 ? 11.4085+-0.0468 ? double-pollution-putbyoffset 5.4288+-0.0413 5.4013+-0.0539 double-to-int32-typed-array-no-inline 2.8802+-0.0498 ? 2.8831+-0.0441 ? double-to-int32-typed-array 2.5276+-0.0247 ? 2.5642+-0.0462 ? might be 1.0145x slower double-to-uint32-typed-array-no-inline 2.9792+-0.0403 ? 2.9823+-0.0659 ? double-to-uint32-typed-array 2.6029+-0.0345 ? 2.6449+-0.0430 ? might be 1.0161x slower elidable-new-object-dag 51.7945+-0.4311 51.0295+-0.8366 might be 1.0150x faster elidable-new-object-roflcopter 53.3695+-0.7798 ? 53.4487+-0.3928 ? elidable-new-object-then-call 47.9443+-0.9412 47.3486+-0.2105 might be 1.0126x faster elidable-new-object-tree 53.8595+-0.6631 ? 54.2602+-0.7897 ? empty-string-plus-int 6.8983+-0.0860 6.7976+-0.0758 might be 1.0148x faster emscripten-cube2hash 48.6697+-0.3178 ? 48.7420+-0.4111 ? exit-length-on-plain-object 17.4682+-0.4347 17.3930+-0.2001 external-arguments-getbyval 1.6447+-0.0552 ? 1.6790+-0.1082 ? might be 1.0209x slower external-arguments-putbyval 3.0164+-0.0602 2.9827+-0.0718 might be 1.0113x faster fixed-typed-array-storage-var-index 1.7178+-0.1120 1.6611+-0.0184 might be 1.0341x faster fixed-typed-array-storage 1.2415+-0.0281 1.2140+-0.0573 might be 1.0226x faster Float32Array-matrix-mult 5.9869+-0.4005 5.8672+-0.1292 might be 1.0204x faster Float32Array-to-Float64Array-set 70.4899+-1.4393 ! 75.2247+-1.0956 ! definitely 1.0672x slower Float64Array-alloc-long-lived 82.9788+-1.0723 81.8792+-0.7423 might be 1.0134x faster Float64Array-to-Int16Array-set 91.2767+-1.0088 91.0976+-0.6499 fold-double-to-int 18.3979+-0.0628 ? 18.5338+-0.2156 ? fold-get-by-id-to-multi-get-by-offset-rare-int 10.0481+-0.2092 ? 10.2639+-0.3981 ? might be 1.0215x slower fold-get-by-id-to-multi-get-by-offset 8.9539+-0.5169 8.5924+-0.1266 might be 1.0421x faster fold-multi-get-by-offset-to-get-by-offset 8.4019+-0.9509 ? 8.7550+-0.1309 ? might be 1.0420x slower fold-multi-get-by-offset-to-poly-get-by-offset 7.9935+-0.5052 ? 8.4701+-0.5009 ? might be 1.0596x slower fold-multi-put-by-offset-to-poly-put-by-offset 7.8555+-0.0826 ? 7.9129+-0.1025 ? fold-multi-put-by-offset-to-put-by-offset 5.9308+-0.5261 5.7355+-0.6792 might be 1.0341x faster fold-multi-put-by-offset-to-replace-or-transition-put-by-offset 13.3002+-1.4170 12.7639+-1.1112 might be 1.0420x faster fold-put-by-id-to-multi-put-by-offset 8.4982+-0.4101 ? 8.5559+-0.4887 ? fold-put-structure 5.7272+-1.4124 5.1464+-0.0285 might be 1.1129x faster for-of-iterate-array-entries 5.7653+-0.0583 ? 5.8003+-0.0443 ? for-of-iterate-array-keys 4.7262+-0.1600 4.6809+-0.0607 for-of-iterate-array-values 4.6523+-0.0512 4.6431+-0.0562 fround 26.2901+-0.4636 26.0082+-0.2678 might be 1.0108x faster ftl-library-inlining-dataview 87.1365+-0.2125 ? 89.8865+-3.2682 ? might be 1.0316x slower ftl-library-inlining 97.0782+-23.4284 88.4270+-1.3689 might be 1.0978x faster function-dot-apply 2.8178+-0.0647 2.7952+-0.0374 function-test 3.6933+-0.0828 3.6639+-0.0328 function-with-eval 129.5402+-0.8796 129.5074+-1.4474 gcse-poly-get-less-obvious 25.8741+-3.3631 ? 26.5553+-4.0886 ? might be 1.0263x slower gcse-poly-get 28.2900+-6.5771 ? 35.7469+-5.3485 ? might be 1.2636x slower gcse 5.5909+-0.0234 ! 5.6370+-0.0222 ! definitely 1.0083x slower get-by-id-bimorphic-check-structure-elimination-simple 3.5170+-0.0666 ? 3.5438+-0.0453 ? get-by-id-bimorphic-check-structure-elimination 7.8767+-0.0637 ? 7.9238+-0.1796 ? get-by-id-chain-from-try-block 8.6834+-0.0768 8.6726+-0.0197 get-by-id-check-structure-elimination 6.7995+-0.2554 ? 6.9347+-0.4786 ? might be 1.0199x slower get-by-id-proto-or-self 24.5545+-2.4540 ? 26.3953+-3.1151 ? might be 1.0750x slower get-by-id-quadmorphic-check-structure-elimination-simple 3.7854+-0.0367 ? 3.8003+-0.0138 ? get-by-id-self-or-proto 24.8542+-2.2763 23.9414+-0.7254 might be 1.0381x faster get-by-val-out-of-bounds 5.5529+-0.1133 5.4740+-0.2117 might be 1.0144x faster get_callee_monomorphic 3.2838+-0.1014 3.2363+-0.0850 might be 1.0147x faster get_callee_polymorphic 4.5261+-0.0545 ? 4.5706+-0.0716 ? getter-no-activation 6.1568+-0.0387 6.1322+-0.0218 getter-richards 120.8604+-2.2347 120.0249+-0.3281 getter 7.1800+-0.5884 6.8560+-0.0321 might be 1.0473x faster global-var-const-infer-fire-from-opt 1.3258+-0.1359 1.3117+-0.1331 might be 1.0107x faster global-var-const-infer 1.1547+-0.1180 ? 1.2270+-0.2305 ? might be 1.0625x slower HashMap-put-get-iterate-keys 30.2739+-0.1594 ? 30.7863+-0.4618 ? might be 1.0169x slower HashMap-put-get-iterate 29.8547+-0.2376 ? 30.0815+-0.2056 ? HashMap-string-put-get-iterate 34.1463+-0.2058 34.0638+-0.6473 hoist-make-rope 15.1246+-1.1770 15.0092+-0.9513 hoist-poly-check-structure-effectful-loop 6.4216+-0.0330 6.4071+-0.0169 hoist-poly-check-structure 4.7111+-0.0594 ? 4.7195+-0.0432 ? imul-double-only 9.6722+-0.5216 ? 10.0003+-0.2220 ? might be 1.0339x slower imul-int-only 12.0585+-0.4237 ? 12.3975+-0.0971 ? might be 1.0281x slower imul-mixed 9.9933+-0.0642 9.8108+-0.4585 might be 1.0186x faster in-four-cases 28.2149+-0.1655 28.1479+-0.2717 in-one-case-false 14.1362+-0.1318 14.0555+-0.0266 in-one-case-true 14.0441+-0.0474 ? 14.1278+-0.1765 ? in-two-cases 15.0060+-0.3169 14.8589+-0.0297 indexed-properties-in-objects 3.6694+-0.0286 ! 3.7391+-0.0266 ! definitely 1.0190x slower infer-closure-const-then-mov-no-inline 5.0638+-0.0615 ? 5.1212+-0.0635 ? might be 1.0113x slower infer-closure-const-then-mov 25.7027+-0.3471 ^ 24.8832+-0.2222 ^ definitely 1.0329x faster infer-closure-const-then-put-to-scope-no-inline 15.8173+-0.0569 15.7753+-0.0493 infer-closure-const-then-put-to-scope 28.7289+-1.0830 ? 29.5537+-1.1649 ? might be 1.0287x slower infer-closure-const-then-reenter-no-inline 76.2496+-0.7295 76.0774+-0.1945 infer-closure-const-then-reenter 28.9155+-0.9337 ? 29.1068+-1.0114 ? infer-constant-global-property 4.5920+-0.0431 4.5469+-0.0237 infer-constant-property 3.5194+-0.0433 3.4964+-0.0312 infer-one-time-closure-ten-vars 15.7497+-0.1616 ? 15.8020+-0.1837 ? infer-one-time-closure-two-vars 15.1790+-0.1230 15.1663+-0.0882 infer-one-time-closure 15.1734+-0.1440 15.1131+-0.1264 infer-one-time-deep-closure 26.8579+-0.0954 ? 26.8690+-0.2206 ? inline-arguments-access 5.2370+-0.1311 ? 5.2684+-0.1310 ? inline-arguments-aliased-access 5.1921+-0.0856 ? 5.2430+-0.1705 ? inline-arguments-local-escape 5.2244+-0.0961 ? 5.4329+-0.2107 ? might be 1.0399x slower inline-get-scoped-var 6.0309+-0.0896 ? 6.0719+-0.0395 ? inlined-put-by-id-transition 13.9208+-0.4716 ? 14.0368+-0.7257 ? int-or-other-abs-then-get-by-val 6.2753+-0.0273 ? 6.2992+-0.0335 ? int-or-other-abs-zero-then-get-by-val 23.1145+-0.2727 ^ 22.7577+-0.0463 ^ definitely 1.0157x faster int-or-other-add-then-get-by-val 5.4733+-0.0547 ? 5.4962+-0.0420 ? int-or-other-add 6.7928+-0.0189 ? 7.0024+-0.2975 ? might be 1.0309x slower int-or-other-div-then-get-by-val 5.4895+-0.1899 5.4341+-0.0605 might be 1.0102x faster int-or-other-max-then-get-by-val 5.4958+-0.0647 5.4895+-0.0276 int-or-other-min-then-get-by-val 5.6053+-0.0377 ? 5.6692+-0.0448 ? might be 1.0114x slower int-or-other-mod-then-get-by-val 5.1174+-0.0382 ? 5.1525+-0.0462 ? int-or-other-mul-then-get-by-val 5.0467+-0.1059 5.0227+-0.1783 int-or-other-neg-then-get-by-val 6.0785+-0.0301 ? 6.0852+-0.0253 ? int-or-other-neg-zero-then-get-by-val 23.3896+-0.6033 22.6015+-0.1930 might be 1.0349x faster int-or-other-sub-then-get-by-val 5.5179+-0.0301 ? 5.5251+-0.0637 ? int-or-other-sub 4.5503+-0.0433 ? 4.5719+-0.0243 ? int-overflow-local 5.6782+-0.1892 5.6104+-0.0279 might be 1.0121x faster Int16Array-alloc-long-lived 59.0301+-1.0045 ? 59.4024+-0.8445 ? Int16Array-bubble-sort-with-byteLength 25.6048+-0.7099 25.2126+-0.1811 might be 1.0156x faster Int16Array-bubble-sort 25.5755+-0.1764 25.3767+-0.1771 Int16Array-load-int-mul 1.9828+-0.0154 ? 2.0617+-0.1315 ? might be 1.0398x slower Int16Array-to-Int32Array-set 68.7907+-0.1517 ! 75.7459+-1.2658 ! definitely 1.1011x slower Int32Array-alloc-large 23.5767+-0.4530 ? 24.1181+-0.8341 ? might be 1.0230x slower Int32Array-alloc-long-lived 64.8066+-0.6461 ? 64.9242+-0.6426 ? Int32Array-alloc 3.4151+-0.0537 ? 3.4602+-0.1573 ? might be 1.0132x slower Int32Array-Int8Array-view-alloc 8.3676+-0.1697 ? 8.4189+-0.2327 ? int52-spill 7.4385+-0.0853 7.4311+-0.1925 Int8Array-alloc-long-lived 53.4456+-0.8696 53.3463+-0.6025 Int8Array-load-with-byteLength 4.3680+-0.0827 4.3403+-0.0246 Int8Array-load 4.4198+-0.1686 4.3525+-0.0388 might be 1.0155x faster integer-divide 14.9135+-0.6684 14.6649+-0.0424 might be 1.0170x faster integer-modulo 2.8712+-0.1059 2.7336+-0.0562 might be 1.0503x faster is-boolean-fold-tricky 5.8630+-0.1173 5.8021+-0.0635 might be 1.0105x faster is-boolean-fold 3.6954+-0.0714 3.6677+-0.0551 is-function-fold-tricky-internal-function 15.5893+-0.3050 ? 15.7194+-0.3219 ? is-function-fold-tricky 5.9832+-0.0872 5.8883+-0.0406 might be 1.0161x faster is-function-fold 3.7282+-0.0266 ^ 3.6650+-0.0359 ^ definitely 1.0173x faster is-number-fold-tricky 5.8249+-0.1447 5.7584+-0.0539 might be 1.0115x faster is-number-fold 3.7428+-0.1638 3.6689+-0.1149 might be 1.0202x faster is-object-or-null-fold-functions 3.8141+-0.0429 3.7410+-0.0437 might be 1.0196x faster is-object-or-null-fold-less-tricky 5.9461+-0.0724 5.8573+-0.0380 might be 1.0152x faster is-object-or-null-fold-tricky 8.4096+-0.0225 ? 8.4177+-0.0248 ? is-object-or-null-fold 3.7435+-0.0288 ^ 3.6603+-0.0227 ^ definitely 1.0227x faster is-object-or-null-trickier-function 6.0979+-0.1338 6.0652+-0.1052 is-object-or-null-trickier-internal-function 16.6398+-0.6198 16.2546+-0.0873 might be 1.0237x faster is-object-or-null-tricky-function 6.0118+-0.0813 5.9920+-0.0880 is-object-or-null-tricky-internal-function 12.2428+-0.0748 ^ 11.9421+-0.2017 ^ definitely 1.0252x faster is-string-fold-tricky 5.8442+-0.2663 5.7467+-0.0280 might be 1.0170x faster is-string-fold 3.6916+-0.0318 ? 3.7028+-0.2215 ? is-undefined-fold-tricky 4.8013+-0.0510 ? 4.8030+-0.0398 ? is-undefined-fold 3.6965+-0.0397 3.6498+-0.0430 might be 1.0128x faster large-int-captured 5.5909+-0.0471 5.5649+-0.0707 large-int-neg 21.2419+-0.1875 ? 21.3685+-0.2174 ? large-int 19.8191+-0.2484 19.6876+-0.3349 load-varargs-elimination 31.9802+-0.3401 31.8584+-0.4870 logical-not 5.9165+-0.0641 ? 5.9223+-0.0802 ? lots-of-fields 15.8314+-0.1370 ! 16.1685+-0.1085 ! definitely 1.0213x slower make-indexed-storage 3.8553+-0.2698 ? 3.9745+-0.0554 ? might be 1.0309x slower make-rope-cse 5.0179+-0.1236 ? 5.0393+-0.0899 ? marsaglia-larger-ints 52.3082+-0.3089 52.2228+-0.1798 marsaglia-osr-entry 29.3654+-0.1835 ? 29.7000+-0.8300 ? might be 1.0114x slower max-boolean 3.1656+-0.0124 ? 3.2528+-0.0822 ? might be 1.0275x slower method-on-number 23.8441+-0.7261 ? 29.5600+-19.3139 ? might be 1.2397x slower min-boolean 3.1944+-0.0445 ? 3.2141+-0.0470 ? minus-boolean-double 4.0841+-0.0142 ? 4.1081+-0.0303 ? minus-boolean 3.0257+-0.0339 3.0178+-0.0291 misc-strict-eq 53.6580+-4.9015 51.4336+-0.9950 might be 1.0432x faster mod-boolean-double 14.4269+-0.5363 14.2465+-0.2487 might be 1.0127x faster mod-boolean 10.0630+-0.0553 10.0528+-0.0246 mul-boolean-double 4.7902+-0.0266 ? 4.7937+-0.0269 ? mul-boolean 3.7470+-0.0954 3.7119+-0.0168 neg-boolean 4.0959+-0.0279 ? 4.1199+-0.0395 ? negative-zero-divide 0.4989+-0.0231 ? 0.5018+-0.0188 ? negative-zero-modulo 0.4793+-0.0185 ? 0.5010+-0.0215 ? might be 1.0452x slower negative-zero-negate 0.4690+-0.0230 ? 0.4806+-0.0114 ? might be 1.0247x slower nested-function-parsing 48.5363+-0.8706 48.0498+-0.5974 might be 1.0101x faster new-array-buffer-dead 124.3710+-0.1684 ? 125.0990+-0.5950 ? new-array-buffer-push 8.1161+-0.1503 ? 8.1548+-0.2097 ? new-array-dead 22.8233+-0.4152 ? 22.9662+-0.6616 ? new-array-push 4.7162+-0.1538 4.6766+-0.1641 no-inline-constructor 48.6538+-0.3996 ? 48.8577+-0.8361 ? number-test 3.9536+-0.0534 3.9505+-0.0458 object-closure-call 7.1565+-0.0257 7.1205+-0.0533 object-test 3.5977+-0.0422 ! 3.7401+-0.0157 ! definitely 1.0396x slower obvious-sink-pathology-taken 151.9638+-1.0300 ? 154.8279+-4.3800 ? might be 1.0188x slower obvious-sink-pathology 142.6272+-0.5292 ? 144.0563+-1.5477 ? might be 1.0100x slower obviously-elidable-new-object 42.4400+-0.5864 41.8339+-0.5698 might be 1.0145x faster plus-boolean-arith 3.2177+-0.0265 ? 3.2719+-0.0381 ? might be 1.0168x slower plus-boolean-double 4.1126+-0.0272 ? 4.1251+-0.0261 ? plus-boolean 3.0875+-0.0165 ? 3.0990+-0.0382 ? poly-chain-access-different-prototypes-simple 4.2643+-0.0111 4.2527+-0.0170 poly-chain-access-different-prototypes 3.3171+-0.0342 ? 3.3288+-0.0271 ? poly-chain-access-simpler 4.2353+-0.0301 ? 4.2480+-0.0185 ? poly-chain-access 3.3326+-0.0186 ? 3.4162+-0.1794 ? might be 1.0251x slower poly-stricteq 76.9017+-0.0738 ! 78.3192+-0.6174 ! definitely 1.0184x slower polymorphic-array-call 1.8665+-0.1237 1.8300+-0.0965 might be 1.0200x faster polymorphic-get-by-id 3.9993+-0.0441 ? 4.0067+-0.0818 ? polymorphic-put-by-id 42.2686+-2.1068 ? 42.5972+-0.7743 ? polymorphic-structure 19.5071+-0.0344 ? 19.5299+-0.0413 ? polyvariant-monomorphic-get-by-id 10.9764+-0.0586 10.9484+-0.0590 proto-getter-access 11.5285+-0.1299 ? 11.6434+-0.0294 ? put-by-id-replace-and-transition 11.5658+-0.2340 11.3685+-0.1009 might be 1.0174x faster put-by-id-slightly-polymorphic 3.6507+-0.0368 ? 3.6757+-0.0469 ? put-by-id 15.0367+-0.2718 14.9181+-0.2791 put-by-val-direct 0.4897+-0.0287 ? 0.5253+-0.0233 ? might be 1.0729x slower put-by-val-large-index-blank-indexing-type 7.0842+-0.1612 ? 7.3259+-0.3096 ? might be 1.0341x slower put-by-val-machine-int 3.2456+-0.0671 ? 3.2548+-0.1065 ? rare-osr-exit-on-local 19.2250+-0.1799 ? 19.5282+-0.1316 ? might be 1.0158x slower register-pressure-from-osr 28.0703+-0.2190 ? 28.5490+-0.7942 ? might be 1.0171x slower setter 6.9284+-0.0479 ! 7.1263+-0.0574 ! definitely 1.0286x slower simple-activation-demo 33.2515+-0.3400 33.1623+-0.1814 simple-getter-access 15.1386+-0.0500 ? 15.2144+-0.1706 ? simple-poly-call-nested 10.2329+-0.0240 10.2185+-0.0500 simple-poly-call 1.7954+-0.0517 1.7457+-0.0313 might be 1.0285x faster sin-boolean 24.4171+-0.3621 ? 24.5527+-0.1897 ? singleton-scope 83.1360+-0.1327 ? 83.3712+-0.6863 ? sink-function 14.7224+-1.0895 14.4497+-0.2967 might be 1.0189x faster sink-huge-activation 23.5628+-0.5642 ? 23.9941+-1.2615 ? might be 1.0183x slower sinkable-new-object-dag 85.6666+-0.5387 ? 85.7819+-1.1813 ? sinkable-new-object-taken 65.4674+-3.3556 64.6522+-0.7701 might be 1.0126x faster sinkable-new-object 46.8706+-0.3939 46.5918+-0.5245 slow-array-profile-convergence 3.8215+-0.0632 3.7788+-0.0631 might be 1.0113x faster slow-convergence 3.6740+-0.0344 3.6560+-0.0898 slow-ternaries 24.0927+-0.6661 ? 24.9206+-2.7180 ? might be 1.0344x slower sorting-benchmark 25.5977+-0.1672 ? 25.9930+-0.7025 ? might be 1.0154x slower sparse-conditional 1.5655+-0.0174 ? 1.5793+-0.0466 ? splice-to-remove 21.2351+-0.2544 ? 21.5823+-0.4665 ? might be 1.0163x slower string-char-code-at 20.9056+-0.6758 20.6612+-0.1069 might be 1.0118x faster string-concat-object 2.8643+-0.0574 ? 2.9178+-0.0936 ? might be 1.0187x slower string-concat-pair-object 2.9680+-0.2600 2.8417+-0.0716 might be 1.0444x faster string-concat-pair-simple 14.8753+-1.5929 14.1702+-0.8769 might be 1.0498x faster string-concat-simple 15.1978+-0.6104 14.5433+-0.3324 might be 1.0450x faster string-cons-repeat 9.4634+-0.0607 9.4489+-0.1208 string-cons-tower 9.6431+-0.2438 9.6029+-0.1410 string-equality 24.8175+-0.1529 24.7917+-0.0961 string-get-by-val-big-char 8.9915+-0.0458 ? 9.0610+-0.0577 ? string-get-by-val-out-of-bounds-insane 4.6376+-0.0336 ? 4.6907+-0.1995 ? might be 1.0114x slower string-get-by-val-out-of-bounds 6.8300+-0.0506 6.7903+-0.0451 string-get-by-val 4.2278+-0.0359 ! 4.4092+-0.0259 ! definitely 1.0429x slower string-hash 2.6456+-0.0222 ? 2.6840+-0.0655 ? might be 1.0145x slower string-long-ident-equality 20.5313+-0.6145 20.1960+-0.0782 might be 1.0166x faster string-out-of-bounds 18.9816+-0.2019 ? 19.0207+-0.1226 ? string-repeat-arith 41.7592+-0.5986 41.6182+-1.3396 string-sub 83.8815+-0.4874 83.4780+-1.0426 string-test 3.7260+-0.0431 ? 3.8098+-0.0454 ? might be 1.0225x slower string-var-equality 43.7410+-1.1444 43.4773+-0.2341 structure-hoist-over-transitions 3.3305+-0.0805 3.3282+-0.0532 substring-concat-weird 51.4589+-0.9806 50.9591+-0.9928 substring-concat 55.2887+-0.8885 55.1915+-1.1150 substring 60.2952+-0.8172 59.4897+-0.7374 might be 1.0135x faster switch-char-constant 3.4941+-0.0307 3.4648+-0.0238 switch-char 7.8262+-0.0982 7.7703+-0.0378 switch-constant 10.4458+-0.5210 10.2229+-0.2969 might be 1.0218x faster switch-string-basic-big-var 24.3027+-0.7929 ? 24.7189+-0.3592 ? might be 1.0171x slower switch-string-basic-big 22.5632+-0.5683 ? 22.6308+-0.2703 ? switch-string-basic-var 19.8407+-0.0696 ? 20.0023+-0.2554 ? switch-string-basic 18.5839+-0.1781 18.5380+-0.1688 switch-string-big-length-tower-var 26.2974+-0.1940 ? 26.3628+-0.2166 ? switch-string-length-tower-var 19.9970+-0.0897 ? 20.0816+-0.1668 ? switch-string-length-tower 16.9006+-0.2831 16.8457+-0.1869 switch-string-short 16.8516+-0.2119 16.7914+-0.0555 switch 15.8186+-0.2731 15.7939+-0.3511 tear-off-arguments-simple 4.1812+-0.1039 4.1437+-0.0709 tear-off-arguments 5.6383+-0.0441 ? 5.6606+-0.1382 ? temporal-structure 15.9070+-0.0901 ? 16.1375+-0.6706 ? might be 1.0145x slower to-int32-boolean 18.1982+-0.6467 17.9156+-0.0249 might be 1.0158x faster try-catch-get-by-val-cloned-arguments 18.1180+-0.2620 ? 18.1214+-0.7159 ? try-catch-get-by-val-direct-arguments 8.1823+-0.2795 8.0313+-0.0540 might be 1.0188x faster try-catch-get-by-val-scoped-arguments 9.4299+-0.2001 9.4243+-0.2413 typed-array-get-set-by-val-profiling 43.7402+-0.6870 ? 43.8950+-0.2135 ? undefined-property-access 458.5068+-0.5300 458.3129+-0.4188 undefined-test 3.8577+-0.0371 ! 4.0616+-0.1455 ! definitely 1.0529x slower unprofiled-licm 28.9672+-0.1748 ? 29.3149+-0.9377 ? might be 1.0120x slower varargs-call 19.2457+-0.1442 ? 19.4087+-0.1699 ? varargs-construct-inline 34.0194+-0.2331 33.8854+-0.2765 varargs-construct 29.6324+-0.6259 29.2509+-0.1795 might be 1.0130x faster varargs-inline 11.9844+-0.0217 11.9505+-0.0418 varargs-strict-mode 13.1998+-0.0473 13.1701+-0.0610 varargs 13.1772+-0.0230 ? 13.2360+-0.0601 ? weird-inlining-const-prop 2.8369+-0.1176 ? 2.8580+-0.2380 ? <geometric> 10.6101+-0.0117 ? 10.6266+-0.0156 ? might be 1.0016x slower r184563 LazyNode AsmBench: bigfib.cpp 658.2194+-1.4846 ? 658.5655+-1.3844 ? cray.c 574.0680+-3.6023 ? 576.1148+-5.2839 ? dry.c 669.6808+-12.2099 ? 670.5153+-13.8433 ? FloatMM.c 971.5382+-2.9349 969.2887+-1.0430 gcc-loops.cpp 5673.2465+-24.8511 5670.9194+-15.3463 n-body.c 1328.1307+-1.3362 1327.5536+-1.0298 Quicksort.c 570.3781+-0.6510 ? 570.7939+-1.0796 ? stepanov_container.cpp 5053.1656+-18.1899 ? 5058.5546+-27.7210 ? Towers.c 344.6159+-0.3819 344.4612+-0.2160 <geometric> 1070.0763+-2.3627 ? 1070.4891+-3.0362 ? might be 1.0004x slower r184563 LazyNode CompressionBench: huffman 507.1145+-0.6969 ^ 502.7729+-0.4264 ^ definitely 1.0086x faster arithmetic-simple 486.0492+-0.5873 ? 486.4934+-0.4562 ? arithmetic-precise 387.1558+-2.1238 385.4702+-2.0351 arithmetic-complex-precise 400.2619+-1.8023 ? 400.4527+-2.7019 ? arithmetic-precise-order-0 509.0692+-3.8984 507.4544+-6.7713 arithmetic-precise-order-1 439.0490+-2.1414 436.5153+-1.9443 arithmetic-precise-order-2 499.4317+-6.5183 498.0814+-3.1901 arithmetic-simple-order-1 564.2897+-2.3613 ? 565.0197+-1.5785 ? arithmetic-simple-order-2 629.2296+-1.5402 ? 630.1444+-2.5457 ? lz-string 410.4956+-4.0380 408.2559+-1.7101 <geometric> 477.8970+-1.2422 476.6577+-0.3988 might be 1.0026x faster r184563 LazyNode Geomean of preferred means: <scaled-result> 79.5143+-0.1350 ? 79.6821+-0.1878 ? might be 1.0021x slower Attachment 253562 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp:112: Place brace on its own line for function definitions. [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp:236: Place brace on its own line for function definitions. [whitespace/braces] [4]
Total errors found: 2 in 14 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Looks like EWS is super unhappy:
/Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp:164:17: error: conversion from 'JSC::DFG::LazyNode' to 'bool' is ambiguous
if (location.index() && !location.index().isNode())
^~~~~~~~~~~~~~~~
(In reply to comment #8) > Looks like EWS is super unhappy: > > /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp:164:17: > error: conversion from 'JSC::DFG::LazyNode' to 'bool' is ambiguous > if (location.index() && !location.index().isNode()) > ^~~~~~~~~~~~~~~~ Hmm, this is weird. There are two conversion-to-pointer operators in LazyNode: explicit operator Node*() const and operator UnspecifiedBoolType*() const and EWS complains that it doesn't know which one to use: /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGLazyNode.h:140:14: note: candidate function explicit operator Node*() const { return asNode(); } ^ /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGLazyNode.h:150:5: note: candidate function operator UnspecifiedBoolType*() const ^ The conversion-to-Node* operator is explicit, and thus should be an error in C++03, and not a candidate for the implicit cast in C++11. Weird that it works on my machine, and that some builders didn't complain. I will remove the operator Node* in favor of the asNode() method, but I still find this strange. (In reply to comment #9) > (In reply to comment #8) > > Looks like EWS is super unhappy: > > > > /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp:164:17: > > error: conversion from 'JSC::DFG::LazyNode' to 'bool' is ambiguous > > if (location.index() && !location.index().isNode()) > > ^~~~~~~~~~~~~~~~ > > Hmm, this is weird. There are two conversion-to-pointer operators in > LazyNode: > > explicit operator Node*() const > > and > > operator UnspecifiedBoolType*() const > > and EWS complains that it doesn't know which one to use: > > /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGLazyNode.h:140:14: > note: candidate function > explicit operator Node*() const { return asNode(); } > ^ > /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGLazyNode.h:150:5: > note: candidate function > operator UnspecifiedBoolType*() const > ^ > > The conversion-to-Node* operator is explicit, and thus should be an error in > C++03, and not a candidate for the implicit cast in C++11. Weird that it > works on my machine, and that some builders didn't complain. > I will remove the operator Node* in favor of the asNode() method, but I > still find this strange. Actually, I can just make the operator Node* implicit. Created attachment 253589 [details]
Patch
Attachment 253589 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp:112: Place brace on its own line for function definitions. [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp:236: Place brace on its own line for function definitions. [whitespace/braces] [4]
Total errors found: 2 in 14 files
If any of these errors are false positives, please file a bug against check-webkit-style.
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #8) > > > Looks like EWS is super unhappy: > > > > > > /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGCSEPhase.cpp:164:17: > > > error: conversion from 'JSC::DFG::LazyNode' to 'bool' is ambiguous > > > if (location.index() && !location.index().isNode()) > > > ^~~~~~~~~~~~~~~~ > > > > Hmm, this is weird. There are two conversion-to-pointer operators in > > LazyNode: > > > > explicit operator Node*() const > > > > and > > > > operator UnspecifiedBoolType*() const > > > > and EWS complains that it doesn't know which one to use: > > > > /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGLazyNode.h:140:14: > > note: candidate function > > explicit operator Node*() const { return asNode(); } > > ^ > > /Volumes/Data/EWS/WebKit/Source/JavaScriptCore/dfg/DFGLazyNode.h:150:5: > > note: candidate function > > operator UnspecifiedBoolType*() const > > ^ > > > > The conversion-to-Node* operator is explicit, and thus should be an error in > > C++03, and not a candidate for the implicit cast in C++11. Weird that it > > works on my machine, and that some builders didn't complain. > > I will remove the operator Node* in favor of the asNode() method, but I > > still find this strange. > > Actually, I can just make the operator Node* implicit. After thinking about it more, I didn't like the idea of an ASSERT()'ing implicit conversion operator. Comment on attachment 253589 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=253589&action=review Can you add some microbenchmarks in LayoutTests/js/regress/script-tests that demonstrate when this is profitable? You could also make these tests exercise both forms of def() in NewArrayBuffer. For tests like these we like to make them exhibit absurdly good performance with the optimization enabled and absurdly bad with it disabled. For example you might be able to do something like: function foo() { var array = [1.5]; return Math.cos(Math.sqrt(Math.abs(Math.sin(array[0]) * 5 /4.5))) % 3.5; // super expensive expression that folds away if we know that array[0] is a constant. } noInline(foo); all foo a lot of times; > Source/JavaScriptCore/dfg/DFGGraph.cpp:1214 > + if (UNLIKELY(value.isUInt32())) I wouldn't use UNLIKELY here. I think that constants are often non-negative integers. (In reply to comment #14) > Comment on attachment 253589 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=253589&action=review > > Can you add some microbenchmarks in LayoutTests/js/regress/script-tests that > demonstrate when this is profitable? You could also make these tests > exercise both forms of def() in NewArrayBuffer. For tests like these we > like to make them exhibit absurdly good performance with the optimization > enabled and absurdly bad with it disabled. For example you might be able to > do something like: > > function foo() { > var array = [1.5]; > return Math.cos(Math.sqrt(Math.abs(Math.sin(array[0]) * 5 /4.5))) % 3.5; > // super expensive expression that folds away if we know that array[0] is a > constant. > } > > noInline(foo); > > all foo a lot of times; I have added the following two benchmarks in js-regress: <<<<< cse-new-array-buffer.js function foo() { var array = [1.5]; return Math.cos(Math.sqrt(Math.abs(Math.sin(array[0]) * 5 / 4.5))) % 3.5; } for (var i = 0; i < 100000; ++i) foo(); >>>>> <<<<< cse-new-array.js function foo(p) { var array = [1.5, p]; return Math.cos(Math.sqrt(Math.abs(Math.sin(array[0]) * 5 / 4.5))) % 3.5; } for (var i = 0; i < 100000; ++i) foo(0); >>>>> r184563 LazyNode cse-new-array-buffer 12.0633+-0.5264 ^ 2.8377+-0.0725 ^ definitely 4.2511x faster cse-new-array 12.0446+-0.1058 ^ 2.9589+-0.1008 ^ definitely 4.0706x faster <geometric> 12.0514+-0.2410 ^ 2.8972+-0.0602 ^ definitely 4.1597x faster > > > Source/JavaScriptCore/dfg/DFGGraph.cpp:1214 > > + if (UNLIKELY(value.isUInt32())) > > I wouldn't use UNLIKELY here. I think that constants are often non-negative > integers. Removed. (In reply to comment #15) > (In reply to comment #14) > > Comment on attachment 253589 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=253589&action=review > > > > Can you add some microbenchmarks in LayoutTests/js/regress/script-tests that > > demonstrate when this is profitable? You could also make these tests > > exercise both forms of def() in NewArrayBuffer. For tests like these we > > like to make them exhibit absurdly good performance with the optimization > > enabled and absurdly bad with it disabled. For example you might be able to > > do something like: > > > > function foo() { > > var array = [1.5]; > > return Math.cos(Math.sqrt(Math.abs(Math.sin(array[0]) * 5 /4.5))) % 3.5; > > // super expensive expression that folds away if we know that array[0] is a > > constant. > > } > > > > noInline(foo); > > > > all foo a lot of times; > > > I have added the following two benchmarks in js-regress: > > <<<<< cse-new-array-buffer.js > function foo() { > var array = [1.5]; > return Math.cos(Math.sqrt(Math.abs(Math.sin(array[0]) * 5 / 4.5))) % 3.5; > } > > for (var i = 0; i < 100000; ++i) > foo(); > >>>>> > > <<<<< cse-new-array.js > function foo(p) { > var array = [1.5, p]; > return Math.cos(Math.sqrt(Math.abs(Math.sin(array[0]) * 5 / 4.5))) % 3.5; > } > > for (var i = 0; i < 100000; ++i) > foo(0); > >>>>> > > r184563 LazyNode > > > cse-new-array-buffer 12.0633+-0.5264 ^ 2.8377+-0.0725 > ^ definitely 4.2511x faster > cse-new-array 12.0446+-0.1058 ^ 2.9589+-0.1008 > ^ definitely 4.0706x faster > > <geometric> 12.0514+-0.2410 ^ 2.8972+-0.0602 > ^ definitely 4.1597x faster Nice! > > > > > > Source/JavaScriptCore/dfg/DFGGraph.cpp:1214 > > > + if (UNLIKELY(value.isUInt32())) > > > > I wouldn't use UNLIKELY here. I think that constants are often non-negative > > integers. > > Removed. Created attachment 253593 [details]
Patch for landing
Attachment 253593 [details] did not pass style-queue:
ERROR: Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp:112: Place brace on its own line for function definitions. [whitespace/braces] [4]
ERROR: Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp:236: Place brace on its own line for function definitions. [whitespace/braces] [4]
Total errors found: 2 in 17 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 253593 [details] Patch for landing Clearing flags on attachment: 253593 Committed r184776: <http://trac.webkit.org/changeset/184776> All reviewed patches have been landed. Closing bug. |