Skip to content

Commit

Permalink
JIT: Fix debug flowgraph check for un-compacted blocks (#103904)
Browse files Browse the repository at this point in the history
  • Loading branch information
amanasifkhalid authored Jun 24, 2024
1 parent ead0d10 commit bed1751
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6223,7 +6223,7 @@ class Compiler

static fgWalkPreFn fgStress64RsltMulCB;
void fgStress64RsltMul();
void fgDebugCheckUpdate();
void fgDebugCheckUpdate(const bool doAggressiveCompaction);

void fgDebugCheckBBNumIncreasing();
void fgDebugCheckBBlist(bool checkBBNum = false, bool checkBBRefs = true);
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/jit/fgdiagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void Compiler::fgPrintEdgeWeights()

#ifdef DEBUG

void Compiler::fgDebugCheckUpdate()
void Compiler::fgDebugCheckUpdate(const bool doAggressiveCompaction)
{
if (!compStressCompile(STRESS_CHK_FLOW_UPDATE, 30))
{
Expand Down Expand Up @@ -139,7 +139,7 @@ void Compiler::fgDebugCheckUpdate()

/* no un-compacted blocks */

if (fgCanCompactBlock(block))
if (fgCanCompactBlock(block) && (doAggressiveCompaction || block->JumpsToNext()))
{
noway_assert(!"Found un-compacted blocks!");
}
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/fgopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5691,7 +5691,7 @@ bool Compiler::fgUpdateFlowGraph(bool doTailDuplication /* = false */,
fgVerifyHandlerTab();
// Make sure that the predecessor lists are accurate
fgDebugCheckBBlist();
fgDebugCheckUpdate();
fgDebugCheckUpdate(doAggressiveCompaction);
}
#endif // DEBUG

Expand Down

0 comments on commit bed1751

Please sign in to comment.