small build segment tool improvement
This commit is contained in:
1 parent
153e17689a
commit
98bd1cc78c
1 file changed
+19
-3
+19
-3
@@ -874,10 +874,26 @@ void BinningProblem::placeHighRoutines(DualStream &logOutput)
|
|||||||
|
|
||||||
while (!floatingRoutines.empty())
|
while (!floatingRoutines.empty())
|
||||||
{
|
{
|
||||||
// Try to find any high routine
|
// Find the largest high routine
|
||||||
|
|
||||||
auto iterRoutine = floatingRoutines.begin();
|
auto iterRoutine = floatingRoutines.end();
|
||||||
while (iterRoutine != floatingRoutines.end() && !(*iterRoutine)->high) iterRoutine++;
|
|
||||||
|
for (auto iter = floatingRoutines.begin(); iter < floatingRoutines.end(); iter++)
|
||||||
|
{
|
||||||
|
if (!(*iter)->high) continue;
|
||||||
|
|
||||||
|
if (iterRoutine == floatingRoutines.end() ||
|
||||||
|
(*iterRoutine)->codeLength < (*iter)->codeLength)
|
||||||
|
{
|
||||||
|
iterRoutine = iter;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((*iterRoutine)->codeLength < (*iter)->codeLength)
|
||||||
|
{
|
||||||
|
iterRoutine = iter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (iterRoutine == floatingRoutines.end()) break;
|
if (iterRoutine == floatingRoutines.end()) break;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user