[PATCH] D65599: Add MCRegister and use it in MCRegisterClass::contains()

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 14:18:36 PDT 2019


dsanders marked 2 inline comments as done.
dsanders added inline comments.


================
Comment at: llvm/include/llvm/MC/MCRegister.h:18
 class MCRegister {
+  unsigned Reg;
+
----------------
arsenm wrote:
> MCPhysReg?
I didn't want to change the size but also I didn't want to change the sentinel values for DenseMapInfo which are 0xFFFFFFFF and 0xFFFFFFFE.


================
Comment at: llvm/include/llvm/MC/MCRegister.h:53
+  /// Return true if the specified register number is in the physical register
+  /// namespace.
+  bool isPhysical() const {
----------------
arsenm wrote:
> I would expect this to be trivially true?
It's false for 0 ($noreg) and illegal values. If neither isValid() or isPhysical() are true then something is leaking illegal values into the MC layer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65599





More information about the llvm-commits mailing list