[PATCH] D42449: [MachineVerifier] Add check that renamable operands aren't reserved registers.

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 09:18:40 PST 2018


MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.

I was contemplating whether we need a check that the register assigned on a renamable operand is a physreg. Of course we cannot even write a verifier for that as using MO::isRenamable() will immediately run into an assertion failure when that is not the case (which is good!).

I think the way to solve this would be to move the machine verifier logic around to a MachineOperand::verify() function. This would be nice in that it can access machine operand internals that way. On the other hand this would probably need a bunch of refactoring to make it play seamless with the machine verifier reporting infrastructure. So I don't expect this to be solved here (or by you), just writing my thoughts down.

LGTM, would be nice if you could split the fixes and the verifier changes into separate commits when pushing this.


Repository:
  rL LLVM

https://reviews.llvm.org/D42449





More information about the llvm-commits mailing list