Skip to content

JIT: Remove LclVarDsc::GetArgReg and LclVarDsc::GetOtherArgReg uses#112652

Merged
jakobbotsch merged 2 commits intodotnet:mainfrom
jakobbotsch:remove-arg-reg-uses
Feb 19, 2025
Merged

JIT: Remove LclVarDsc::GetArgReg and LclVarDsc::GetOtherArgReg uses#112652
jakobbotsch merged 2 commits intodotnet:mainfrom
jakobbotsch:remove-arg-reg-uses

Conversation

@jakobbotsch
Copy link
Copy Markdown
Member

Switch these to use new ABI info.

The only uses left are in logging and in the old ABI classification happening during lvaInitUserArgs. Once we remove uses of all the information stored there we can get rid of the fields entirely.

Switch these to use new ABI info.

The only uses left are in logging and in the old ABI classification
happening during `lvaInitUserArgs`. Once we remove uses of all the
information stored there we can get rid of the fields entirely.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 18, 2025
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Comment on lines -1622 to -1627
bool isRegCandidate = compiler->compEnregStructLocals() && !varDsc->HasGCPtr();
#if defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
// The LoongArch64's ABI which the float args within a struct maybe passed by integer register
// when no float register left but free integer register.
isRegCandidate &= !genIsValidFloatReg(varDsc->GetOtherArgReg());
#endif
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dotnet/samsung @shushanhf This special case should already be handled by this code:

else if (varDsc->lvIsMultiRegArgOrRet())
{
// Prolog and return generators do not support SIMD<->general register moves.
lvaSetVarDoNotEnregister(lclNum DEBUGARG(DoNotEnregisterReason::IsStructArg));
}

Can you please confirm that this looks ok to remove?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO ok to remove

@jakobbotsch jakobbotsch marked this pull request as ready for review February 18, 2025 19:13
@jakobbotsch
Copy link
Copy Markdown
Member Author

cc @dotnet/jit-contrib PTAL @EgorBo

No diffs

@jakobbotsch jakobbotsch merged commit 0ddd0c4 into dotnet:main Feb 19, 2025
@jakobbotsch jakobbotsch deleted the remove-arg-reg-uses branch February 19, 2025 19:01
grendello pushed a commit to grendello/runtime that referenced this pull request Feb 19, 2025
…es (dotnet#112652)

Switch these to use new ABI info.

The only uses left are in logging and in the old ABI classification
happening during `lvaInitUserArgs`. Once we remove uses of all the
information stored there we can get rid of the fields entirely.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants