fitzgen opened PR #14290 from fitzgen:seed-alias-analysis-in-rpo to bytecodealliance:main:
This visits a block's predecessors before the block itself, which minimizes the number of times we need to reprocess a block to reach the fixed point (ignoring backedges).
Here are the Sightglass results (faster on 13/26 of the PCA subset; up to 1.02x faster), plus some extra benchmarks that use 1000 different globals in order to create benchmarks with many alias regions (up to 16.27x faster).
<details>
compilation :: cycles :: Sum Total Δ = 8422617.35 ± 280685.06 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.15x to 1.16x faster than 5e00554696-baseline.dylib! ┌──────────┬──────────┬─────────────┬──────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├──────────┼──────────┼─────────────┼──────────┼─────────────────────────────┤ │ 60331062 │ 64369397 │ 61754473.07 │ 61678752 │ 5e00554696-baseline.dylib │ ├──────────┼──────────┼─────────────┼──────────┼─────────────────────────────┤ │ 51846162 │ 55688043 │ 53331855.72 │ 53253352 │ c86906f168-A-rpo-seed.dylib │ └──────────┴──────────┴─────────────┴──────────┴─────────────────────────────┘ compilation :: instructions-retired :: Sum Total Δ = 7583044017.87 ± 17783614.28 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.05x to 1.05x faster than 5e00554696-baseline.dylib! ┌──────────────┬──────────────┬─────────────────┬──────────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├──────────────┼──────────────┼─────────────────┼──────────────┼─────────────────────────────┤ │ 168815527589 │ 168999930832 │ 168907183902.21 │ 168906273009 │ 5e00554696-baseline.dylib │ ├──────────────┼──────────────┼─────────────────┼──────────────┼─────────────────────────────┤ │ 161221272391 │ 161466420307 │ 161324139884.34 │ 161323996892 │ c86906f168-A-rpo-seed.dylib │ └──────────────┴──────────────┴─────────────────┴──────────────┴─────────────────────────────┘ compilation :: instructions-retired :: globals-1000-cfg Δ = 3488395020.90 ± 330370.05 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 16.27x to 16.27x faster than 5e00554696-baseline.dylib! ┌────────────┬────────────┬───────────────┬────────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├────────────┼────────────┼───────────────┼────────────┼─────────────────────────────┤ │ 3714492504 │ 3720971964 │ 3716830864.19 │ 3716697153 │ 5e00554696-baseline.dylib │ ├────────────┼────────────┼───────────────┼────────────┼─────────────────────────────┤ │ 227560263 │ 229543940 │ 228435843.29 │ 228446605 │ c86906f168-A-rpo-seed.dylib │ └────────────┴────────────┴───────────────┴────────────┴─────────────────────────────┘ compilation :: instructions-retired :: globals-1000-loop Δ = 3676743569.51 ± 269112.72 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 14.98x to 14.99x faster than 5e00554696-baseline.dylib! ┌────────────┬────────────┬───────────────┬────────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├────────────┼────────────┼───────────────┼────────────┼─────────────────────────────┤ │ 3938271014 │ 3942494061 │ 3939646001.25 │ 3939498236 │ 5e00554696-baseline.dylib │ ├────────────┼────────────┼───────────────┼────────────┼─────────────────────────────┤ │ 262014252 │ 264993857 │ 262902431.74 │ 262817743 │ c86906f168-A-rpo-seed.dylib │ └────────────┴────────────┴───────────────┴────────────┴─────────────────────────────┘ compilation :: cycles :: globals-1000-cfg Δ = 4080711.94 ± 12420.75 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 11.78x to 11.85x faster than 5e00554696-baseline.dylib! ┌─────────┬─────────┬────────────┬─────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├─────────┼─────────┼────────────┼─────────┼─────────────────────────────┤ │ 4353068 │ 4563437 │ 4458098.75 │ 4457209 │ 5e00554696-baseline.dylib │ ├─────────┼─────────┼────────────┼─────────┼─────────────────────────────┤ │ 325067 │ 427413 │ 377386.81 │ 377755 │ c86906f168-A-rpo-seed.dylib │ └─────────┴─────────┴────────────┴─────────┴─────────────────────────────┘ compilation :: cycles :: globals-1000-loop Δ = 4104661.05 ± 14351.30 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 10.61x to 10.68x faster than 5e00554696-baseline.dylib! ┌─────────┬─────────┬────────────┬─────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├─────────┼─────────┼────────────┼─────────┼─────────────────────────────┤ │ 4397623 │ 4666018 │ 4530267.27 │ 4533174 │ 5e00554696-baseline.dylib │ ├─────────┼─────────┼────────────┼─────────┼─────────────────────────────┤ │ 370362 │ 491900 │ 425606.22 │ 428477 │ c86906f168-A-rpo-seed.dylib │ └─────────┴─────────┴────────────┴─────────┴─────────────────────────────┘ compilation :: instructions-retired :: tinygo-json Δ = 107193076.80 ± 815883.64 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.02x to 1.02x faster than 5e00554696-baseline.dylib! ┌────────────┬────────────┬───────────────┬────────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├────────────┼────────────┼───────────────┼────────────┼─────────────────────────────┤ │ 5439283619 │ 5450038733 │ 5445123463.82 │ 5445131000 │ 5e00554696-baseline.dylib │ ├────────────┼────────────┼───────────────┼────────────┼─────────────────────────────┤ │ 5332483991 │ 5345446881 │ 5337930387.02 │ 5337890931 │ c86906f168-A-rpo-seed.dylib │ └────────────┴────────────┴───────────────┴────────────┴─────────────────────────────┘ compilation :: instructions-retired :: kotlin-richards Δ = 12093387.57 ± 584630.03 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.02x to 1.02x faster than 5e00554696-baseline.dylib! ┌───────────┬───────────┬──────────────┬───────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 634797689 │ 643565242 │ 639630353.10 │ 639744730 │ 5e00554696-baseline.dylib │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 623934476 │ 631123628 │ 627536965.53 │ 627528340 │ c86906f168-A-rpo-seed.dylib │ └───────────┴───────────┴──────────────┴───────────┴─────────────────────────────┘ compilation :: instructions-retired :: meshoptimizer Δ = 2362359.47 ± 404322.82 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.01x to 1.01x faster than 5e00554696-baseline.dylib! ┌───────────┬───────────┬──────────────┬───────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 383858384 │ 390770689 │ 388053353.33 │ 388001245 │ 5e00554696-baseline.dylib │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 383261763 │ 387923421 │ 385690993.86 │ 385615471 │ c86906f168-A-rpo-seed.dylib │ └───────────┴───────────┴──────────────┴───────────┴─────────────────────────────┘ compilation :: instructions-retired :: shootout-minicsv Δ = 601519.85 ± 472227.74 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.00x to 1.01x faster than 5e00554696-baseline.dylib! ┌───────────┬───────────┬──────────────┬───────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 117035013 │ 123844363 │ 120882817.37 │ 121027989 │ 5e00554696-baseline.dylib │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 116974294 │ 123132924 │ 120281297.52 │ 120136429 │ c86906f168-A-rpo-seed.dylib │ └───────────┴───────────┴──────────────┴───────────┴─────────────────────────────┘ compilation :: instructions-retired :: quicksort Δ = 881381.59 ± 416211.85 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.00x to 1.01x faster than 5e00554696-baseline.dylib! ┌───────────┬───────────┬──────────────┬───────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 223787543 │ 229133325 │ 225969513.23 │ 225822591 │ 5e00554696-baseline.dylib │ ├───────────┼───────────┼──────────────┼───────────┼─────────────────────────────┤ │ 222127742 │ 228398304 │ 225088131.64 │ 225055771 │ c86906f168-A-rpo-seed.dylib │ └───────────┴───────────┴──────────────┴───────────┴─────────────────────────────┘ compilation :: instructions-retired :: bz2 Δ = 2312715.06 ± 480227.08 (confidence = 99%) c86906f168-A-rpo-seed.dylib is 1.00x to 1.00x faster than 5e00554696-baseline.dylib! ┌───────────┬───────────┬──────────────┬───────────┬─────────────────────────────┐ │ Min │ Max │ Mean │ Median │ Engine │ ├─── [message truncated]
fitzgen requested cfallin for a review on PR #14290.
fitzgen requested wasmtime-compiler-reviewers for a review on PR #14290.
github-actions[bot] added the label cranelift on PR #14290.
:thumbs_up: cfallin submitted PR review:
Thanks!
cfallin added PR #14290 Seed alias analysis worklist in reverse post-order to the merge queue.
:check: cfallin merged PR #14290.
cfallin removed PR #14290 Seed alias analysis worklist in reverse post-order from the merge queue.
Last updated: Sep 20 2026 at 18:08 UTC