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

Fix interpreter_exec.jl test #53218

Merged
merged 6 commits into from
Feb 10, 2024
Merged

Fix interpreter_exec.jl test #53218

merged 6 commits into from
Feb 10, 2024

Conversation

Keno
Copy link
Member

@Keno Keno commented Feb 6, 2024

This test was supposed to check that we correctly handled PhiNodes in uninferred code in both the interpreter and the compiler. However, the compiler path wasn't actually exercised, because the inferred=true part of this forced it to be skipped. Drop that and fix the exposed issues in the compiler where we didn't handle PhiNodes properly.

base/compiler/abstractinterpretation.jl Outdated Show resolved Hide resolved
@vtjnash vtjnash added compiler:inference Type inference backport 1.10 Change should be backported to the 1.10 release labels Feb 6, 2024
test/compiler/interpreter_exec.jl Show resolved Hide resolved
Comment on lines 441 to 445
function find_ssavalue_uses!(e::PhiNode, uses::Vector{BitSet}, line::Int)
values = e.values
for i = 1:length(values)
isassigned(values) || continue
val = values[i]
Copy link
Member

Choose a reason for hiding this comment

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

Implemented a fix for the segmentation fault occurring in test/compiler/ssair.jl.

aviatesk added a commit that referenced this pull request Feb 8, 2024
This commit refines `interpreter_exec.jl` further, on top of #53218.
In detail, by using `Base.Experimental.@compiler_options compile=min`,
it's now possible to mimic the effect of `julia --compile=[min|yes]`.
This commit is leveraging it and includes `interpreter_exec.jl` from
`test/compiler/ssair.jl`, allowing us to get better stack traces and
test summaries.

In addition, I've introduced several tests concerning the `src.inferred`
values and have relocated the tests from #47066 within
`interpreter_exec.jl` to `test/compiler/irpasses.jl`, since it is
related to Julia-level compilation and not to interpreter execution.
aviatesk added a commit that referenced this pull request Feb 8, 2024
This commit refines `interpreter_exec.jl` further, on top of #53218.
In detail, by using `Base.Experimental.@compiler_options compile=min`,
it's now possible to mimic the effect of `julia --compile=[min|yes]`.
This commit is leveraging it and includes `interpreter_exec.jl` from
`test/compiler/ssair.jl`, allowing us to get better stack traces and
test summaries.

In addition, I've introduced several tests concerning the `src.inferred`
values and have relocated the tests from #47066 within
`interpreter_exec.jl` to `test/compiler/irpasses.jl`, since it is
related to Julia-level compilation and not to interpreter execution.
base/compiler/utilities.jl Outdated Show resolved Hide resolved
Keno and others added 4 commits February 9, 2024 09:44
This test was supposed to check that we correctly handled PhiNodes in uninferred
code in both the interpreter and the compiler. However, the compiler path wasn't
actually exercised, because the `inferred=true` part of this forced it to be skipped.
Drop that and fix the exposed issues in the compiler where we didn't handle PhiNodes
properly.
aviatesk added a commit that referenced this pull request Feb 9, 2024
This commit refines `interpreter_exec.jl` further, on top of #53218.
In detail, by using `Base.Experimental.@compiler_options compile=min`,
it's now possible to mimic the effect of `julia --compile=[min|yes]`.
This commit is leveraging it and includes `interpreter_exec.jl` from
`test/compiler/ssair.jl`, allowing us to get better stack traces and
test summaries.

In addition, I've introduced several tests concerning the `src.inferred`
values and have relocated the tests from #47066 within
`interpreter_exec.jl` to `test/compiler/irpasses.jl`, since it is
related to Julia-level compilation and not to interpreter execution.
aviatesk and others added 2 commits February 9, 2024 11:02
This commit refines `interpreter_exec.jl` further, on top of #53218. In
detail, by using `Base.Experimental.@compiler_options compile=min`, it's
now possible to mimic the effect of `julia --compile=[min|yes]`. This
commit is leveraging it and includes `interpreter_exec.jl` from
`test/compiler/ssair.jl`, allowing us to get better stack traces and
test summaries.

In addition, I've introduced several tests concerning the `src.inferred`
values and have relocated the tests from #47066 within
`interpreter_exec.jl` to `test/compiler/irpasses.jl`, since it is
related to Julia-level compilation and not to interpreter execution.
@Keno Keno merged commit 35768c2 into master Feb 10, 2024
4 of 7 checks passed
@Keno Keno deleted the kf/interpexectest branch February 10, 2024 17:41
@KristofferC KristofferC mentioned this pull request Feb 20, 2024
19 tasks
KristofferC added a commit that referenced this pull request Feb 27, 2024
Backported PRs:
- [x] #53205 <!-- Profile: add notes to `print()` docs -->
- [x] #53170 <!-- Remove outdated discussion about externally changing
module bindings -->
- [x] #53228 <!-- SubArray: avoid invalid elimination of singleton
indices -->
- [x] #51361 <!-- code_warntype docs: more neutral reference to
@code_warntype -->
- [x] #50480 <!-- Document --heap-size-hint in Command-line Interface
-->
- [x] #53301 <!-- Fix typo in `Sys.total_memory` docstring. -->
- [x] #53354 <!-- fix code coverage bug in tail position and `else` -->
- [x] #53388 <!-- Fix documentation: thread pool of main thread -->
- [x] #53429 <!-- Subtype: skip slow-path in `local_∀_∃_subtype` if
inputs contain no ∃ typevar. -->
- [x] #53437 <!-- Add debug variant of loader_trampolines.o -->

Need manual backport:
- [ ] #52505 <!-- fix alignment of emit_unbox_store copy -->
- [ ] #53373 <!-- fix sysimage-native-code=no option with pkgimages -->
- [ ] #53439 <!-- staticdata: fix assert from partially disabled native
code -->

Contains multiple commits, manual intervention needed:
- [ ] #52913 <!-- Added docstring for Artifacts.jl -->
- [ ] #53218 <!-- Fix interpreter_exec.jl test -->

Non-merged PRs with backport label:
- [ ] #53424 <!-- yet more atomics & cache-line fixes on work-stealing
queue -->
- [ ] #53125 <!-- coverage: count coverage where explicitly requested by
inference only -->
- [ ] #52694 <!-- Reinstate similar for AbstractQ for backward
compatibility -->
- [ ] #51479 <!-- prevent code loading from lookin in the versioned
environment when building Julia -->
@KristofferC KristofferC mentioned this pull request Mar 12, 2024
25 tasks
@KristofferC KristofferC mentioned this pull request May 8, 2024
23 tasks
KristofferC added a commit that referenced this pull request May 30, 2024
Backported PRs:
- [x] #54010 <!-- Overload `Base.literal_pow` for `AbstractQ` -->
- [x] #54143 <!-- Fix `make install` from tarballs -->
- [x] #54151 <!-- LinearAlgebra: Correct zero element in
`_generic_matvecmul!` for block adj/trans -->
- [x] #54233 <!-- set MAX_OS_WRITE on unix -->
- [x] #54251 <!-- fix typo in gc_mark_memory8 when chunking a large
array -->
- [x] #54363 <!-- typeintersect: fix another stack overflow caused by
circular constraints -->
- [x] #54497 <!-- Make TestLogger thread-safe (introduce a lock) -->
- [x] #53796 <!-- Add a missing doc -->
- [x] #54465 <!-- typeintersect: conservative typevar subtitution during
`finish_unionall` -->
- [x] #54514 <!-- typeintersect: followup cleanup for the nothrow path
of type instantiation -->

Need manual backport:
- [ ] #52505 <!-- fix alignment of emit_unbox_store copy -->
- [ ] #53373 <!-- fix sysimage-native-code=no option with pkgimages -->
- [ ] #53815 <!-- create phantom task for GC threads -->
- [ ] #53984 <!-- Profile: fix heap snapshot is valid char check -->
- [ ] #54276 <!-- Fix solve for complex `Hermitian` with non-vanishing
imaginary part on diagonal -->

Contains multiple commits, manual intervention needed:
- [ ] #52854 <!-- Change to streaming out the heap snapshot data -->
- [ ] #53218 <!-- Fix interpreter_exec.jl test -->
- [ ] #53833 <!-- Profile: make heap snapshots viewable in vscode viewer
-->
- [ ] #54303 <!-- LinearAlgebra: improve type-inference in
Symmetric/Hermitian matmul -->
- [ ] #52694 <!-- Reinstate similar for AbstractQ for backward
compatibility -->

Non-merged PRs with backport label:
- [ ] #54471 <!-- Actually setup jit targets when compiling
packageimages instead of targeting only one -->
- [ ] #53452 <!-- RFC: allow Tuple{Union{}}, returning Union{} -->
- [ ] #51479 <!-- prevent code loading from lookin in the versioned
environment when building Julia -->
@KristofferC KristofferC mentioned this pull request Jun 19, 2024
46 tasks
KristofferC added a commit that referenced this pull request Aug 13, 2024
Backported PRs:
- [x] #51351 <!-- Remove boxing in pinv -->
- [x] #52678 <!-- Profile: Improve module docstring -->
- [x] #54201 <!-- Fix generic triangular solves with empty matrices -->
- [x] #54605 <!-- Allow libquadmath to also fail as it is not available
on all systems -->
- [x] #54634 <!-- Fix trampoline assembly for build on clang 18 on apple
silicon -->
- [x] #54635 <!-- Aggressive constprop in trevc! to stabilize triangular
eigvec -->
- [x] #54645 <!-- ensure we set the right value to gc_first_tid -->
- [x] #54671 <!-- Add boundscheck in bindingkey_eq to avoid OOB access
due to data race -->
- [x] #54672 <!-- make: Fix `sed` command for LLVM libraries with no
symbol versioning -->
- [x] #54704 <!-- LazyString in reinterpretarray error messages -->
- [x] #54713 <!-- make: use `readelf` for LLVM symbol version detection
-->
- [x] #54781 <!-- [LinearAlgebra] Improve resilience to unknown
libblastrampoline flags -->
- [x] #54837 <!-- Do not add type tag size to the `alloc_typed` lowering
for GC allocations -->
- [x] #54815 <!-- add sticky task warning to `@task` and `schedule` -->
- [x] #55141 <!-- Update the aarch64 devdocs to reflect the current
state of its support -->
- [x] #55178 <!-- Compat for `Base.@nospecializeinfer` -->
- [x] #55197 <!-- compat notice for a[begin] indexing -->
- [x] #55209 <!-- correction to compat notice for a[begin] -->
- [x] #55203 <!-- document mutable struct const fields -->
- [x] #54769 <!-- add missing compat entry to edit -->
- [x] #54791 <!-- Bump libblastrampoline to v5.10.1 -->
- [x] #55070 <!-- LinearAlgebra: LazyString in error messages for
Diagonal/Bidiagonal -->
- [x] #54624 <!-- more precise aliasing checks for SubArray -->
- [x] #54690 <!-- Fix assertion/crash when optimizing function with dead
basic block -->
- [x] #55084 <!-- Use triple quotes in TOML.print when string contains
newline -->


Need manual backport:
- [ ] #52505 <!-- fix alignment of emit_unbox_store copy -->
- [ ] #53373 <!-- fix sysimage-native-code=no option with pkgimages -->
- [ ] #53984 <!-- Profile: fix heap snapshot is valid char check -->
- [ ] #54276 <!-- Fix solve for complex `Hermitian` with non-vanishing
imaginary part on diagonal -->
- [ ] #54669 <!-- Improve error message in inplace transpose -->
- [ ] #54871 <!-- Make warn missed transformations pass optional -->

Contains multiple commits, manual intervention needed:
- [ ] #52854 <!-- Change to streaming out the heap snapshot data -->
- [ ] #53218 <!-- Fix interpreter_exec.jl test -->
- [ ] #53833 <!-- Profile: make heap snapshots viewable in vscode viewer
-->
- [ ] #54303 <!-- LinearAlgebra: improve type-inference in
Symmetric/Hermitian matmul -->
- [ ] #52694 <!-- Reinstate similar for AbstractQ for backward
compatibility -->
- [ ] #54737 <!-- LazyString in interpolated error messages involving
types -->
- [ ] #54738 <!-- serialization: fix relocatability bug -->
- [ ] #55052 <!-- Fix `(l/r)mul!` with `Diagonal`/`Bidiagonal` -->

Non-merged PRs with backport label:
- [ ] #55220 <!-- `isfile_casesensitive` fixes on Windows -->
- [ ] #55169 <!-- `propertynames` for SVD respects private argument -->
- [ ] #55013 <!-- [docs] change docstring to match code -->
- [ ] #51479 <!-- prevent code loading from lookin in the versioned
environment when building Julia -->
- [ ] #50813 <!-- More doctests for Sockets and capitalization fix -->
- [ ] #50157 <!-- improve docs for `@inbounds` and
`Base.@propagate_inbounds` -->
- [ ] #41244 <!-- Fix shell `cd` error when working dir has been deleted
-->
@KristofferC KristofferC mentioned this pull request Sep 12, 2024
63 tasks
@KristofferC KristofferC removed the backport 1.10 Change should be backported to the 1.10 release label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:inference Type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants