[PATCH] D61321: [globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand (MO.isImm() == true)

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 13:53:32 PDT 2019


dsanders added a comment.

>> In D61321#1546826 <https://reviews.llvm.org/D61321#1546826>, @arsenm wrote:
>> 
>>> We could try to be heroic and use something stronger than unsigned for registers
>> 
>> 
>> Are you talking about using stronger types for registers just in the Builder interface? What would the usage look like? My big concern (besides the massive change this would take) is how verbose it would be to use the APIs.
> 
> I mean everywhere, but that's a huge project. I imagine a struct Register { unsigned X; isVirtual(); isPhysical() }

FWIW, that would be my preferred solution if it weren't for the sheer amount of time required to achieve it. It's always felt wrong that we use `unsigned` to represent registers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61321





More information about the llvm-commits mailing list