Repository navigation
Preserve stores across divergent loops - #14636
Closed
agourakis82 wants to merge 2 commits into
Closed
agourakis82 wants to merge 2 commits into
agourakis82 wants to merge 2 commits into
Conversation
Signed-off-by: Demetrios Agourakis <demetrios@agourakis.med.br>
Signed-off-by: Demetrios Agourakis <demetrios@agourakis.med.br>
Member
|
#14632 already fixes this and is in the merge queue, so closing this as a duplicate fix -- thanks though! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14573.
Dead-store elimination can remove a trapping store before a loop because a later store post-dominates it. If execution stays in the loop, the overwriter never executes, turning an immediate trap into a hang.
Mark the last-store state as observed on CFG edges that do not decrease DFS postorder. Every cycle contains such an edge, including irreducible cycles. This conservatively limits DSE across cycles while retaining cross-block elimination in acyclic control flow.
The regression test covers infinite loops, loops with exit edges, stores in divergent blocks, irreducible cycles, non-trapping stores, and an acyclic control case.
Validation:
The shared-memory experiment is supplementary evidence because it depends on thread scheduling. A local debug-build timing comparison measured a 2.05% increase in median end-to-end filetest time; production throughput and isolated pass cost have not been measured.
Signed-off-by: Demetrios Agourakis demetrios@agourakis.med.br<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".
Explain why this change is needed. If the details are in an issue already,
this can be brief.
Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html
Please review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.md
Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->