During legalization, targets can create Pseudo Instructions with generic types. We shouldn't try to legalize them.
Details
Diff Detail
Event Timeline
Hi Aditya,
It seems weird to me to have elements in the work list that we shouldn't process. Could we change the way we insert in the work list instead?
E.g., having the check you added within the lambda for recordInsertions.
Cheers,
-Quentin
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
183 | This line needs to happen unconditionally so that --debug-only=legalize reports the instruction. |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
183 | Yes - for -debug-only printing output we would need it in the list but not process - but would disagree with Quentin's comment of not having the Instructions that are not needed in the work list. |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
183 | Incrementing NumNewInsns is just about how many instructions to print in the --debug-only=legalize output for that call to legalizeInstrStep(). The correlation with the growth of the work list is a coincidence. |
lib/CodeGen/GlobalISel/Legalizer.cpp | ||
---|---|---|
183 | As you rightly pointed out, they are connected in implementation right now because it's printing from the work list iterators instead of the BB iterators. I've looked into refactoring this away and I believe I've fixed this locally. I'll post the patch on-list once I've tested it. |
This line needs to happen unconditionally so that --debug-only=legalize reports the instruction.