[PATCH] D102805: [M68k] Allow user to preserve certain registers
    Nick Desaulniers via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Wed May 19 16:03:25 PDT 2021
    
    
  
nickdesaulniers added a comment.
Please fix up the linter warnings; LGTM.
================
Comment at: llvm/lib/Target/M68k/M68kRegisterInfo.cpp:137
+  // Registers reserved by users
+  for (size_t Reg = 0; Reg < getNumRegs(); ++Reg) {
+    if (MF.getSubtarget<M68kSubtarget>().isRegisterReservedByUser(Reg))
----------------
a more common convention in LLVM for `for` loops is:
    for (size_t Reg = 0, Total = getNumRegs(); Reg != Total; ++Reg) {
The coding standards aren't very explicit about this though, the case https://llvm.org/docs/CodingStandards.html#don-t-evaluate-end-every-time-through-a-loop has more to do with iterators.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102805/new/
https://reviews.llvm.org/D102805
    
    
More information about the cfe-commits
mailing list