[PATCH] D65552: Move llvm::Register from CodeGen to MC to correct a layering issue

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 19:38:50 PDT 2019


dsanders added a comment.

In D65552#1609530 <https://reviews.llvm.org/D65552#1609530>, @arsenm wrote:

> In D65552#1609529 <https://reviews.llvm.org/D65552#1609529>, @dsanders wrote:
>
> > MCRegisterClass::contains() is the main example I have at the moment. It's often called with virtual register arguments and returns false for this case.
>
>
> This sounds really broken. I would expect that to be an illegal call


Are you referring to calling TargetRegisterClass::contains() on vregs to begin with or passing them on to MCRegisterClass::contains?
The former is happening everywhere as far as I can see but we could practically make the latter true.

FWIW, this is the only vregs in MC layer case I've found so far but I'm worried that there are more non-physical registers in the MC objects. Historically there's nothing stopping it and I don't have a very good way to discover it at the moment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65552





More information about the llvm-commits mailing list