Skip to content
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: Port VN and loop hoisting to new loop representation #95589

Merged
merged 26 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
05bb910
JIT: Port loop cloning to the new loop representation
jakobbotsch Nov 28, 2023
1f115e0
Fix clang build
jakobbotsch Nov 28, 2023
e59040c
Merge branch 'main' of github.com:dotnet/runtime into loop-clone-new-…
jakobbotsch Nov 28, 2023
1893d7c
Fix after merge
jakobbotsch Nov 28, 2023
8be981e
Clean up
jakobbotsch Nov 28, 2023
d9cd213
Set redirection block weight correctly
jakobbotsch Nov 28, 2023
587a22b
Further quirking
jakobbotsch Nov 28, 2023
baaeccb
Fix a bug that crept in
jakobbotsch Nov 28, 2023
39bf71c
Final quirks
jakobbotsch Nov 28, 2023
90c9354
Merge branch 'main' of github.com:dotnet/runtime into loop-clone-new-…
jakobbotsch Nov 29, 2023
1235a0f
Actual final quirking
jakobbotsch Nov 29, 2023
228ea40
WIP
jakobbotsch Dec 3, 2023
11244e5
Merge branch 'main' of github.com:dotnet/runtime into vn-hoisting-new…
jakobbotsch Dec 3, 2023
a078d18
JIT: Port VN and loop hoisting to new loop representation
jakobbotsch Dec 4, 2023
0ea7789
Merge branch 'main' of github.com:dotnet/runtime into vn-hoisting-new…
jakobbotsch Dec 4, 2023
39e6bf5
Fix after merge
jakobbotsch Dec 4, 2023
cf8258a
Fixes after merge, compiler fixes
jakobbotsch Dec 4, 2023
8cf76cd
Merge branch 'main' of github.com:dotnet/runtime into vn-hoisting-new…
jakobbotsch Dec 5, 2023
800e446
Fix after merge
jakobbotsch Dec 5, 2023
3b813ba
Rename DFS tree members
jakobbotsch Dec 5, 2023
fb0ffea
Fix nested loop check; iterate blocks in loops directly
jakobbotsch Dec 6, 2023
f1e1c59
Recompute new loops in RecomputeLoopInfo
jakobbotsch Dec 6, 2023
dd8f1fd
Quirk some more
jakobbotsch Dec 6, 2023
864b734
Address some feedback; update "lnum"
jakobbotsch Dec 7, 2023
87f0ef8
Merge branch 'main' of github.com:dotnet/runtime into vn-hoisting-new…
jakobbotsch Dec 7, 2023
d0ba64d
Convenience edge accessor functions
jakobbotsch Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/coreclr/jit/block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1585,8 +1585,9 @@ BasicBlock* BasicBlock::New(Compiler* compiler)

block->bbNatLoopNum = BasicBlock::NOT_IN_LOOP;

block->bbPreorderNum = 0;
block->bbPostorderNum = 0;
block->bbPreorderNum = 0;
block->bbPostorderNum = 0;
block->bbNewPostorderNum = 0;

return block;
}
Expand Down
5 changes: 3 additions & 2 deletions src/coreclr/jit/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,9 @@ struct BasicBlock : private LIR::Range

void* bbSparseCountInfo; // Used early on by fgIncorporateEdgeCounts

unsigned bbPreorderNum; // the block's preorder number in the graph (1...fgMaxBBNum]
unsigned bbPostorderNum; // the block's postorder number in the graph (1...fgMaxBBNum]
unsigned bbPreorderNum; // the block's preorder number in the graph (1...fgMaxBBNum]
unsigned bbPostorderNum; // the block's postorder number in the graph (1...fgMaxBBNum]
unsigned bbNewPostorderNum; // the block's postorder number in the graph [0...postOrderCount)

IL_OFFSET bbCodeOffs; // IL offset of the beginning of the block
IL_OFFSET bbCodeOffsEnd; // IL offset past the end of the block. Thus, the [bbCodeOffs..bbCodeOffsEnd)
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5765,6 +5765,9 @@ void Compiler::RecomputeLoopInfo()
optSetBlockWeights();
// Rebuild the loop tree annotations themselves
optFindLoops();

m_dfsTree = fgComputeDfs();
optFindNewLoops();
}

/*****************************************************************************/
Expand Down
Loading
Loading