LLVM API Documentation
#include <MachineRegisterInfo.h>
Definition at line 27 of file MachineRegisterInfo.h.
| typedef defusechain_iterator<true,true> llvm::MachineRegisterInfo::reg_iterator |
reg_iterator/reg_begin/reg_end - Walk all defs and uses of the specified register.
Definition at line 83 of file MachineRegisterInfo.h.
| typedef defusechain_iterator<false,true> llvm::MachineRegisterInfo::def_iterator |
def_iterator/def_begin/def_end - Walk all defs of the specified register.
Definition at line 98 of file MachineRegisterInfo.h.
| typedef defusechain_iterator<true,false> llvm::MachineRegisterInfo::use_iterator |
use_iterator/use_begin/use_end - Walk all uses of the specified register.
Definition at line 109 of file MachineRegisterInfo.h.
| typedef std::vector<std::pair<unsigned,unsigned> >::const_iterator llvm::MachineRegisterInfo::livein_iterator |
Definition at line 232 of file MachineRegisterInfo.h.
| typedef std::vector<unsigned>::const_iterator llvm::MachineRegisterInfo::liveout_iterator |
Definition at line 233 of file MachineRegisterInfo.h.
| MachineRegisterInfo::MachineRegisterInfo | ( | const TargetRegisterInfo & | TRI | ) | [explicit] |
Definition at line 17 of file MachineRegisterInfo.cpp.
References llvm::TargetRegisterInfo::getNumRegClasses(), llvm::TargetRegisterInfo::getNumRegs(), llvm::Intrinsic::memset, and llvm::BitVector::resize().
| MachineRegisterInfo::~MachineRegisterInfo | ( | ) |
Definition at line 28 of file MachineRegisterInfo.cpp.
References second, and llvm::BitVector::size().
Referenced by llvm::MachineFunction::~MachineFunction().
| reg_iterator llvm::MachineRegisterInfo::reg_begin | ( | unsigned | RegNo | ) | const [inline] |
Definition at line 88 of file MachineRegisterInfo.h.
References getRegUseDefListHead().
Referenced by llvm::LiveIntervals::addIntervalsForSpillsFast(), getConflictWeight(), llvm::LiveIntervals::getNumConflictsWithPhysReg(), getVRegDef(), reg_empty(), replaceRegWith(), and llvm::LiveIntervals::spillPhysRegAroundRegDefsUses().
| static reg_iterator llvm::MachineRegisterInfo::reg_end | ( | ) | [inline, static] |
Definition at line 91 of file MachineRegisterInfo.h.
Referenced by llvm::LiveIntervals::addIntervalsForSpillsFast(), getConflictWeight(), llvm::LiveIntervals::getNumConflictsWithPhysReg(), getVRegDef(), reg_empty(), replaceRegWith(), and llvm::LiveIntervals::spillPhysRegAroundRegDefsUses().
reg_empty - Return true if there are no instructions using or defining the specified register (it may be live-in).
Definition at line 95 of file MachineRegisterInfo.h.
References reg_begin(), and reg_end().
| def_iterator llvm::MachineRegisterInfo::def_begin | ( | unsigned | RegNo | ) | const [inline] |
Definition at line 99 of file MachineRegisterInfo.h.
References getRegUseDefListHead().
Referenced by def_empty(), isKilled(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), MustSaveLR(), llvm::LiveIntervals::processImplicitDefs(), regIsPICBase(), and llvm::LazyLiveness::vregLiveIntoMBB().
| static def_iterator llvm::MachineRegisterInfo::def_end | ( | ) | [inline, static] |
Definition at line 102 of file MachineRegisterInfo.h.
Referenced by def_empty(), isKilled(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), MustSaveLR(), llvm::LiveIntervals::processImplicitDefs(), and regIsPICBase().
def_empty - Return true if there are no instructions defining the specified register (it may be live-in).
Definition at line 106 of file MachineRegisterInfo.h.
References def_begin(), and def_end().
| use_iterator llvm::MachineRegisterInfo::use_begin | ( | unsigned | RegNo | ) | const [inline] |
Definition at line 110 of file MachineRegisterInfo.h.
References getRegUseDefListHead().
Referenced by dumpUses(), EmitLiveInCopy(), findOnlyInterestingUse(), HasPHIUses(), isLiveInButUnusedBefore(), llvm::LiveIntervals::processImplicitDefs(), use_empty(), and llvm::LazyLiveness::vregLiveIntoMBB().
| static use_iterator llvm::MachineRegisterInfo::use_end | ( | ) | [inline, static] |
Definition at line 113 of file MachineRegisterInfo.h.
Referenced by dumpUses(), EmitLiveInCopy(), findOnlyInterestingUse(), HasPHIUses(), isLiveInButUnusedBefore(), llvm::LiveIntervals::processImplicitDefs(), use_empty(), and llvm::LazyLiveness::vregLiveIntoMBB().
use_empty - Return true if there are no instructions using the specified register.
Definition at line 117 of file MachineRegisterInfo.h.
References use_begin(), and use_end().
Referenced by llvm::SimpleRegisterCoalescing::runOnMachineFunction(), and llvm::PHIElimination::runOnMachineFunction().
replaceRegWith - Replace all instances of FromReg with ToReg in the machine function. This is like llvm-level X->replaceAllUsesWith(Y), except that it also changes any definitions of the register as well.
replaceRegWith - Replace all instances of FromReg with ToReg in the machine function. This is like llvm-level X->replaceAllUsesWith(Y), except that it also changes any definitions of the register as well.
Definition at line 95 of file MachineRegisterInfo.cpp.
References E, llvm::SystemZCC::O, reg_begin(), reg_end(), and llvm::MachineOperand::setReg().
| MachineOperand*& llvm::MachineRegisterInfo::getRegUseDefListHead | ( | unsigned | RegNo | ) | [inline] |
getRegUseDefListHead - Return the head pointer for the register use/def list for the specified virtual or physical register.
Definition at line 127 of file MachineRegisterInfo.h.
References llvm::TargetRegisterInfo::FirstVirtualRegister.
Referenced by def_begin(), reg_begin(), and use_begin().
| MachineOperand* llvm::MachineRegisterInfo::getRegUseDefListHead | ( | unsigned | RegNo | ) | const [inline] |
Definition at line 134 of file MachineRegisterInfo.h.
References llvm::TargetRegisterInfo::FirstVirtualRegister.
| MachineInstr * MachineRegisterInfo::getVRegDef | ( | unsigned | Reg | ) | const |
getVRegDef - Return the machine instr that defines the specified virtual register or null if none is found. This assumes that the code is in SSA form, so there should only be one definition.
getVRegDef - Return the machine instr that defines the specified virtual register or null if none is found. This assumes that the code is in SSA form, so there should only be one definition.
Definition at line 110 of file MachineRegisterInfo.cpp.
References E, llvm::TargetRegisterInfo::FirstVirtualRegister, reg_begin(), and reg_end().
Referenced by llvm::LiveVariables::HandleVirtRegUse(), interferes(), isSourceDefinedByImplicitDef(), and llvm::LiveVariables::runOnMachineFunction().
| void MachineRegisterInfo::dumpUses | ( | unsigned | RegNo | ) | const |
| const TargetRegisterClass* llvm::MachineRegisterInfo::getRegClass | ( | unsigned | Reg | ) | const [inline] |
getRegClass - Return the register class of the specified virtual register.
Definition at line 156 of file MachineRegisterInfo.h.
References llvm::TargetRegisterInfo::FirstVirtualRegister.
Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::addIntervalsForSpillsFast(), addStackInterval(), llvm::VirtRegMap::assignVirt2StackSlot(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), EmitLiveInCopies(), llvm::ScheduleDAGSDNodes::EmitNode(), llvm::FastISel::FastEmitInst_extractsubreg(), LookForDuplicate(), llvm::LiveIntervals::processImplicitDefs(), and llvm::FastISel::UpdateValueMap().
| void MachineRegisterInfo::setRegClass | ( | unsigned | Reg, | |
| const TargetRegisterClass * | RC | |||
| ) |
setRegClass - Set the register class of the specified virtual register.
Definition at line 42 of file MachineRegisterInfo.cpp.
References llvm::TargetRegisterInfo::FirstVirtualRegister, llvm::TargetRegisterClass::getID(), and VR.
| unsigned MachineRegisterInfo::createVirtualRegister | ( | const TargetRegisterClass * | RegClass | ) |
createVirtualRegister - Create and return a new virtual register in the function with the specified register class.
createVirtualRegister - Create and return a new virtual register in the function with the specified register class.
Definition at line 63 of file MachineRegisterInfo.cpp.
References llvm::TargetRegisterClass::getID(), getLastVirtReg(), and VR.
Referenced by llvm::LiveIntervals::addIntervalsForSpillsFast(), AddLiveIn(), llvm::MachineFunction::addLiveIn(), llvm::X86InstrInfo::convertToThreeAddress(), llvm::FastISel::createResultReg(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::ScheduleDAG::EmitPhysRegCopy(), llvm::MipsInstrInfo::getGlobalBaseReg(), llvm::X86InstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalRetAddr(), llvm::SelectionDAGLowering::GetRegistersForValue(), LowerCTPOP(), llvm::SparcTargetLowering::LowerFormalArguments(), llvm::SPUTargetLowering::LowerFormalArguments(), LowerLOAD(), LowerSTORE(), LowerVECTOR_SHUFFLE(), llvm::FunctionLoweringInfo::MakeReg(), llvm::SelectionDAGISel::MakeReg(), and llvm::LiveIntervals::processImplicitDefs().
| unsigned llvm::MachineRegisterInfo::getLastVirtReg | ( | ) | const [inline] |
getLastVirtReg - Return the highest currently assigned virtual register.
Definition at line 173 of file MachineRegisterInfo.h.
References llvm::TargetRegisterInfo::FirstVirtualRegister.
Referenced by createVirtualRegister(), llvm::VirtRegMap::FindUnusedRegisters(), llvm::VirtRegMap::grow(), llvm::VirtRegMap::print(), and llvm::VirtRegMap::runOnMachineFunction().
| std::vector<unsigned>& llvm::MachineRegisterInfo::getRegClassVirtRegs | ( | const TargetRegisterClass * | RC | ) | [inline] |
getRegClassVirtRegs - Return the list of virtual registers of the given target register class.
Definition at line 179 of file MachineRegisterInfo.h.
References llvm::TargetRegisterClass::getID().
| void llvm::MachineRegisterInfo::setRegAllocationHint | ( | unsigned | Reg, | |
| unsigned | Type, | |||
| unsigned | PrefReg | |||
| ) | [inline] |
setRegAllocationHint - Specify a register allocation hint for the specified virtual register.
Definition at line 185 of file MachineRegisterInfo.h.
References llvm::TargetRegisterInfo::FirstVirtualRegister.
Referenced by llvm::LiveInterval::Copy(), llvm::LiveInterval::join(), and llvm::ARMBaseRegisterInfo::UpdateRegAllocHint().
| std::pair<unsigned, unsigned> llvm::MachineRegisterInfo::getRegAllocationHint | ( | unsigned | Reg | ) | const [inline] |
getRegAllocationHint - Return the register allocation hint for the specified virtual register.
Definition at line 195 of file MachineRegisterInfo.h.
References llvm::TargetRegisterInfo::FirstVirtualRegister.
Referenced by llvm::LiveInterval::Copy(), llvm::VirtRegMap::getRegAllocPref(), getRegAllocPreference(), llvm::LiveInterval::join(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), and llvm::ARMBaseRegisterInfo::UpdateRegAllocHint().
isPhysRegUsed - Return true if the specified register is used in this function. This only works after register allocation.
Definition at line 207 of file MachineRegisterInfo.h.
Referenced by llvm::SystemZRegisterInfo::emitEpilogue(), llvm::SystemZRegisterInfo::emitPrologue(), HandleVRSaveUpdate(), llvm::XCoreRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::SystemZRegisterInfo::processFunctionBeforeCalleeSavedScan(), and llvm::ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan().
| void llvm::MachineRegisterInfo::setPhysRegUsed | ( | unsigned | Reg | ) | [inline] |
setPhysRegUsed - Mark the specified register used in this function. This should only be called during and after register allocation.
Definition at line 211 of file MachineRegisterInfo.h.
Referenced by llvm::ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(), and llvm::SystemZRegisterInfo::processFunctionBeforeCalleeSavedScan().
| void llvm::MachineRegisterInfo::setPhysRegUnused | ( | unsigned | Reg | ) | [inline] |
setPhysRegUnused - Mark the specified register unused in this function. This should only be called during and after register allocation.
Definition at line 215 of file MachineRegisterInfo.h.
Referenced by llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::SPURegisterInfo::processFunctionBeforeCalleeSavedScan(), and llvm::XCoreRegisterInfo::processFunctionBeforeCalleeSavedScan().
addLiveIn/Out - Add the specified register as a live in/out. Note that it is an error to add the same register to the same set more than once.
Definition at line 224 of file MachineRegisterInfo.h.
Referenced by AddLiveIn(), llvm::MachineFunction::addLiveIn(), llvm::MipsInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalRetAddr(), llvm::SparcTargetLowering::LowerFormalArguments(), and llvm::SPUTargetLowering::LowerFormalArguments().
| void llvm::MachineRegisterInfo::addLiveOut | ( | unsigned | Reg | ) | [inline] |
Definition at line 227 of file MachineRegisterInfo.h.
Referenced by llvm::SPUTargetLowering::LowerReturn(), and llvm::SparcTargetLowering::LowerReturn().
| livein_iterator llvm::MachineRegisterInfo::livein_begin | ( | ) | const [inline] |
Definition at line 234 of file MachineRegisterInfo.h.
Referenced by EmitLiveInCopies(), llvm::X86RegisterInfo::emitPrologue(), llvm::Thumb1RegisterInfo::emitPrologue(), HandleVRSaveUpdate(), isLiveIn(), llvm::MachineFunction::print(), and llvm::SelectionDAGISel::runOnMachineFunction().
| livein_iterator llvm::MachineRegisterInfo::livein_end | ( | ) | const [inline] |
Definition at line 235 of file MachineRegisterInfo.h.
Referenced by EmitLiveInCopies(), llvm::X86RegisterInfo::emitPrologue(), llvm::Thumb1RegisterInfo::emitPrologue(), HandleVRSaveUpdate(), isLiveIn(), llvm::MachineFunction::print(), and llvm::SelectionDAGISel::runOnMachineFunction().
| bool llvm::MachineRegisterInfo::livein_empty | ( | ) | const [inline] |
| liveout_iterator llvm::MachineRegisterInfo::liveout_begin | ( | ) | const [inline] |
Definition at line 237 of file MachineRegisterInfo.h.
Referenced by HandleVRSaveUpdate(), llvm::MachineFunction::print(), and llvm::LiveVariables::runOnMachineFunction().
| liveout_iterator llvm::MachineRegisterInfo::liveout_end | ( | ) | const [inline] |
Definition at line 238 of file MachineRegisterInfo.h.
Referenced by HandleVRSaveUpdate(), llvm::MachineFunction::print(), and llvm::LiveVariables::runOnMachineFunction().
| bool llvm::MachineRegisterInfo::liveout_empty | ( | ) | const [inline] |
Definition at line 239 of file MachineRegisterInfo.h.
Referenced by llvm::SPUTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn(), and llvm::MachineFunction::print().
Definition at line 241 of file MachineRegisterInfo.h.
References E, livein_begin(), and livein_end().