Skip to content

JIT: support dead block elimination for EH handlers #82335

@BruceForstall

Description

@BruceForstall

fgRemoveDeadBlocks() removes unreachable code by starting from a set of initial blocks and walking control-flow paths until all reachable blocks are marked, then removing any unmarked blocks.

However, this will not remove any EH handlers (finally/fault/catch/filter/filter-handler) even if the associated try is not reachable.

Change the logic to only add the EH handler entries corresponding to a try to the reachable set once a reachable try body is found.

This will also require ensuring the related EH table entry is removed if necessary.

Metadata

Metadata

Assignees

No one assigned

    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