[all-commits] [llvm/llvm-project] 17640c: [NFC] Let (MC)Register APIs check isStackSlot

Mircea Trofin via All-commits all-commits at lists.llvm.org
Thu Oct 1 09:55:49 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 17640c5aac649c154959ca1075953f0d252a4a5b
      https://github.com/llvm/llvm-project/commit/17640c5aac649c154959ca1075953f0d252a4a5b
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2020-10-01 (Thu, 01 Oct 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/Register.h
    M llvm/include/llvm/MC/MCRegister.h

  Log Message:
  -----------
  [NFC] Let (MC)Register APIs check isStackSlot

The user is expected to make the isStackSlot check before calling isPhysicalRegister
or isVirtualRegister. The APIs assert otherwise. We can improve the usability
of these APIs by carrying out the check in the 2 APIs: they become a
complete "source of truth" and remove an extra responsibility from the
user.

Differential Revision: https://reviews.llvm.org/D88598




More information about the All-commits mailing list