class VirtRegMap

Declaration

class VirtRegMap : public MachineFunctionPass { /* full declaration omitted */ };

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:33

Inherits from: MachineFunctionPass

Member Variables

public static char ID

Method Overview

Inherited from MachineFunctionPass:

Inherited from FunctionPass:

Inherited from Pass:

Methods

VirtRegMap(const llvm::VirtRegMap&)

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:74

Parameters

const llvm::VirtRegMap&

VirtRegMap()

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:70

void assignVirt2Phys(llvm::Register virtReg,
                     llvm::MCPhysReg physReg)

Description

creates a mapping for the specified virtual register to the specified physical register

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:109

Parameters

llvm::Register virtReg
llvm::MCPhysReg physReg

void assignVirt2StackSlot(llvm::Register virtReg,
                          int SS)

Description

create a mapping for the specified virtual register to the specified stack slot

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:177

Parameters

llvm::Register virtReg
int SS

int assignVirt2StackSlot(llvm::Register virtReg)

Description

create a mapping for the specifed virtual register to the next available stack slot

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:173

Parameters

llvm::Register virtReg

void clearAllVirt()

Description

clears all virtual to physical register mappings

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:121

void clearVirt(llvm::Register virtReg)

Description

clears the specified virtual register's, physical register mapping

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:113

Parameters

llvm::Register virtReg

void dump() const

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:180

void getAnalysisUsage(
    llvm::AnalysisUsage& AU) const

Description

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:79

Parameters

llvm::AnalysisUsage& AU

llvm::MachineFunction& getMachineFunction() const

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:84

unsigned int getOriginal(
    unsigned int VirtReg) const

Description

getOriginal - Return the original virtual register that VirtReg descends from through splitting. A register that was not created by splitting is its own original. This operation is idempotent.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:148

Parameters

unsigned int VirtReg

llvm::Register getPhys(
    llvm::Register virtReg) const

Description

returns the physical register mapped to the specified virtual register

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:102

Parameters

llvm::Register virtReg

unsigned int getPreSplitReg(
    llvm::Register virtReg) const

Description

returns the live interval virtReg is split from.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:140

Parameters

llvm::Register virtReg

llvm::MachineRegisterInfo& getRegInfo() const

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:89

int getStackSlot(llvm::Register virtReg) const

Description

returns the stack slot mapped to the specified virtual register

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:166

Parameters

llvm::Register virtReg

const llvm::TargetRegisterInfo& getTargetRegInfo()
    const

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:90

void grow()

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:92

bool hasKnownPreference(llvm::Register VirtReg)

Description

returns true if VirtReg has a known preferred register. This returns false if VirtReg has a preference that is a virtual register that hasn't been assigned yet.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:132

Parameters

llvm::Register VirtReg

bool hasPhys(llvm::Register virtReg) const

Description

returns true if the specified virtual register is mapped to a physical register

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:96

Parameters

llvm::Register virtReg

bool hasPreferredPhys(llvm::Register VirtReg)

Description

returns true if VirtReg is assigned to its preferred physreg.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:127

Parameters

llvm::Register VirtReg

bool isAssignedReg(llvm::Register virtReg) const

Description

returns true if the specified virtual register is not mapped to a stack slot or rematerialized.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:155

Parameters

llvm::Register virtReg

void print(llvm::raw_ostream& OS,
           const llvm::Module* M = nullptr) const

Description

print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:179

Parameters

llvm::raw_ostream& OS
const llvm::Module* M = nullptr

bool runOnMachineFunction(
    llvm::MachineFunction& MF)

Description

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:77

Parameters

llvm::MachineFunction& MF

void setIsSplitFromReg(llvm::Register virtReg,
                       unsigned int SReg)

Description

records virtReg is a split live interval from SReg.

Declared at: llvm/include/llvm/CodeGen/VirtRegMap.h:135

Parameters

llvm::Register virtReg
unsigned int SReg