-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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: Expand GT_RETURN condition to GT_JTRUE #65370
Comments
Tagging subscribers to this area: @JulieLeeMSFT Issue Details1.
|
Author: | EgorBo |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
Related: #8363. |
1. Import
return cond;
asreturn cond ? true : false
Expand expressions like
to
Early in the importer/morph so we can then properly merge returns, apply branch-to-cmov (or optOptimizeBool) kinds of optimizations. It's a sort of canonization, we then should convert it back to
return cmp
or even optimize tocmov/csel
if necessary. It will allow us to forget about various? true : false
hacks in the codebase.2. Duplicate returns for
return GT_RET_EXPR
currently, when we inline a method under GT_RETURN node, e.g.:
We end up with 4
jmp
instructions (while 2 would be enough) in the codegen ofFoo
:because we end up spilling
Bar
into a temp during inlining while we should just insert it as is and remove parentGT_RETURN
Expected codegen:
just two jumps. If epilogues are big or too many of them a separate phase should merge them.
category:implementation
theme:ir
The text was updated successfully, but these errors were encountered: