File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1595,8 +1595,6 @@ void emitter::perfScoreUnhandledInstruction(instrDesc* id, insExecutionCharacter
15951595 pResult->insLatency = PERFSCORE_LATENCY_1C;
15961596}
15971597
1598- #endif // defined(DEBUG) || defined(LATE_DISASM)
1599-
16001598// ----------------------------------------------------------------------------------------
16011599// getCurrentBlockWeight: Return the block weight for the currently active block
16021600//
@@ -1618,12 +1616,19 @@ weight_t emitter::getCurrentBlockWeight()
16181616 {
16191617 return m_compiler->compCurBB ->getBBWeight (m_compiler);
16201618 }
1621- else // we have a null compCurBB
1619+ else if (emitCurIG != nullptr )
1620+ {
1621+ // Prolog or epilog case, use the weight of the head group or its extensions.
1622+ assert ((emitCurIG->igFlags & IGF_OUT_OF_ORDER_MASK) != 0 );
1623+ return emitCurIG->igWeight ;
1624+ }
1625+ else
16221626 {
1623- // prolog or epilog case, so just use the standard weight
1627+ // This is the prolog case (when we're just initializing the IG list).
16241628 return BB_UNITY_WEIGHT;
16251629 }
16261630}
1631+ #endif // defined(DEBUG) || defined(LATE_DISASM)
16271632
16281633#if defined(TARGET_LOONGARCH64)
16291634void emitter::dispIns (instrDesc* id)
You can’t perform that action at this time.
0 commit comments