@@ -65,7 +65,6 @@ enum BBjumpKinds : BYTE
6565 BBJ_EHCATCHRET, // block ends with a leave out of a catch (only #if defined(FEATURE_EH_FUNCLETS))
6666 BBJ_THROW, // block ends with 'throw'
6767 BBJ_RETURN, // block ends with 'ret'
68- BBJ_NONE, // block flows into the next one (no jump)
6968 BBJ_ALWAYS, // block always jumps to the target
7069 BBJ_LEAVE, // block always jumps to the target, maybe out of guarded region. Only used until importing.
7170 BBJ_CALLFINALLY, // block always calls the target finally
@@ -83,7 +82,6 @@ const char* const BBjumpKindNames[] = {
8382 " BBJ_EHCATCHRET" ,
8483 " BBJ_THROW" ,
8584 " BBJ_RETURN" ,
86- " BBJ_NONE" ,
8785 " BBJ_ALWAYS" ,
8886 " BBJ_LEAVE" ,
8987 " BBJ_CALLFINALLY" ,
@@ -430,6 +428,10 @@ enum BasicBlockFlags : unsigned __int64
430428 BBF_RECURSIVE_TAILCALL = MAKE_BBFLAG (40 ), // Block has recursive tailcall that may turn into a loop
431429 BBF_NO_CSE_IN = MAKE_BBFLAG (41 ), // Block should kill off any incoming CSE
432430 BBF_CAN_ADD_PRED = MAKE_BBFLAG (42 ), // Ok to add pred edge to this block, even when "safe" edge creation disabled
431+ BBF_NONE_QUIRK = MAKE_BBFLAG (43 ), // Block was created as a BBJ_ALWAYS to the next block,
432+ // and should be treated as if it falls through.
433+ // This is just to reduce diffs from removing BBJ_NONE.
434+ // (TODO: Remove this quirk after refactoring Compiler::fgFindInsertPoint)
433435
434436 // The following are sets of flags.
435437
@@ -459,7 +461,7 @@ enum BasicBlockFlags : unsigned __int64
459461 // TODO: Should BBF_RUN_RARELY be added to BBF_SPLIT_GAINED ?
460462
461463 BBF_SPLIT_GAINED = BBF_DONT_REMOVE | BBF_HAS_JMP | BBF_BACKWARD_JUMP | BBF_HAS_IDX_LEN | BBF_HAS_MD_IDX_LEN | BBF_PROF_WEIGHT | \
462- BBF_HAS_NEWOBJ | BBF_KEEP_BBJ_ALWAYS | BBF_CLONED_FINALLY_END | BBF_HAS_NULLCHECK | BBF_HAS_HISTOGRAM_PROFILE | BBF_HAS_MDARRAYREF | BBF_NEEDS_GCPOLL,
464+ BBF_HAS_NEWOBJ | BBF_KEEP_BBJ_ALWAYS | BBF_CLONED_FINALLY_END | BBF_HAS_NULLCHECK | BBF_HAS_HISTOGRAM_PROFILE | BBF_HAS_MDARRAYREF | BBF_NEEDS_GCPOLL | BBF_NONE_QUIRK ,
463465
464466 // Flags that must be propagated to a new block if code is copied from a block to a new block. These are flags that
465467 // limit processing of a block if the code in question doesn't exist. This is conservative; we might not
@@ -599,6 +601,8 @@ struct BasicBlock : private LIR::Range
599601
600602 bool IsFirstColdBlock (Compiler* compiler) const ;
601603
604+ bool CanRemoveJumpToNext (Compiler* compiler);
605+
602606 unsigned GetJumpOffs () const
603607 {
604608 return bbJumpOffs;
@@ -729,7 +733,7 @@ struct BasicBlock : private LIR::Range
729733 unsigned dspPreds (); // Print the predecessors (bbPreds)
730734 void dspSuccs (Compiler* compiler); // Print the successors. The 'compiler' argument determines whether EH
731735 // regions are printed: see NumSucc() for details.
732- void dspJumpKind (); // Print the block jump kind (e.g., BBJ_NONE , BBJ_COND, etc.).
736+ void dspJumpKind (); // Print the block jump kind (e.g., BBJ_ALWAYS , BBJ_COND, etc.).
733737
734738 // Print a simple basic block header for various output, including a list of predecessors and successors.
735739 void dspBlockHeader (Compiler* compiler, bool showKind = true , bool showFlags = false , bool showPreds = true );
@@ -1771,12 +1775,6 @@ inline BasicBlock::BBSuccList::BBSuccList(const BasicBlock* block)
17711775 m_end = &m_succs[1 ];
17721776 break ;
17731777
1774- case BBJ_NONE:
1775- m_succs[0 ] = block->bbNext ;
1776- m_begin = &m_succs[0 ];
1777- m_end = &m_succs[1 ];
1778- break ;
1779-
17801778 case BBJ_COND:
17811779 m_succs[0 ] = block->bbNext ;
17821780 m_begin = &m_succs[0 ];
0 commit comments