未验证 提交 9b647fe1 编写于 作者: A Andy Ayers 提交者: GitHub

Update logic around BB_MAX_WEIGHT (#51027)

Consider any weight greater or equal to be a max weight. Rule of thumb
is that you can assign BB_MAX_WEIGHT but for comparsions one should always
use an inequality or call the helper method.

Fixes #50808.
上级 0af5228e
......@@ -647,9 +647,9 @@ struct BasicBlock : private LIR::Range
}
}
bool isMaxBBWeight()
bool isMaxBBWeight() const
{
return (bbWeight == BB_MAX_WEIGHT);
return (bbWeight >= BB_MAX_WEIGHT);
}
// Returns "true" if the block is empty. Empty here means there are no statement
......
......@@ -19057,7 +19057,7 @@ void Compiler::impMakeDiscretionaryInlineObservations(InlineInfo* pInlineInfo, I
InlineCallsiteFrequency frequency = InlineCallsiteFrequency::UNUSED;
// If this is a prejit root, or a maximally hot block...
if ((pInlineInfo == nullptr) || (pInlineInfo->iciBlock->bbWeight >= BB_MAX_WEIGHT))
if ((pInlineInfo == nullptr) || (pInlineInfo->iciBlock->isMaxBBWeight()))
{
frequency = InlineCallsiteFrequency::HOT;
}
......
......@@ -657,7 +657,7 @@ const char* refCntWtd2str(BasicBlock::weight_t refCntWtd)
nump = (nump == num1) ? num2 : num1;
if (refCntWtd == BB_MAX_WEIGHT)
if (refCntWtd >= BB_MAX_WEIGHT)
{
sprintf_s(temp, bufSize, "MAX ");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册