Skip to content

Conversation

@sandreenko
Copy link
Contributor

Move GetLclOffs offset method to GenTreeLclVarCommon to simplify blocks that are asking working both with Fields and Vars.

If I understood correctly it is what was proposed in #39424 (review)

@sandreenko sandreenko added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 20, 2020
@sandreenko sandreenko changed the title Move GetLclOffs offset method to GenTreeLclVarCommon. Move GetLclOffs method to GenTreeLclVarCommon. Jul 20, 2020
@sandreenko sandreenko force-pushed the moveGetLclOffsetToCommon branch from 54ca1e5 to 5e47c5a Compare July 21, 2020 05:50
@sandreenko sandreenko force-pushed the moveGetLclOffsetToCommon branch from 5e47c5a to 503a792 Compare July 21, 2020 08:56
@sandreenko
Copy link
Contributor Author

PTAL @AndyAyersMS @CarolEidt @dotnet/jit-contrib

This is a refactoring PR for #39424 (review)

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

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

Looks good, just some commenting nits.

return genRegNumFromMask(tempRegMask);
}

uint16_t GenTreeLclVarCommon::GetLclOffs() const
Copy link
Member

Choose a reason for hiding this comment

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

Header comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.


// Need an addtional integer register to extract upper 4 bytes from data.
regNumber tmpReg = treeNode->GetSingleTempReg();
regNumber tmpReg = lclVar->GetSingleTempReg();
Copy link
Member

Choose a reason for hiding this comment

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

Can you fix the typo in the line above? addtional -> additional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@sandreenko sandreenko merged commit fd1cff8 into dotnet:master Jul 22, 2020
@sandreenko sandreenko deleted the moveGetLclOffsetToCommon branch July 22, 2020 09:02
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
* Move `GetLclOffs` to `Common`.

* Start using it.

* Review response.
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
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