Details
Diff Detail
- Build Status
Buildable 5618 Build 5618: arc lint + arc unit
Event Timeline
lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
69–70 | This patch looks pretty straightforward. |
lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
69–70 | I didn't give it enough thought to notice it was redundant :-). I'll make it emit it directly once I've finished updating the other patches. |
lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
69–70 | I got around to trying to make this change and remembered why I recorded the MI and printed it out afterwards. The operands haven't been added to the instruction at the point that recordInsertions() is called so it only prints the opcode. This makes it hard to trace the changes the pass is making. |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
174 | I think that just having an "unsigned DebugNewInstructionsIdx" or something similar could be enough to track the new MIs that are created but haven't been printed yet for debugging; no need for a separate SmallVector? | |
lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
69–70 | Ah yes, that makes sense. |
SmallVector -> number of new instructions emitted.
Also fixed a small issue I missed in the refresh. Now that the debug output
code is split across two files with different DEBUG_ONLY definitions you need
--debug-only=legalize-mir,legalizer to get useful debug output. legalize-mir
isn't a pass and doesn't provide useful debug output without legalizer so I've
made them both enable their debug output when given --debug-only=legalizer.
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
204 | Minor nitpick: maybe use auto& here to make the code slightly more readable? |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
204 | Thanks. |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
204 | Quick question here - is it possible that one of the instructions could have been erased as it went through legalization (and we're trying to print it)? |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
204 | I'm assuming that's not possible as the instructions being printed here are the ones added to the WorkList in this iteration, to be processed in future iterations. In other words, all of these MIs will be processed by legalizeInstrStep later on, so they shouldn't have been erased at this point. |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
204 | That's right. The only way it could see an erased instruction is if a single legalizer step created an instruction and erased it again. That would be wasteful and would break the work list too. |
I think that just having an "unsigned DebugNewInstructionsIdx" or something similar could be enough to track the new MIs that are created but haven't been printed yet for debugging; no need for a separate SmallVector?
I think it makes the code slightly easier to understand, as it's then immediately clear that MI's from the WorkList are being printed, rather than having to look through code how this new data structure DebugReportList is being formed.