LLVM 24.0.0git
llvm::MCRegister Class Reference

Wrapper class representing physical registers and target specific virtual registers. More...

#include "llvm/MC/MCRegister.h"

Public Member Functions

constexpr MCRegister (unsigned Val=0)
constexpr bool isPhysical () const
 Return true if the specified register number is in the physical register namespace.
constexpr operator unsigned () const
constexpr unsigned id () const
constexpr bool isValid () const
constexpr bool operator== (const MCRegister &Other) const
 Comparisons between register objects.
constexpr bool operator!= (const MCRegister &Other) const
constexpr bool operator== (unsigned Other) const
 Comparisons against register constants.
constexpr bool operator!= (unsigned Other) const
constexpr bool operator== (int Other) const
constexpr bool operator!= (int Other) const
constexpr bool operator== (MCPhysReg Other) const
constexpr bool operator!= (MCPhysReg Other) const

Static Public Member Functions

static constexpr bool isPhysicalRegister (unsigned Reg)
 Return true if the specified register number is in the physical register namespace.
static constexpr MCRegister from (unsigned Val)
 Check-convert the provided unsigned value to an MCRegister.

Static Public Attributes

static constexpr unsigned NoRegister = 0u
static constexpr unsigned FirstPhysicalReg = 1u
static constexpr unsigned LastPhysicalReg = (1u << 30) - 1
static constexpr unsigned TargetVirtualRegFlag = 1u << 31

Friends

hash_code hash_value (const MCRegister &Reg)

Detailed Description

Wrapper class representing physical registers and target specific virtual registers.

Should be passed by value.

Definition at line 42 of file MCRegister.h.

Constructor & Destructor Documentation

◆ MCRegister()

llvm::MCRegister::MCRegister ( unsigned Val = 0)
inlineconstexpr

Definition at line 47 of file MCRegister.h.

Referenced by from(), hash_value, operator!=(), and operator==().

Member Function Documentation

◆ from()

constexpr MCRegister llvm::MCRegister::from ( unsigned Val)
inlinestaticconstexpr

◆ id()

◆ isPhysical()

◆ isPhysicalRegister()

constexpr bool llvm::MCRegister::isPhysicalRegister ( unsigned Reg)
inlinestaticconstexpr

Return true if the specified register number is in the physical register namespace.

Definition at line 69 of file MCRegister.h.

References FirstPhysicalReg, and LastPhysicalReg.

Referenced by from(), isPhysical(), and llvm::Register::isPhysicalRegister().

◆ isValid()

◆ operator unsigned()

llvm::MCRegister::operator unsigned ( ) const
inlineconstexpr

Definition at line 77 of file MCRegister.h.

◆ operator!=() [1/4]

bool llvm::MCRegister::operator!= ( const MCRegister & Other) const
inlineconstexpr

Definition at line 93 of file MCRegister.h.

References MCRegister(), and llvm::Other.

◆ operator!=() [2/4]

bool llvm::MCRegister::operator!= ( int Other) const
inlineconstexpr

Definition at line 103 of file MCRegister.h.

References llvm::Other.

◆ operator!=() [3/4]

bool llvm::MCRegister::operator!= ( MCPhysReg Other) const
inlineconstexpr

Definition at line 108 of file MCRegister.h.

References llvm::Other.

◆ operator!=() [4/4]

bool llvm::MCRegister::operator!= ( unsigned Other) const
inlineconstexpr

Definition at line 101 of file MCRegister.h.

References llvm::Other.

◆ operator==() [1/4]

bool llvm::MCRegister::operator== ( const MCRegister & Other) const
inlineconstexpr

Comparisons between register objects.

Definition at line 90 of file MCRegister.h.

References MCRegister(), and llvm::Other.

◆ operator==() [2/4]

bool llvm::MCRegister::operator== ( int Other) const
inlineconstexpr

Definition at line 102 of file MCRegister.h.

References llvm::Other.

◆ operator==() [3/4]

bool llvm::MCRegister::operator== ( MCPhysReg Other) const
inlineconstexpr

Definition at line 105 of file MCRegister.h.

References llvm::Other.

◆ operator==() [4/4]

bool llvm::MCRegister::operator== ( unsigned Other) const
inlineconstexpr

Comparisons against register constants.

E.g.

  • R == AArch64::WZR
  • R == 0

Definition at line 100 of file MCRegister.h.

References llvm::Other.

◆ hash_value

hash_code hash_value ( const MCRegister & Reg)
friend

Definition at line 123 of file MCRegister.h.

References llvm::hash_value(), and MCRegister().

Member Data Documentation

◆ FirstPhysicalReg

unsigned llvm::MCRegister::FirstPhysicalReg = 1u
staticconstexpr

Definition at line 63 of file MCRegister.h.

Referenced by isPhysicalRegister().

◆ LastPhysicalReg

unsigned llvm::MCRegister::LastPhysicalReg = (1u << 30) - 1
staticconstexpr

Definition at line 64 of file MCRegister.h.

Referenced by isPhysicalRegister().

◆ NoRegister

◆ TargetVirtualRegFlag

unsigned llvm::MCRegister::TargetVirtualRegFlag = 1u << 31
staticconstexpr

Definition at line 65 of file MCRegister.h.


The documentation for this class was generated from the following file: