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

EAUtils: perform code_escapes with a global cache by default #56868

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

aviatesk
Copy link
Member

In #56860, EAUtils.EscapeAnalyzer was updated to create a new cache for each invocation of code_escapes, similar to how Cthulhu.jl behaves. However, code_escapes is often used for performance analysis like @benchmark code_escapes(...), and in such cases, a large number of CodeInstances can be generated for each invocation. This could potentially impact native code execution.

So this commit changes the default behavior so that code_escapes uses the same pre-existing cache by default. We can still opt-in to perform a fresh analysis by specifying
cache_token=EAUtils.EscapeAnalyzerCacheToken().

In #56860, `EAUtils.EscapeAnalyzer` was updated to create
a new cache for each invocation of `code_escapes`, similar to how
Cthulhu.jl behaves. However, `code_escapes` is often used for
performance analysis like `@benchmark code_escapes(...)`, and in such
cases, a large number of `CodeInstance`s can be generated for each
invocation. This could potentially impact native code execution.

So this commit changes the default behavior so that `code_escapes` uses
the same pre-existing cache by default. We can still opt-in to perform
a fresh analysis by specifying
`cache_token=EAUtils.EscapeAnalyzerCacheToken()`.
@aviatesk aviatesk merged commit ff97fac into master Dec 20, 2024
7 checks passed
@aviatesk aviatesk deleted the avi/EAUtils-default-cache branch December 20, 2024 06:30
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.

1 participant