-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JIT: clean up unused throw helpers #93948
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details#93371 deferred creation of shared throw helper blocks, but introduced more cases where throw helper blocks end up not being needed. There's a divergence between the point that the JIT "demands" the creation of a helper (via So the fix here is either to defer or reaffirm the demands, so that they better reflect actual needs, or else allow unused helper blocks to be removed later on.
|
@BruceForstall which if these do you think is most likely to work:
|
You mean, enable this for all platforms (currently it's only x86 for the throw block work) and have it do what This seems reasonable. There will obviously be a TP hit for another IR walk. (Maybe it can be short-circuited by setting some global anytime we have something that might need a throw helper, and/or setting a block flag on blocks that might need a throw helper.)
I'm a little confused by this one. Codegen can't create any new blocks, so I don't think this would work. I was thinking maybe you meant morph continues calling
placeholder IGs are a huge pain that we should avoid adding more of. ==== |
I meant to write: codegen would call At any rate I'll look into generalizing the stack level setter. |
Various optimizations can happen between the time the throw helper blocks are first requested (morph) and finally used (codegen). Prune away ones that aren't needed during the stack level setter. Fixes dotnet#93948.
Various optimizations can happen between the time the throw helper blocks are first requested (morph) and finally used (codegen). Prune away ones that aren't needed during the stack level setter. Fixes #93948.
#93371 deferred creation of shared throw helper blocks, but introduced more cases where throw helper blocks end up not being needed.
There's a divergence between the point that the JIT "demands" the creation of a helper (via
fgAddCodeRef
) and requests the helper block, and in between the JIT may optimize away the code that needed the helper.So the fix here is either to defer or reaffirm the demands, so that they better reflect actual needs, or else allow unused helper blocks to be removed later on.
The text was updated successfully, but these errors were encountered: