-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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: Add explicit successor for BBJ_COND false branch #95773
Changes from 4 commits
7075361
edcd975
bdc886d
4c71330
bdcf9ea
4e94533
3855094
f630b5d
5be6ed2
a286d86
9ff966b
e632217
dcf7ce9
07ff2dd
e2ab378
92139e3
6802c17
2bddac2
32174ab
5cbd2c4
69cbbc7
a35bd40
f45a824
2e5fc28
a8f3ffd
b1de3c6
a038073
3625c39
fbd3943
ed0b149
7f1fbb7
e453580
c78e766
f445e29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2751,7 +2751,7 @@ bool BBPredsChecker::CheckJump(BasicBlock* blockPred, BasicBlock* block) | |
switch (blockPred->GetJumpKind()) | ||
{ | ||
case BBJ_COND: | ||
assert(blockPred->NextIs(block) || blockPred->HasJumpTo(block)); | ||
assert(blockPred->HasNormalJumpTo(block) || blockPred->HasJumpTo(block)); | ||
return true; | ||
|
||
case BBJ_ALWAYS: | ||
|
@@ -2957,6 +2957,13 @@ void Compiler::fgDebugCheckBBlist(bool checkBBNum /* = false */, bool checkBBRef | |
|
||
maxBBNum = max(maxBBNum, block->bbNum); | ||
|
||
// BBJ_COND's normal (false) jump target is expected to be the next block | ||
// TODO: Allow bbNormalJumpDest to diverge from bbNext | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A little tip for writing future There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for the tip; I realized this might be a better approach about halfway through... I'll update the TODOs I introduced to make them easier to Ctrl+F when I remove them in the next PR. |
||
if (block->KindIs(BBJ_COND)) | ||
{ | ||
assert(block->NextIs(block->GetNormalJumpDest())); | ||
} | ||
|
||
// Check that all the successors have the current traversal stamp. Use the 'Compiler*' version of the | ||
// iterator, but not for BBJ_SWITCH: we don't want to end up calling GetDescriptorForSwitch(), which will | ||
// dynamically create the unique switch list. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to delete this; will get rid of it in the next revision.