[PATCH] D79058: [MachineVerifier] Add a pass to ensure debug locations within a basic block are monotonically increasing

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 09:38:47 PDT 2020


davide added a comment.

In D79058#2010193 <https://reviews.llvm.org/D79058#2010193>, @vsk wrote:

> 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.




In D79058#2010193 <https://reviews.llvm.org/D79058#2010193>, @vsk wrote:

> 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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79058/new/

https://reviews.llvm.org/D79058





More information about the llvm-commits mailing list