Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Move edge likelihood initialization to fgLinkBasicBlocks #99100

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

amanasifkhalid
Copy link
Member

After #98993, the logic for initializing edge likelihoods in fgAddRefPred can potentially read uninitialized memory by calling BasicBlock::NumSucc. Avoid this by moving the edge likelihood logic to fgLinkBasicBlocks, where we can safely and cheaply determine the number of successors. Also, rename AssertionInfo::m_isNextEdgeAssertion based on feedback from #98993.

@ghost ghost assigned amanasifkhalid Feb 29, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 29, 2024
@ghost
Copy link

ghost commented Feb 29, 2024

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

Issue Details

After #98993, the logic for initializing edge likelihoods in fgAddRefPred can potentially read uninitialized memory by calling BasicBlock::NumSucc. Avoid this by moving the edge likelihood logic to fgLinkBasicBlocks, where we can safely and cheaply determine the number of successors. Also, rename AssertionInfo::m_isNextEdgeAssertion based on feedback from #98993.

Author: amanasifkhalid
Assignees: amanasifkhalid
Labels:

area-CodeGen-coreclr

Milestone: -

@amanasifkhalid
Copy link
Member Author

cc @dotnet/jit-contrib, @AndyAyersMS PTAL

@amanasifkhalid
Copy link
Member Author

Failure is #98817.

@amanasifkhalid amanasifkhalid merged commit f75c972 into dotnet:main Feb 29, 2024
126 of 129 checks passed
@amanasifkhalid amanasifkhalid deleted the init-likelihoods branch February 29, 2024 15:55
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2024
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