-
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 instruction sizes are mis-estimated #50054
Comments
Existing designCurrently there are 4 steps that occur in code generation and here is a rough outline of what happens:
ProposalIf we notice, step 1 has all the information needed for an instruction to be encoded. Step 3 uses this exact information to determine the encoding needed. The proposal is to combine step 1 and 3 in following manner: A1. If we see A2. After above step, we would perform step 2, just as it happens currently. Except, in this case, we would have accurate memory size from A3. Traverse A4. In A5. Forward jump addresses will be addressed, the one they are fixed today. RefactoringB1. case IF_ARD_RRD:
case IF_AWR_RRD:
case IF_ARW_RRD:
code = insCodeMR(ins);
code = AddSimdPrefixIfNeeded(ins, code, size);
regcode = (insEncodeReg345(ins, id->idReg1(), size, &code) << 8);
dst = emitOutputAM(dst, id, code | regcode);
sz = emitSizeOfInsDsc(id);
break;
IMO, we should just move such code in a separate method with appropriate name. In B2. GC update related code should just be in a separate file IMO, today it is mixed with emitter code. Data structuresC1. We could have two ways in which C2. To track GC refs, currently the |
We may want to regenerate the list of misestimated instructions. There have been a few changes/improvements in the area. |
A lot of discussion about mis-estimated instruction sizes happened in #8748.
This issue covers the problem of instruction sizes being mis-estimated, which leads to wasted allocated code space memory.
Also related: #12480
According to #8748 , mis-estimated instruction sizes include:
category:correctness
theme:intrinsics
skill-level:expert
cost:large
impact:medium
The text was updated successfully, but these errors were encountered: