Skip to content

JIT: fix pred list maintenance during fgUpdateFlowGraph - #56509

Merged
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:FixFlowOptPredListIssue
Jul 29, 2021
Merged

JIT: fix pred list maintenance during fgUpdateFlowGraph#56509
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:FixFlowOptPredListIssue

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member

Handle case where a BBJ_COND block both falls through and branches to
another block, and we want to introduce a block to re-route the fall through.

Closes#56495.

Handle case where a BBJ_COND block both falls through and branches to
another block, and we want to introduce a block to re-route the fall through.
Closesdotnet#56495.
@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 29, 2021
@AndyAyersMS

Copy link
Copy Markdown
MemberAuthor

cc @dotnet/jit-contrib

no spmi asm diffs.

fgRemoveRefPred(bDestNext, bDest);
fgAddRefPred(bFixup, bDest);
fgAddRefPred(bDestNext, bFixup);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So ReplacePred should always be avoided and be replaced with a pair of RemoveRefPred + AddRefPred ?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Not necessarily, sometimes you want to replace all the references.

I find editing flow in the jit to be fairly complex in general, especially dealing with the fall through behavior. I have ideas on how to simplify this but not sure when/if we'll get to them.

@AndyAyersMS
AndyAyersMS merged commit 705bbfd into dotnet:mainJul 29, 2021
@AndyAyersMS
AndyAyersMS deleted the FixFlowOptPredListIssue branch July 29, 2021 15:53
@ghostghost locked as resolved and limited conversation to collaborators Aug 28, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR 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.

JIT: flow opts does an incorrect pred list update

3 participants

@AndyAyersMS@EgorBo@BruceForstall