Diff Detail
Event Timeline
llvm/lib/CodeGen/MachineVerifier.cpp | ||
---|---|---|
329–330 | Oops, this condition is inverted :( |
llvm/lib/CodeGen/MachineVerifier.cpp | ||
---|---|---|
337–340 | Would it make sense to use MI.isMetaInstruction() here instead? That should skip any instruction which does not generate code (including debug instructions.) |
I don’t think this should be part of MachineVerifier. The condition you’re checking for doesn’t indicate that the MIR is invalid. Even at -O0, you’ll hit it for code like:
int foo =
Call();
Where we (currently, at least) step to “Call()” before we step to the assignment. I doubt this is the only such edge case.
I do still think the condition would be useful to check, perhaps in a separate ‘checking’ pass for debug info.
I think this is a fair point, Vedant. Where would you put the verifier? Happy to chat about this further.
Oops, this condition is inverted :(