JIT: Update IL offsets in fgExpandStaticInitForCall#99662
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
src/coreclr/jit/fgbasic.cpp
Outdated
| newBlock->bbCodeOffsEnd = curr->bbCodeOffsEnd; | ||
|
|
||
| IL_OFFSET splitPointILOffset = fgFindBlockILOffset(newBlock); | ||
| IL_OFFSET splitPointILOffset = fgFindBlockILOffset(newBlock); |
There was a problem hiding this comment.
Instead of doing the if (!newBlock->HasFlag(BBF_INTERNAL)) check, I was debating whether or not fgFindBlockILOffset should always return BAD_IL_OFFSET because it currently will not.
There was a problem hiding this comment.
Is this the place that caused trouble? Because the before logic seemed ok.
|
// cc @dotnet/jit-contrib @AndyAyersMS @jakobbotsch |
AndyAyersMS
left a comment
There was a problem hiding this comment.
Still not sure about this... left some notes over in #99543
src/coreclr/jit/fgbasic.cpp
Outdated
| newBlock->bbCodeOffsEnd = curr->bbCodeOffsEnd; | ||
|
|
||
| IL_OFFSET splitPointILOffset = fgFindBlockILOffset(newBlock); | ||
| IL_OFFSET splitPointILOffset = fgFindBlockILOffset(newBlock); |
There was a problem hiding this comment.
Is this the place that caused trouble? Because the before logic seemed ok.
src/coreclr/jit/fgbasic.cpp
Outdated
| BasicBlock* newBlock = fgNewBBafter(jumpKind, block, true); | ||
| newBlock->SetFlags(BBF_INTERNAL); | ||
| assert(newBlock->bbCodeOffs == BAD_IL_OFFSET); | ||
| assert(newBlock->bbCodeOffsEnd == BAD_IL_OFFSET); |
There was a problem hiding this comment.
I would actually give this the same logic as above, use fgFindBlockILOffset to figure out the proper offsets, if any.
There was a problem hiding this comment.
Should we do that for BBF_INTERNAL blocks?
Yes. If |
block->bbCodeOffsEnd to BAD_IL_OFFSET when expanding static init for calls
…block had a valid ending offset
block->bbCodeOffsEnd to BAD_IL_OFFSET when expanding static init for callsfgSplitBlockAfterStatement if the original block's ending offset was BAD_IL_OFFSET
fgSplitBlockAfterStatement if the original block's ending offset was BAD_IL_OFFSETfgExpandStaticInitForCall
Will resolve #99543
See comment for more details.