Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
irinterp: don't add backedges to top-level thunks (#52916)
irinterp utilizes `store_backedges(::MethodInstance, edges)`, but it doesn't check to prevent adding backedges to top-level thunks. This is no issue in native compilation, however, it can become problematic when an external `AbstractInterpreter` that does irinterp on top-level thunks tries precompilation (this could, for instance, trigger [this assert](https://github.com/JuliaLang/julia/blob/b058146cafec8405aa07f9647642fd485ea3b5d7/src/staticdata_utils.c#L450)). This commit tries to resolve this issue by performing the top-level thunk check within `store_backedges(::MethodInstance, edges)` instead of `store_backedges(::InferenceResult, edges)`
- Loading branch information