LLVM API Documentation
#include <LiveVariables.h>
Inheritance diagram for llvm::LiveVariables:


Public Member Functions | |
| LiveVariables () | |
| virtual bool | runOnMachineFunction (MachineFunction &MF) |
| bool | RegisterDefIsDead (MachineInstr *MI, unsigned Reg) const |
| void | replaceKillInstruction (unsigned Reg, MachineInstr *OldMI, MachineInstr *NewMI) |
| void | addVirtualRegisterKilled (unsigned IncomingReg, MachineInstr *MI, bool AddIfNotFound=false) |
| bool | removeVirtualRegisterKilled (unsigned reg, MachineInstr *MI) |
| void | removeVirtualRegistersKilled (MachineInstr *MI) |
| void | addVirtualRegisterDead (unsigned IncomingReg, MachineInstr *MI, bool AddIfNotFound=false) |
| bool | removeVirtualRegisterDead (unsigned reg, MachineInstr *MI) |
| void | getAnalysisUsage (AnalysisUsage &AU) const |
| virtual void | releaseMemory () |
| VarInfo & | getVarInfo (unsigned RegIdx) |
| getVarInfo - Get (possibly creating) a VarInfo object for the given vreg. | |
| void | MarkVirtRegAliveInBlock (VarInfo &VRInfo, MachineBasicBlock *DefBlock, MachineBasicBlock *BB) |
| void | MarkVirtRegAliveInBlock (VarInfo &VRInfo, MachineBasicBlock *DefBlock, MachineBasicBlock *BB, std::vector< MachineBasicBlock * > &WorkList) |
| void | HandleVirtRegUse (unsigned reg, MachineBasicBlock *MBB, MachineInstr *MI) |
Static Public Attributes | |
| char | ID = 0 |
|
|
Definition at line 46 of file LiveVariables.h. |
|
||||||||||||||||
|
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. Definition at line 224 of file LiveVariables.h. References llvm::MachineInstr::addRegisterDead(). Referenced by llvm::ARMInstrInfo::convertToThreeAddress(), and TwoAddressInstructionPass::runOnMachineFunction(). |
|
||||||||||||||||
|
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. Definition at line 189 of file LiveVariables.h. References llvm::MachineInstr::addRegisterKilled(). Referenced by llvm::ARMInstrInfo::convertToThreeAddress(), and TwoAddressInstructionPass::runOnMachineFunction(). |
|
|
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below. Reimplemented from llvm::Pass. Definition at line 48 of file LiveVariables.cpp. References llvm::AnalysisUsage::addRequiredID(), llvm::AnalysisUsage::setPreservesAll(), and llvm::UnreachableMachineBlockElimID. |
|
|
getVarInfo - Get (possibly creating) a VarInfo object for the given vreg. getVarInfo - Return the VarInfo structure for the specified VIRTUAL register. Definition at line 71 of file LiveVariables.cpp. References llvm::LiveVariables::VarInfo::AliveBlocks, llvm::MachineFunction::getNumBlockIDs(), llvm::BitVector::resize(), and llvm::LiveVariables::VarInfo::UsedBlocks. Referenced by llvm::X86InstrInfo::convertToThreeAddress(), llvm::ARMInstrInfo::convertToThreeAddress(), HandleVirtRegUse(), removeVirtualRegistersKilled(), replaceKillInstruction(), TwoAddressInstructionPass::runOnMachineFunction(), and runOnMachineFunction(). |
|
||||||||||||||||
|
||||||||||||||||||||
|
Definition at line 87 of file LiveVariables.cpp. References llvm::LiveVariables::VarInfo::AliveBlocks, llvm::MachineBasicBlock::getNumber(), llvm::LiveVariables::VarInfo::Kills, llvm::MachineBasicBlock::pred_rbegin(), and llvm::MachineBasicBlock::pred_rend(). |
|
||||||||||||||||
|
Definition at line 114 of file LiveVariables.cpp. Referenced by HandleVirtRegUse(), and runOnMachineFunction(). |
|
||||||||||||
|
RegisterDefIsDead - Return true if the specified instruction defines the specified register, but that definition is dead. |
|
|
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. Reimplemented from llvm::Pass. Definition at line 253 of file LiveVariables.h. |
|
||||||||||||
|
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. Definition at line 234 of file LiveVariables.h. References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineOperand::isRegister(), and llvm::MachineOperand::setIsDead(). Referenced by TwoAddressInstructionPass::runOnMachineFunction(). |
|
||||||||||||
|
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. Definition at line 199 of file LiveVariables.h. References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isKill(), llvm::MachineOperand::isRegister(), and llvm::MachineOperand::setIsKill(). Referenced by TwoAddressInstructionPass::runOnMachineFunction(). |
|
|
removeVirtualRegistersKilled - Remove all killed info for the specified instruction. Definition at line 673 of file LiveVariables.cpp. References llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), getVarInfo(), llvm::MachineOperand::isKill(), llvm::MachineOperand::isRegister(), llvm::TargetRegisterInfo::isVirtualRegister(), Reg, llvm::LiveVariables::VarInfo::removeKill(), and llvm::MachineOperand::setIsKill(). |
|
||||||||||||||||
|
replaceKillInstruction - Update register kill info by replacing a kill instruction with a new one. Definition at line 665 of file LiveVariables.cpp. References getVarInfo(), llvm::LiveVariables::VarInfo::Kills, and Reg. Referenced by llvm::X86InstrInfo::convertToThreeAddress(), and TwoAddressInstructionPass::runOnMachineFunction(). |
|
|
|
Definition at line 44 of file LiveVariables.cpp. |