Skip to content

LLVM: lower optional types as byref=true #12164

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

Merged
merged 4 commits into from
Jul 19, 2022
Merged

LLVM: lower optional types as byref=true #12164

merged 4 commits into from
Jul 19, 2022

Conversation

andrewrk
Copy link
Member

This is a possible workaround for
llvm/llvm-project#56585

On my computer it makes stage3-release go from false positive
compilation errors on the behavior tests to "segmentation fault".
Is this forwards progress or backwards progress? I have no idea.

See #11450

@andrewrk
Copy link
Member Author

[nix-shell:~/dev/zig/build-release]$ hyperfine 'stage1/bin/zig build -Dskip-install-lib-files' 'stage2-release/bin/zig build -Dskip-install-lib-files' 'stage3-release/bin/zig build -Dskip-install-lib-files' 'stage3-bootstrap/bin/zig build -Dskip-install-lib-files' 'stage3-release-byref/bin/zig build -Dskip-install-lib-files' --warmup 2 -p 'rm -rf ../zig-cache ../zig-out'
Benchmark 1: stage1/bin/zig build -Dskip-install-lib-files
  Time (mean ± σ):     53.505 s ±  0.540 s    [User: 52.904 s, System: 2.726 s]
  Range (min … max):   52.793 s … 54.576 s    10 runs
 
Benchmark 2: stage2-release/bin/zig build -Dskip-install-lib-files
  Time (mean ± σ):     43.236 s ±  0.448 s    [User: 42.592 s, System: 1.041 s]
  Range (min … max):   42.667 s … 44.200 s    10 runs
 
Benchmark 3: stage3-release/bin/zig build -Dskip-install-lib-files
  Time (mean ± σ):     43.526 s ±  0.683 s    [User: 42.918 s, System: 1.028 s]
  Range (min … max):   42.826 s … 45.384 s    10 runs
 
  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
 
Benchmark 4: stage3-bootstrap/bin/zig build -Dskip-install-lib-files
  Time (mean ± σ):     45.934 s ±  0.717 s    [User: 43.644 s, System: 2.686 s]
  Range (min … max):   45.212 s … 47.513 s    10 runs
 
Benchmark 5: stage3-release-byref/bin/zig build -Dskip-install-lib-files
  Time (mean ± σ):     35.169 s ±  0.346 s    [User: 34.548 s, System: 1.045 s]
  Range (min … max):   34.793 s … 35.919 s    10 runs
 
Summary
  'stage3-release-byref/bin/zig build -Dskip-install-lib-files' ran
    1.23 ± 0.02 times faster than 'stage2-release/bin/zig build -Dskip-install-lib-files'
    1.24 ± 0.02 times faster than 'stage3-release/bin/zig build -Dskip-install-lib-files'
    1.31 ± 0.02 times faster than 'stage3-bootstrap/bin/zig build -Dskip-install-lib-files'
    1.52 ± 0.02 times faster than 'stage1/bin/zig build -Dskip-install-lib-files'

stage3-release-byref is this branch + #12145

andrewrk added 4 commits July 19, 2022 11:22
This is a possible workaround for
llvm/llvm-project#56585

On my computer it makes stage3-release go from false positive
compilation errors on the behavior tests to "segmentation fault".
Is this forwards progress or backwards progress? I have no idea.

See #11450
Same reasoning as previous commit.
Same reasoning as previous commit.
This branch originally started out as a potential workaround to
address #11450. It did not solve that problem, however, it did end
up fixing #11498!
@andrewrk
Copy link
Member Author

This branch originally started out as a potential workaround to address #11450. It did not solve that problem, however, it did end up fixing #11498!

@andrewrk andrewrk merged commit 6fab6c3 into master Jul 19, 2022
@andrewrk andrewrk deleted the llvm-opt-byref branch July 19, 2022 18:50
@erikarvstedt
Copy link
Contributor

Did this solve a cause of bloat that was unique to stage 2?
Or one that was common to both stage 1 and 2, so that more potential for de-bloating stage 2 binaries remains?

@andrewrk
Copy link
Member Author

Did this solve a cause of bloat that was unique to stage 2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants