-
Notifications
You must be signed in to change notification settings - Fork 5.3k
JIT: Run liveness + DCE in tier0 #124060
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: Run liveness + DCE in tier0 #124060
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2828,6 +2828,55 @@ void Compiler::fgSsaLiveness() | |
| liveness.Run(); | ||
| } | ||
|
|
||
| //------------------------------------------------------------------------ | ||
| // fgSsaLiveness: Run SSA liveness. | ||
| // | ||
| void Compiler::fgTier0Liveness() | ||
| { | ||
| struct Tier0Liveness : public Liveness<Tier0Liveness> | ||
| { | ||
| enum | ||
| { | ||
| SsaLiveness = false, | ||
| ComputeMemoryLiveness = false, | ||
| IsLIR = false, | ||
| IsEarly = false, | ||
| }; | ||
|
Comment on lines
+2836
to
+2844
|
||
|
|
||
| Tier0Liveness(Compiler* comp) | ||
| : Liveness(comp) | ||
| { | ||
| } | ||
| }; | ||
|
|
||
| if (m_dfsTree == nullptr) | ||
| { | ||
| m_dfsTree = fgComputeDfs(); | ||
| } | ||
|
|
||
| Tier0Liveness liveness(this); | ||
| liveness.Run(); | ||
|
|
||
| // Rest of the compiler does not expect that we started tracking locals, so reset that state. | ||
| for (unsigned i = 0; i < lvaTrackedCount; i++) | ||
| { | ||
| lvaGetDesc(lvaTrackedToVarNum[i])->lvTracked = false; | ||
| } | ||
|
|
||
| lvaCurEpoch++; | ||
| lvaTrackedCount = 0; | ||
| lvaTrackedCountInSizeTUnits = 0; | ||
|
|
||
| for (BasicBlock* block : Blocks()) | ||
| { | ||
| block->bbLiveIn = VarSetOps::UninitVal(); | ||
| block->bbLiveOut = VarSetOps::UninitVal(); | ||
| block->bbVarUse = VarSetOps::UninitVal(); | ||
| block->bbVarDef = VarSetOps::UninitVal(); | ||
| } | ||
| fgBBVarSetsInited = false; | ||
| } | ||
|
|
||
| //------------------------------------------------------------------------ | ||
| // fgAsyncLiveness: Run async liveness. | ||
| // | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment incorrectly states "Run SSA liveness" which is a copy-paste error from the fgSsaLiveness function above. This should say something like "Run tier0 liveness" or "Run liveness for tier0 optimization" to accurately describe what this function does.