RedundantFlagCalc: Avoid vector copy in OptimizeParity()

Previously this was making a copy of the vector, when we only
need to read from it.
This commit is contained in:
Lioncache committed 2025-10-05 12:17:45 -04:00
1 parent 69f990c1f8
commit c84801adb3
1 file changed
+2 -2
@@ -627,9 +627,9 @@ void DeadFlagCalculationEliminination::OptimizeParity(IREmitter* IREmit, IRListV
}
for (auto [Block, BlockHeader] : CurrentIR.GetBlocks()) {
auto ID = BlockHeader->C<IROp_CodeBlock>()->ID;
const auto ID = BlockHeader->C<IROp_CodeBlock>()->ID;
const auto& Predecessors = CFG.Get(ID)->Predecessors;
bool Full = false;
auto Predecessors = CFG.Get(ID)->Predecessors;
if (Predecessors.empty()) {
// Conservatively assume there was full parity before the start block