Skip to content

Conversation

@BruceForstall
Copy link
Contributor

The NumSucc/GetSucc/Succs iterators have two variants. It is hard to understand the distinction. The goal of this change is to reduce the differences, so the only difference is the SWITCH case (iterating either all successors or only unique successors).

So:

  1. BBJ_EHFILTERRET: always return the single successor, which is the first block of the filter handler.
  2. BBJ_EHFINALLYRET: Move to standard successor iterator

@ghost ghost assigned BruceForstall Oct 13, 2023
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Oct 13, 2023
@ghost
Copy link

ghost commented Oct 13, 2023

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

The NumSucc/GetSucc/Succs iterators have two variants. It is hard to understand the distinction. The goal of this change is to reduce the differences, so the only difference is the SWITCH case (iterating either all successors or only unique successors).

So:

  1. BBJ_EHFILTERRET: always return the single successor, which is the first block of the filter handler.
  2. BBJ_EHFINALLYRET: Move to standard successor iterator
Author: BruceForstall
Assignees: BruceForstall
Labels:

area-CodeGen-coreclr

Milestone: -

@BruceForstall
Copy link
Contributor Author

@AndyAyersMS PTAL
cc @dotnet/jit-contrib

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't figure out where the "above" was. Would be nice to avoid this special case.

Seems like we should never get into the spill clique case for filters since the exit stack will be emtpy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I can remove this from the spill clique case if you think it's unnecessary. (Just assert block is not a filterret?) I was just being defensive, since I hit an assert without this in the "normal" case.

The NumSucc/GetSucc/Succs iterators have two variants. It is hard to understand
the distinction. The goal of this change is to reduce the differences,
so the only difference is the SWITCH case (iterating either all successors
or only unique successors).

So:
1. BBJ_EHFILTERRET: always return the single successor, which is the first
block of the filter handler.
2. BBJ_EHFINALLYRET: Move to standard successor iterator
@BruceForstall BruceForstall force-pushed the SimplifySuccessorIteration branch from 2ae9a3a to cf4e02b Compare October 13, 2023 16:31
@BruceForstall
Copy link
Contributor Author

@AndyAyersMS updated

@BruceForstall BruceForstall merged commit 3d995ec into dotnet:main Oct 13, 2023
@BruceForstall BruceForstall deleted the SimplifySuccessorIteration branch October 13, 2023 19:46
@ghost ghost locked as resolved and limited conversation to collaborators Nov 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants