GlobalISel: Fix double printing new instructions in legalizer
New instructions were getting printed both in createdInstr, and in the final printNewInstrs, so it made it look like the same instructions were created twice. This overall made reading the debug output harder. Stop printing the initial construction and only print new instructions in the summary at the end. This avoids printing the less useful case where instructions are sometimes initially created with no operands. I'm not sure this is the correct instance to remove; now the visible ordering is different. Now you will typically see the one erased instruction message before all the new instructions in order. I think this is the more logical view of typical legalization changes, although it's mechanically backwards from the normal insert-new-erase-old pattern.
Loading
Please sign in to comment