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: Enable compaction of all BBJ_ALWAYS blocks #103785

Merged
merged 8 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/coreclr/jit/block.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ enum BasicBlockFlags : uint64_t
// Flags to update when two blocks are compacted

BBF_COMPACT_UPD = BBF_GC_SAFE_POINT | BBF_NEEDS_GCPOLL | BBF_HAS_JMP | BBF_HAS_IDX_LEN | BBF_HAS_MD_IDX_LEN | BBF_BACKWARD_JUMP | \
BBF_HAS_NEWOBJ | BBF_HAS_NULLCHECK | BBF_HAS_MDARRAYREF,
BBF_HAS_NEWOBJ | BBF_HAS_NULLCHECK | BBF_HAS_MDARRAYREF | BBF_LOOP_HEAD,

// Flags a block should not have had before it is split.

Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6086,9 +6086,9 @@ class Compiler

void fgPrepareCallFinallyRetForRemoval(BasicBlock* block);

bool fgCanCompactBlocks(BasicBlock* block, BasicBlock* bNext);
bool fgCanCompactBlock(BasicBlock* block);

void fgCompactBlocks(BasicBlock* block, BasicBlock* bNext DEBUGARG(bool doDebugCheck = true));
void fgCompactBlock(BasicBlock* block);

BasicBlock* fgConnectFallThrough(BasicBlock* bSrc, BasicBlock* bDst);

Expand Down Expand Up @@ -6157,7 +6157,7 @@ class Compiler

bool fgIsForwardBranch(BasicBlock* bJump, BasicBlock* bDest, BasicBlock* bSrc = nullptr);

bool fgUpdateFlowGraph(bool doTailDup = false, bool isPhase = false);
bool fgUpdateFlowGraph(bool doTailDup = false, bool isPhase = false, bool doAggressiveCompaction = true);
PhaseStatus fgUpdateFlowGraphPhase();

PhaseStatus fgDfsBlocksAndRemove();
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/fgdiagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void Compiler::fgDebugCheckUpdate()

/* no un-compacted blocks */

if (fgCanCompactBlocks(block, block->Next()))
if (fgCanCompactBlock(block))
{
noway_assert(!"Found un-compacted blocks!");
}
Expand Down
Loading