[PATCH] D28566: Disable Callee Saved Registers

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 09:40:16 PDT 2017


MatzeB added inline comments.


================
Comment at: include/llvm/CodeGen/MachineRegisterInfo.h:217
+  /// registers that are disabled from the CSR list).
+  const MCPhysReg *getUpdatedCalleeSavedRegs() const;
+
----------------
Please call this `getCalleeSavedRegs()` to make it clear that this should be the default function to call now to get the list of callee saved registers!
At the same time please add a sentence in the documentation of TargetRegisterInfo::getCalleeSavedRegs() to state that in most cases people should rather call the version in MachineRegisterInfo.


================
Comment at: lib/CodeGen/MachineInstr.cpp:274-278
+    for (unsigned I = 0, E = RegMaskSize; I < E; ++I)
+      if (RegMask[I] != OtherRegMask[I])
+        return false;
+
+    return true;
----------------
This can be simplified to
`return std::equal(RegMask, RegMask+RegMaskSize, OtherRegMask);`


Repository:
  rL LLVM

https://reviews.llvm.org/D28566





More information about the llvm-commits mailing list