class LiveVariables
Declaration
class LiveVariables : public MachineFunctionPass { /* full declaration omitted */ };
Description
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of passes that operate on the MachineFunction representation. Instead of overriding runOnFunction, subclasses override runOnMachineFunction.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:46
Inherits from: MachineFunctionPass
Member Variables
- public static char ID
Method Overview
- public void HandleVirtRegDef(unsigned int reg, llvm::MachineInstr & MI)
- public void HandleVirtRegUse(unsigned int reg, llvm::MachineBasicBlock * MBB, llvm::MachineInstr & MI)
- public LiveVariables()
- public void MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo & VRInfo, llvm::MachineBasicBlock * DefBlock, llvm::MachineBasicBlock * BB)
- public void MarkVirtRegAliveInBlock(llvm::LiveVariables::VarInfo & VRInfo, llvm::MachineBasicBlock * DefBlock, llvm::MachineBasicBlock * BB, std::vector<MachineBasicBlock *> & WorkList)
- public bool RegisterDefIsDead(llvm::MachineInstr & MI, unsigned int Reg) const
- public void addNewBlock(llvm::MachineBasicBlock * BB, llvm::MachineBasicBlock * DomBB, llvm::MachineBasicBlock * SuccBB)
- public void addVirtualRegisterDead(unsigned int IncomingReg, llvm::MachineInstr & MI, bool AddIfNotFound = false)
- public void addVirtualRegisterKilled(unsigned int IncomingReg, llvm::MachineInstr & MI, bool AddIfNotFound = false)
- public void getAnalysisUsage(llvm::AnalysisUsage & AU) const
- public llvm::LiveVariables::VarInfo & getVarInfo(unsigned int RegIdx)
- public bool isLiveIn(unsigned int Reg, const llvm::MachineBasicBlock & MBB)
- public bool isLiveOut(unsigned int Reg, const llvm::MachineBasicBlock & MBB)
- public bool isPHIJoin(unsigned int Reg)
- public void releaseMemory()
- public bool removeVirtualRegisterDead(unsigned int reg, llvm::MachineInstr & MI)
- public bool removeVirtualRegisterKilled(unsigned int reg, llvm::MachineInstr & MI)
- public void removeVirtualRegistersKilled(llvm::MachineInstr & MI)
- public void replaceKillInstruction(unsigned int Reg, llvm::MachineInstr & OldMI, llvm::MachineInstr & NewMI)
- public bool runOnMachineFunction(llvm::MachineFunction & MF)
- public void setPHIJoin(unsigned int Reg)
Inherited from MachineFunctionPass:
- public doInitialization
- protected getAnalysisUsage
- protected getClearedProperties
- protected getRequiredProperties
- protected getSetProperties
- protected runOnMachineFunction
Inherited from FunctionPass:
- public assignPassManager
- public createPrinterPass
- public getPotentialPassManagerType
- public runOnFunction
- protected skipFunction
Inherited from Pass:
- public assignPassManager
- public createPass
- public createPrinterPass
- public doFinalization
- public doInitialization
- public dump
- public dumpPassStructure
- public getAdjustedAnalysisPointer
- public getAnalysis
- public getAnalysis
- public getAnalysisID
- public getAnalysisID
- public getAnalysisIfAvailable
- public getAnalysisUsage
- public getAsImmutablePass
- public getAsPMDataManager
- public getPassID
- public getPassKind
- public getPassName
- public getPotentialPassManagerType
- public getResolver
- public lookupPassInfo
- public lookupPassInfo
- public mustPreserveAnalysisID
- public preparePassManager
- public print
- public releaseMemory
- public setResolver
- public verifyAnalysis
Methods
¶void HandleVirtRegDef(unsigned int reg,
llvm::MachineInstr& MI)
void HandleVirtRegDef(unsigned int reg,
llvm::MachineInstr& MI)
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:280
Parameters
- unsigned int reg
- llvm::MachineInstr& MI
¶void HandleVirtRegUse(
unsigned int reg,
llvm::MachineBasicBlock* MBB,
llvm::MachineInstr& MI)
void HandleVirtRegUse(
unsigned int reg,
llvm::MachineBasicBlock* MBB,
llvm::MachineInstr& MI)
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:281
Parameters
- unsigned int reg
- llvm::MachineBasicBlock* MBB
- llvm::MachineInstr& MI
¶LiveVariables()
LiveVariables()
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:49
¶void MarkVirtRegAliveInBlock(
llvm::LiveVariables::VarInfo& VRInfo,
llvm::MachineBasicBlock* DefBlock,
llvm::MachineBasicBlock* BB)
void MarkVirtRegAliveInBlock(
llvm::LiveVariables::VarInfo& VRInfo,
llvm::MachineBasicBlock* DefBlock,
llvm::MachineBasicBlock* BB)
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:275
Parameters
- llvm::LiveVariables::VarInfo& VRInfo
- llvm::MachineBasicBlock* DefBlock
- llvm::MachineBasicBlock* BB
¶void MarkVirtRegAliveInBlock(
llvm::LiveVariables::VarInfo& VRInfo,
llvm::MachineBasicBlock* DefBlock,
llvm::MachineBasicBlock* BB,
std::vector<MachineBasicBlock*>& WorkList)
void MarkVirtRegAliveInBlock(
llvm::LiveVariables::VarInfo& VRInfo,
llvm::MachineBasicBlock* DefBlock,
llvm::MachineBasicBlock* BB,
std::vector<MachineBasicBlock*>& WorkList)
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:277
Parameters
- llvm::LiveVariables::VarInfo& VRInfo
- llvm::MachineBasicBlock* DefBlock
- llvm::MachineBasicBlock* BB
- std::vector<MachineBasicBlock*>& WorkList
¶bool RegisterDefIsDead(llvm::MachineInstr& MI,
unsigned int Reg) const
bool RegisterDefIsDead(llvm::MachineInstr& MI,
unsigned int Reg) const
Description
RegisterDefIsDead - Return true if the specified instruction defines the specified register, but that definition is dead.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:187
Parameters
- llvm::MachineInstr& MI
- unsigned int Reg
¶void addNewBlock(llvm::MachineBasicBlock* BB,
llvm::MachineBasicBlock* DomBB,
llvm::MachineBasicBlock* SuccBB)
void addNewBlock(llvm::MachineBasicBlock* BB,
llvm::MachineBasicBlock* DomBB,
llvm::MachineBasicBlock* SuccBB)
Description
addNewBlock - Add a new basic block BB between DomBB and SuccBB. All variables that are live out of DomBB and live into SuccBB will be marked as passing live through BB. This method assumes that the machine code is still in SSA form.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:296
Parameters
- llvm::MachineBasicBlock* BB
- llvm::MachineBasicBlock* DomBB
- llvm::MachineBasicBlock* SuccBB
¶void addVirtualRegisterDead(
unsigned int IncomingReg,
llvm::MachineInstr& MI,
bool AddIfNotFound = false)
void addVirtualRegisterDead(
unsigned int IncomingReg,
llvm::MachineInstr& MI,
bool AddIfNotFound = false)
Description
addVirtualRegisterDead - Add information about the fact that the specified register is dead after being used by the specified instruction. If AddIfNotFound is true, add a implicit operand if it's not found.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:237
Parameters
- unsigned int IncomingReg
- llvm::MachineInstr& MI
- bool AddIfNotFound = false
¶void addVirtualRegisterKilled(
unsigned int IncomingReg,
llvm::MachineInstr& MI,
bool AddIfNotFound = false)
void addVirtualRegisterKilled(
unsigned int IncomingReg,
llvm::MachineInstr& MI,
bool AddIfNotFound = false)
Description
addVirtualRegisterKilled - Add information about the fact that the specified register is killed after being used by the specified instruction. If AddIfNotFound is true, add a implicit operand if it's not found.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:201
Parameters
- unsigned int IncomingReg
- llvm::MachineInstr& MI
- bool AddIfNotFound = false
¶void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
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/LiveVariables.h:265
Parameters
¶llvm::LiveVariables::VarInfo& getVarInfo(
unsigned int RegIdx)
llvm::LiveVariables::VarInfo& getVarInfo(
unsigned int RegIdx)
Description
getVarInfo - Return the VarInfo structure for the specified VIRTUAL register.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:273
Parameters
- unsigned int RegIdx
¶bool isLiveIn(unsigned int Reg,
const llvm::MachineBasicBlock& MBB)
bool isLiveIn(unsigned int Reg,
const llvm::MachineBasicBlock& MBB)
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:283
Parameters
- unsigned int Reg
- const llvm::MachineBasicBlock& MBB
¶bool isLiveOut(unsigned int Reg,
const llvm::MachineBasicBlock& MBB)
bool isLiveOut(unsigned int Reg,
const llvm::MachineBasicBlock& MBB)
Description
isLiveOut - Determine if Reg is live out from MBB, when not considering PHI nodes. This means that Reg is either killed by a successor block or passed through one.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:290
Parameters
- unsigned int Reg
- const llvm::MachineBasicBlock& MBB
¶bool isPHIJoin(unsigned int Reg)
bool isPHIJoin(unsigned int Reg)
Description
isPHIJoin - Return true if Reg is a phi join register.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:301
Parameters
- unsigned int Reg
¶void releaseMemory()
void releaseMemory()
Description
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:267
¶bool removeVirtualRegisterDead(
unsigned int reg,
llvm::MachineInstr& MI)
bool removeVirtualRegisterDead(
unsigned int reg,
llvm::MachineInstr& MI)
Description
removeVirtualRegisterDead - Remove the specified kill of the virtual register from the live variable information. Returns true if the variable was marked dead at the specified instruction, false otherwise.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:247
Parameters
- unsigned int reg
- llvm::MachineInstr& MI
¶bool removeVirtualRegisterKilled(
unsigned int reg,
llvm::MachineInstr& MI)
bool removeVirtualRegisterKilled(
unsigned int reg,
llvm::MachineInstr& MI)
Description
removeVirtualRegisterKilled - Remove the specified kill of the virtual register from the live variable information. Returns true if the variable was marked as killed by the specified instruction, false otherwise.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:211
Parameters
- unsigned int reg
- llvm::MachineInstr& MI
¶void removeVirtualRegistersKilled(
llvm::MachineInstr& MI)
void removeVirtualRegistersKilled(
llvm::MachineInstr& MI)
Description
removeVirtualRegistersKilled - Remove all killed info for the specified instruction.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:232
Parameters
¶void replaceKillInstruction(
unsigned int Reg,
llvm::MachineInstr& OldMI,
llvm::MachineInstr& NewMI)
void replaceKillInstruction(
unsigned int Reg,
llvm::MachineInstr& OldMI,
llvm::MachineInstr& NewMI)
Description
replaceKillInstruction - Update register kill info by replacing a kill instruction with a new one.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:194
Parameters
- unsigned int Reg
- llvm::MachineInstr& OldMI
- llvm::MachineInstr& NewMI
¶bool runOnMachineFunction(
llvm::MachineFunction& MF)
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/LiveVariables.h:183
Parameters
¶void setPHIJoin(unsigned int Reg)
void setPHIJoin(unsigned int Reg)
Description
setPHIJoin - Mark Reg as a phi join register.
Declared at: llvm/include/llvm/CodeGen/LiveVariables.h:304
Parameters
- unsigned int Reg