Fixes a minor bug when trying to iterate through use operands when
updating debug use operands.
Extends a test to include above.
Differential D104576
RegisterCoalescer: Fix iterating through use operands. hgreving on Jun 18 2021, 3:21 PM. Authored by
Details
Diff Detail
Event Timeline
Comment Actions Just so that I understand clearly, the fault here was modifying operands while using range-iteration over the same collection? Was the symptom a crash, or missing output? (Thanks for the catch).
Comment Actions Yes, the iterator was invalidated while updating it. I am not familiar with this particular part of the register coalescer, but stumbled over it when debugging. I think it's a common mistake, thanks for reviewing. |
Can you just use the explicit iterators and preincrement instead of saving all the operands?