Skip to content

Eliminate duplicate EH clauses in JIT #114891

@filipnavara

Description

@filipnavara

The duplicate EH clauses are no longer used by any runtime. CoreCLR stopped using them with new exception handling, and the legacy EH has been removed. NativeAOT never used them. We should just stop emitting them altogether.

// Duplicate clauses are not used by NativeAOT ABI
if (compiler->UsesFunclets() && !isNativeAOT)
{
for (XTnum = 0; XTnum < compiler->compHndBBtabCount; XTnum++)
{
for (enclosingTryIndex = compiler->ehTrueEnclosingTryIndex(XTnum); // find the true enclosing try index,
// ignoring 'mutual protect' trys
enclosingTryIndex != EHblkDsc::NO_ENCLOSING_INDEX;
enclosingTryIndex = compiler->ehGetEnclosingTryIndex(enclosingTryIndex))
{
++duplicateClauseCount;
}
}
EHCount += duplicateClauseCount;
}

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions