Skip to content

Commit

Permalink
JIT format
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed Mar 15, 2024
1 parent f3356ad commit 36611a4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/coreclr/jit/codegencommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2278,9 +2278,9 @@ void CodeGen::genReportEH()
{
if (compiler->UsesCallfinallyThunks())
{
printf(
"%d EH table entries, %d duplicate clauses, %d cloned finallys, %d total EH entries reported to VM\n",
compiler->compHndBBtabCount, duplicateClauseCount, clonedFinallyCount, EHCount);
printf("%d EH table entries, %d duplicate clauses, %d cloned finallys, %d total EH entries reported to "
"VM\n",
compiler->compHndBBtabCount, duplicateClauseCount, clonedFinallyCount, EHCount);
assert(compiler->compHndBBtabCount + duplicateClauseCount + clonedFinallyCount == EHCount);
}
else
Expand Down Expand Up @@ -2639,7 +2639,7 @@ void CodeGen::genReportEH()
} // for each block

assert(clonedFinallyCount == reportedClonedFinallyCount);
} // if (clonedFinallyCount > 0)
} // if (clonedFinallyCount > 0)

assert(XTnum == EHCount);
}
Expand Down
5 changes: 3 additions & 2 deletions src/coreclr/jit/fgehopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ PhaseStatus Compiler::fgRemoveEmptyTry()
BasicBlock* const lastTryBlock = HBtab->ebdTryLast;
BasicBlock* const firstHandlerBlock = HBtab->ebdHndBeg;
BasicBlock* const lastHandlerBlock = HBtab->ebdHndLast;
BasicBlock* callFinally;
BasicBlock* callFinally;

assert(firstTryBlock->getTryIndex() == XTnum);

Expand Down Expand Up @@ -401,7 +401,8 @@ PhaseStatus Compiler::fgRemoveEmptyTry()
// Try must be a callalways pair of blocks.
if (!firstTryBlock->NextIs(lastTryBlock))
{
JITDUMP("EH#%u block " FMT_BB " not last block in try; skipping.\n", XTnum, firstTryBlock->Next()->bbNum);
JITDUMP("EH#%u block " FMT_BB " not last block in try; skipping.\n", XTnum,
firstTryBlock->Next()->bbNum);
XTnum++;
continue;
}
Expand Down
10 changes: 6 additions & 4 deletions src/coreclr/jit/importer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4872,10 +4872,12 @@ void Compiler::impImportLeave(BasicBlock* block)

if (UsesCallfinallyThunks())
{
callFinallyTryIndex =
(HBtab->ebdEnclosingTryIndex == EHblkDsc::NO_ENCLOSING_INDEX) ? 0 : HBtab->ebdEnclosingTryIndex + 1;
callFinallyHndIndex =
(HBtab->ebdEnclosingHndIndex == EHblkDsc::NO_ENCLOSING_INDEX) ? 0 : HBtab->ebdEnclosingHndIndex + 1;
callFinallyTryIndex = (HBtab->ebdEnclosingTryIndex == EHblkDsc::NO_ENCLOSING_INDEX)
? 0
: HBtab->ebdEnclosingTryIndex + 1;
callFinallyHndIndex = (HBtab->ebdEnclosingHndIndex == EHblkDsc::NO_ENCLOSING_INDEX)
? 0
: HBtab->ebdEnclosingHndIndex + 1;
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/jit/jiteh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -952,9 +952,9 @@ void Compiler::ehGetCallFinallyBlockRange(unsigned finallyIndex, BasicBlock** st
}
else
{
EHblkDsc* ehDsc = ehGetDsc(finallyIndex);
*startBlock = ehDsc->ebdTryBeg;
*lastBlock = ehDsc->ebdTryLast;
EHblkDsc* ehDsc = ehGetDsc(finallyIndex);
*startBlock = ehDsc->ebdTryBeg;
*lastBlock = ehDsc->ebdTryLast;
}
}

Expand Down

0 comments on commit 36611a4

Please sign in to comment.