Skip to content

Conversation

@jakobbotsch
Copy link
Member

TreeLifeUpdater at most needs to flip 4 bits in two liveness sets when it is called, however before this change it uses several full width bitset operations to do this. This changes TreeLifeUpdater to do its job in a much more direct way by updating the liveness sets directly.

TreeLifeUpdater at most needs to flip 4 bits in two liveness sets when
it is called, however before this change it uses several full width
bitset operations to do this. This changes TreeLifeUpdater to do its job
in a much more direct way by updating the liveness sets directly.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 13, 2023
@ghost ghost assigned jakobbotsch Jan 13, 2023
@ghost
Copy link

ghost commented Jan 13, 2023

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

Issue Details

TreeLifeUpdater at most needs to flip 4 bits in two liveness sets when it is called, however before this change it uses several full width bitset operations to do this. This changes TreeLifeUpdater to do its job in a much more direct way by updating the liveness sets directly.

Author: jakobbotsch
Assignees: jakobbotsch
Labels:

area-CodeGen-coreclr

Milestone: -

Comment on lines +249 to +251
// TODO: Remove this condition which disallows marking
// some fields as dead even though they are dying when other
// fields are defined.
Copy link
Member Author

Choose a reason for hiding this comment

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

I will clean up these TODOs and unify some of these cases in #80501.

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @BruceForstall

No ASM diffs but around -1% throughput improvement on optimized collections.

The review might not be that easy as much of the logic was reworked and restructured. The old logic was using several temporary bit sets (varDeltaSet, stackVarDeltaSet, newLife) which necessitated full bit set operations to propagate the bits into compCurLife and the stack pointer set. This change just modifies the sets directly and does the other necessary updates inline too (e.g. opening/closing variable live ranges).

Will run some stress jobs too.

@jakobbotsch jakobbotsch marked this pull request as ready for review January 13, 2023 16:13
@jakobbotsch
Copy link
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress, runtime-coreclr gcstress0x3-gcstress0xc, runtime-coreclr jitstressregs

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@jakobbotsch
Copy link
Member Author

GC stress failures are unrelated and will be fixed by #80630.

@jakobbotsch
Copy link
Member Author

jakobbotsch commented Jan 13, 2023

I can reproduce the libraries-jitstress failure on main too so it also seems to be unrelated. Will try to bisect it and open an issue.

Edit: Opened #80632.

@jakobbotsch
Copy link
Member Author

Ping @BruceForstall

Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM. Awesome TP improvement!

@jakobbotsch jakobbotsch merged commit 47f171e into dotnet:main Jan 18, 2023
@jakobbotsch jakobbotsch deleted the streamline-TreeLifeUpdater branch January 18, 2023 19:51
mdh1418 pushed a commit to mdh1418/runtime that referenced this pull request Jan 24, 2023
TreeLifeUpdater at most needs to flip 4 bits in two liveness sets when
it is called, however before this change it uses several full width
bitset operations to do this. This changes TreeLifeUpdater to do its job
in a much more direct way by updating the liveness sets directly.
@ghost ghost locked as resolved and limited conversation to collaborators Feb 18, 2023
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.

2 participants