Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86_64: begin rewriting instruction selection #22386

Merged
merged 25 commits into from
Jan 17, 2025

Conversation

jacobly0
Copy link
Member

@jacobly0 jacobly0 commented Jan 1, 2025

Closes #21950

@jacobly0 jacobly0 force-pushed the x86_64-rewrite branch 4 times, most recently from 78c2313 to e1dfea3 Compare January 5, 2025 08:07
@jacks0n9
Copy link

jacks0n9 commented Jan 6, 2025

comically large pr

@jacobly0 jacobly0 marked this pull request as ready for review January 17, 2025 02:21
@andrewrk
Copy link
Member

Wow, congrats!

@andrewrk andrewrk added the release notes This PR should be mentioned in the release notes. label Jan 17, 2025
Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incredible. I didn't realize just how much went into this branch until now when I reviewed it (locally of course since GitHub can't be bothered to display the diff).

The cg.select abstraction is pretty nifty.

Happy to see this land in master branch.

@andrewrk andrewrk enabled auto-merge January 17, 2025 04:32
@andrewrk andrewrk merged commit 4bace0f into ziglang:master Jan 17, 2025
10 checks passed
@andrewrk
Copy link
Member

perf data point: building hello world

Benchmark 1 (24 runs): stage3-0.14.0-dev.2802+257054a14/bin/zig build-exe ../test/standalone/simple/hello_world/hello.zig -fno-llvm -fno-lld
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           213ms ± 10.0ms     200ms …  239ms          2 ( 8%)        0%
  peak_rss            119MB ±  632KB     118MB …  120MB          0 ( 0%)        0%
  cpu_cycles         1.15G  ± 10.6M     1.14G  … 1.19G           6 (25%)        0%
  instructions       2.38G  ± 76.0K     2.38G  … 2.38G           1 ( 4%)        0%
  cache_references   75.7M  ±  740K     75.0M  … 78.3M           1 ( 4%)        0%
  cache_misses       5.80M  ± 53.9K     5.70M  … 5.94M           1 ( 4%)        0%
  branch_misses      6.82M  ± 48.3K     6.76M  … 6.95M           2 ( 8%)        0%
Benchmark 2 (25 runs): stage3-0.14.0-dev.2828+4bace0f62/bin/zig build-exe ../test/standalone/simple/hello_world/hello.zig -fno-llvm -fno-lld
  measurement          mean ± σ            min … max           outliers         delta
  wall_time           201ms ± 7.76ms     184ms …  218ms          0 ( 0%)        ⚡-  5.6% ±  2.4%
  peak_rss            120MB ±  878KB     118MB …  122MB          3 (12%)          +  0.7% ±  0.4%
  cpu_cycles         1.10G  ± 7.16M     1.09G  … 1.12G           0 ( 0%)        ⚡-  3.9% ±  0.5%
  instructions       2.24G  ±  635K     2.24G  … 2.24G           3 (12%)        ⚡-  6.0% ±  0.0%
  cache_references   80.1M  ±  220K     79.7M  … 80.5M           0 ( 0%)        💩+  5.7% ±  0.4%
  cache_misses       6.80M  ± 77.5K     6.67M  … 6.93M           0 ( 0%)        💩+ 17.3% ±  0.7%
  branch_misses      6.79M  ± 25.4K     6.74M  … 6.87M           0 ( 0%)          -  0.4% ±  0.3%

@jacobly0 jacobly0 deleted the x86_64-rewrite branch January 17, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes This PR should be mentioned in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

selfhosted x86_64: no encoding found for: none imul r8 r8 none none
3 participants