Repository navigation
[mono] Always store to allocas in OP_LLVM_OUTARG_VT - #64303
Merged
Merged
Conversation
OP_LLVM_OUTARG_VT will, for some argument passing conventions, create an alloca and mirror its source SSA value into this alloca. If such an OP_LLVM_OUTARG_VT is first encountered in a basic block that does not contain the definition of the SSA value being mirrored, then sibling basic blocks (e.g. a loop body that may sometimes be skipped) can use garbage data if they also have OP_LLVM_OUTARG_VT opcodes referring to the same SSA values. This commit works around this by unconditionally storing the source OP_LLVM_OUTARG_VT value into its associated alloca. The resulting IR would be a little easier to read if we eagerly stored to an alloca mirror exactly once at each value's definition, but that would require more work to implement.
imhameed
force-pushed
the
mono-llvm-update-memory-mirror
branch
from
January 26, 2022 00:34
0b4a806 to
a36763f
Compare
vargaz
approved these changes
Jan 26, 2022
Contributor
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
OP_LLVM_OUTARG_VT will, for some argument passing conventions, create an
alloca and mirror its source SSA value into this alloca. If such an
OP_LLVM_OUTARG_VT is first encountered in a basic block that does not
contain the definition of the SSA value being mirrored, then sibling
basic blocks (e.g. a loop body that may sometimes be skipped) can use
garbage data if they also have OP_LLVM_OUTARG_VT opcodes referring to
the same SSA values.
This commit works around this by unconditionally storing the source
OP_LLVM_OUTARG_VT value into its associated alloca. The resulting IR
would be a little easier to read if we eagerly stored to an alloca
mirror exactly once at each value's definition, but that would require
more work to implement.
Fixes JIT/SIMD/VectorExp_ro/VectorExp_ro. See #64179.