diff --git a/src/mir/RegAlloc.cpp b/src/mir/RegAlloc.cpp index 94197f53..a3f7a07f 100644 --- a/src/mir/RegAlloc.cpp +++ b/src/mir/RegAlloc.cpp @@ -1380,8 +1380,6 @@ namespace mir } // 大函数丢弃 move 偏好以保持分配稳定性 - // 条件1: move偏好数量 >100 直接跳过 - // 条件2: vreg数 * move偏好数 > 600 (conv2d: 71*15=1065) int mv = static_cast(move_preferences.size()); if (mv > 100 || static_cast(function.GetNumVRegs()) * mv > 600) move_preferences.clear(); @@ -1704,7 +1702,8 @@ namespace mir } int mv = static_cast(move_preferences.size()); - if (mv > 100 || static_cast(function.GetNumVRegs()) * mv > 600) + if (function.GetNumVRegs() > 120 || mv > 100 || + static_cast(function.GetNumVRegs()) * mv > 600) move_preferences.clear(); std::vector gp_alloc(GP_ALLOCATABLE, GP_ALLOCATABLE + GP_NUM_ALLOCATABLE);