class BitMaskClassIterator

Declaration

class BitMaskClassIterator { /* full declaration omitted */ };

Description

This class encapuslates the logic to iterate over bitmask returned by the various RegClass related APIs. E.g., this class can be used to iterate over the subclasses provided by TargetRegisterClass::getSubClassMask or SuperRegClassIterator::getMask.

Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:1187

Member Variables

private const unsigned int NumRegClasses
Total number of register classes.
private unsigned int Base = 0
Base index of CurrentChunk. In other words, the number of bit we read to get at the beginning of that chunck.
private unsigned int Idx = 0
Adjust base index of CurrentChunk. Base index + how many bit we read within CurrentChunk.
private unsigned int ID = 0
Current register class ID.
private const uint32_t* Mask
Mask we are iterating over.
private uint32_t CurrentChunk
Current chunk of the Mask we are traversing.

Method Overview

Methods

BitMaskClassIterator(
    const uint32_t* Mask,
    const llvm::TargetRegisterInfo& TRI)

Description

Create a BitMaskClassIterator that visits all the register classes represented by \p Mask.

Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:1251

Parameters

const uint32_t* Mask
const llvm::TargetRegisterInfo& TRI

unsigned int getID() const

Description

Returns the current register class ID.

Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:1261

bool isValid() const

Description

Returns true if this iterator is still pointing at a valid entry.

Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:1258

void moveNBits(unsigned int NumBits)

Description

Move \p NumBits Bits forward in CurrentChunk.

Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:1238

Parameters

unsigned int NumBits

void moveToNextID()

Description

Move ID to the next set bit.

Declared at: llvm/include/llvm/CodeGen/TargetRegisterInfo.h:1205