LLVM API Documentation

llvm::MachineFunction Class Reference

#include <MachineFunction.h>

Collaboration diagram for llvm::MachineFunction:
[legend]

List of all members.

Public Types

typedef
BasicBlockListType::iterator 
iterator
typedef
BasicBlockListType::const_iterator 
const_iterator
typedef std::reverse_iterator
< const_iterator > 
const_reverse_iterator
typedef std::reverse_iterator
< iterator > 
reverse_iterator

Public Member Functions

 MachineFunction (Function *Fn, const TargetMachine &TM)
 ~MachineFunction ()
Function * getFunction () const
const TargetMachine & getTarget () const
MachineRegisterInfo & getRegInfo ()
const MachineRegisterInfo & getRegInfo () const
MachineFrameInfo * getFrameInfo ()
const MachineFrameInfo * getFrameInfo () const
MachineJumpTableInfo * getJumpTableInfo ()
const MachineJumpTableInfo * getJumpTableInfo () const
MachineConstantPool * getConstantPool ()
const MachineConstantPool * getConstantPool () const
unsigned getAlignment () const
void setAlignment (unsigned A)
template<typename Ty>
Ty * getInfo ()
template<typename Ty>
const Ty * getInfo () const
MachineBasicBlock * getBlockNumbered (unsigned N) const
unsigned getNumBlockIDs () const
void RenumberBlocks (MachineBasicBlock *MBBFrom=0)
void print (std::ostream &OS, const PrefixPrinter &prefix=PrefixPrinter()) const
void print (std::ostream *OS, const PrefixPrinter &prefix=PrefixPrinter()) const
void viewCFG () const
void viewCFGOnly () const
void dump () const
unsigned addLiveIn (unsigned PReg, const TargetRegisterClass *RC)
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
unsigned size () const
bool empty () const
const MachineBasicBlock & front () const
MachineBasicBlock & front ()
const MachineBasicBlock & back () const
MachineBasicBlock & back ()
void push_back (MachineBasicBlock *MBB)
void push_front (MachineBasicBlock *MBB)
void insert (iterator MBBI, MachineBasicBlock *MBB)
void splice (iterator InsertPt, iterator MBBI)
void remove (iterator MBBI)
void erase (iterator MBBI)
unsigned addToMBBNumbering (MachineBasicBlock *MBB)
void removeFromMBBNumbering (unsigned N)
MachineInstr * CreateMachineInstr (const TargetInstrDesc &TID, DebugLoc DL, bool NoImp=false)
MachineInstr * CloneMachineInstr (const MachineInstr *Orig)
void DeleteMachineInstr (MachineInstr *MI)
MachineBasicBlock * CreateMachineBasicBlock (const BasicBlock *bb=0)
void DeleteMachineBasicBlock (MachineBasicBlock *MBB)
unsigned getOrCreateDebugLocID (GlobalVariable *CompileUnit, unsigned Line, unsigned Col)
DebugLocTuple getDebugLocTuple (DebugLoc DL) const
 getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object.
DebugLoc getDefaultDebugLoc () const
void setDefaultDebugLoc (DebugLoc DL)
DebugLocTracker & getDebugLocInfo ()
 getDebugLocInfo - Get the debug info location tracker.


Detailed Description

Definition at line 70 of file MachineFunction.h.


Member Typedef Documentation

typedef BasicBlockListType::iterator llvm::MachineFunction::iterator

Definition at line 238 of file MachineFunction.h.

typedef BasicBlockListType::const_iterator llvm::MachineFunction::const_iterator

Definition at line 239 of file MachineFunction.h.

Definition at line 240 of file MachineFunction.h.

typedef std::reverse_iterator<iterator> llvm::MachineFunction::reverse_iterator

Definition at line 241 of file MachineFunction.h.


Constructor & Destructor Documentation

MachineFunction::MachineFunction ( Function *  Fn,
const TargetMachine &  TM 
)

MachineFunction::~MachineFunction (  ) 


Member Function Documentation

Function* llvm::MachineFunction::getFunction (  )  const [inline]

getFunction - Return the LLVM function that this machine code represents

Definition at line 124 of file MachineFunction.h.

Referenced by llvm::PIC16DbgInfo::BeginFunction(), llvm::DwarfException::BeginFunction(), llvm::PPCRegisterInfo::determineFrameLayout(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::AsmPrinter::EmitConstantPool(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::X86ATTAsmPrinter::emitFunctionHeader(), llvm::AsmPrinter::EmitJumpTableInfo(), llvm::Thumb2RegisterInfo::emitLoadConstPool(), llvm::Thumb1RegisterInfo::emitLoadConstPool(), llvm::ARMBaseRegisterInfo::emitLoadConstPool(), llvm::X86RegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), llvm::PIC16DbgInfo::EndFunction(), llvm::DwarfException::EndFunction(), llvm::PIC16TargetLowering::ExpandFrameIndex(), llvm::ELFCodeEmitter::finishFunction(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::AsmPrinter::getCurrentFunctionEHName(), llvm::DOTGraphTraits< SelectionDAG * >::getGraphName(), llvm::DOTGraphTraits< ScheduleDAG * >::getGraphName(), llvm::DOTGraphTraits< const MachineFunction * >::getGraphName(), llvm::X86TargetLowering::getOptimalMemOpType(), llvm::SelectionDAG::init(), llvm::X86TargetLowering::IsEligibleForTailCallOptimization(), llvm::PPCTargetLowering::IsEligibleForTailCallOptimization(), llvm::PIC16InstrInfo::loadRegFromStackSlot(), llvm::PIC16TargetLowering::LowerFormalArguments(), llvm::PIC16TargetLowering::LowerReturn(), llvm::XCoreRegisterInfo::needsFrameMoves(), PerformSTORECombine(), llvm::AsmPrinter::PrintSpecial(), llvm::XCoreRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::X86IntelAsmPrinter::runOnMachineFunction(), llvm::X86ATTAsmPrinter::runOnMachineFunction(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::PEI::runOnMachineFunction(), llvm::AsmPrinter::SetupMachineFunction(), llvm::MachOCodeEmitter::startFunction(), llvm::ELFCodeEmitter::startFunction(), llvm::PIC16InstrInfo::storeRegToStackSlot(), viewCFG(), viewCFGOnly(), and llvm::ScheduleDAG::viewGraph().

const TargetMachine& llvm::MachineFunction::getTarget (  )  const [inline]

getTarget - Return the target machine this machine code is compiled with

Definition at line 128 of file MachineFunction.h.

Referenced by llvm::MipsRegisterInfo::adjustMipsStackFrame(), CalculateParameterAndLinkageAreaSize(), ComputeReloadLoc(), llvm::SPURegisterInfo::determineFrameLayout(), llvm::PPCRegisterInfo::determineFrameLayout(), llvm::XCoreRegisterInfo::eliminateCallFramePseudoInstr(), llvm::Thumb1RegisterInfo::eliminateCallFramePseudoInstr(), llvm::ARMBaseRegisterInfo::eliminateCallFramePseudoInstr(), llvm::AlphaRegisterInfo::eliminateCallFramePseudoInstr(), llvm::X86RegisterInfo::emitCalleeSavedFrameMoves(), llvm::JITDwarfEmitter::EmitDwarfTable(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitPrologue(), llvm::SystemZRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::MipsRegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), llvm::RegScavenger::enterBasicBlock(), llvm::JITDwarfEmitter::GetDwarfTableSizeInBytes(), llvm::X86RegisterInfo::getFrameIndexOffset(), llvm::TargetRegisterInfo::getFrameIndexOffset(), llvm::SystemZRegisterInfo::getFrameIndexOffset(), llvm::BlackfinRegisterInfo::getFrameIndexOffset(), llvm::MipsInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalRetAddr(), llvm::PPCInstrInfo::GetInstSizeInBytes(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), GetInstSizeWithDesc(), llvm::MachineFrameInfo::getPristineRegs(), llvm::SelectionDAG::getTarget(), isSchedulingBoundary(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::VirtRegMap::print(), llvm::MachineOperand::print(), llvm::MachineFrameInfo::print(), print(), llvm::MachineBasicBlock::print(), llvm::X86RegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::MipsRegisterInfo::processFunctionBeforeFrameFinalized(), llvm::SystemZInstrInfo::restoreCalleeSavedRegisters(), llvm::VirtRegMap::runOnMachineFunction(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::PEI::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::LiveIntervals::runOnMachineFunction(), llvm::FunctionLoweringInfo::set(), and llvm::SplitCriticalMachineEdge().

MachineRegisterInfo& llvm::MachineFunction::getRegInfo (  )  [inline]

getRegInfo - Return information about the registers currently in use.

Definition at line 132 of file MachineFunction.h.

Referenced by addLiveIn(), AddLiveIn(), llvm::VirtRegMap::assignVirt2StackSlot(), llvm::MachineOperand::ChangeToRegister(), llvm::PPCTargetLowering::EmitAtomicBinary(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitInstrWithCustomInserter(), llvm::ARMTargetLowering::EmitInstrWithCustomInserter(), llvm::AlphaTargetLowering::EmitInstrWithCustomInserter(), llvm::PPCTargetLowering::EmitPartwordAtomicBinary(), llvm::X86RegisterInfo::emitPrologue(), llvm::Thumb1RegisterInfo::emitPrologue(), llvm::SystemZRegisterInfo::emitPrologue(), llvm::RegScavenger::enterBasicBlock(), llvm::VirtRegMap::FindUnusedRegisters(), llvm::X86InstrInfo::getGlobalBaseReg(), llvm::MipsInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalRetAddr(), llvm::SelectionDAGLowering::GetRegistersForValue(), llvm::VirtRegMap::grow(), HandleVRSaveUpdate(), interferes(), llvm::X86InstrInfo::isReallyTriviallyReMaterializable(), LowerCTPOP(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), LowerLOAD(), llvm::SPUTargetLowering::LowerReturn(), llvm::SparcTargetLowering::LowerReturn(), LowerSTORE(), LowerVECTOR_SHUFFLE(), MustSaveLR(), llvm::VirtRegMap::print(), llvm::XCoreRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::SystemZRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::SPURegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::VirtRegMap::runOnMachineFunction(), llvm::SimpleRegisterCoalescing::runOnMachineFunction(), llvm::PHIElimination::runOnMachineFunction(), llvm::LiveVariables::runOnMachineFunction(), llvm::LiveIntervals::runOnMachineFunction(), llvm::LazyLiveness::runOnMachineFunction(), llvm::FunctionLoweringInfo::set(), llvm::MachineOperand::setReg(), and llvm::ARMBaseRegisterInfo::UpdateRegAllocHint().

const MachineRegisterInfo& llvm::MachineFunction::getRegInfo (  )  const [inline]

Definition at line 133 of file MachineFunction.h.

MachineFrameInfo* llvm::MachineFunction::getFrameInfo (  )  [inline]

getFrameInfo - Return the frame info object for the current function. This object contains information about objects allocated on the stack frame of the current function in an abstract way.

Definition at line 139 of file MachineFunction.h.

Referenced by llvm::addFrameReference(), llvm::VirtRegMap::addSpillSlotUse(), llvm::MipsRegisterInfo::adjustMipsStackFrame(), llvm::VirtRegMap::assignVirt2StackSlot(), CalculateTailCallArgDest(), llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), llvm::SelectionDAG::CreateStackTemporary(), llvm::SPURegisterInfo::determineFrameLayout(), llvm::PPCRegisterInfo::determineFrameLayout(), llvm::XCoreRegisterInfo::eliminateFrameIndex(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::SPURegisterInfo::eliminateFrameIndex(), llvm::SparcRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::MSP430RegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::AlphaRegisterInfo::eliminateFrameIndex(), llvm::X86RegisterInfo::emitCalleeSavedFrameMoves(), llvm::XCoreRegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitEpilogue(), llvm::Thumb1RegisterInfo::emitEpilogue(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::SPURegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::MSP430RegisterInfo::emitEpilogue(), llvm::MipsRegisterInfo::emitEpilogue(), llvm::BlackfinRegisterInfo::emitEpilogue(), llvm::ARMBaseRegisterInfo::emitEpilogue(), llvm::AlphaRegisterInfo::emitEpilogue(), llvm::X86TargetLowering::EmitInstrWithCustomInserter(), llvm::XCoreRegisterInfo::emitPrologue(), llvm::X86RegisterInfo::emitPrologue(), llvm::Thumb1RegisterInfo::emitPrologue(), llvm::SystemZRegisterInfo::emitPrologue(), llvm::SPURegisterInfo::emitPrologue(), llvm::SparcRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::MSP430RegisterInfo::emitPrologue(), llvm::MipsRegisterInfo::emitPrologue(), llvm::BlackfinRegisterInfo::emitPrologue(), llvm::ARMBaseRegisterInfo::emitPrologue(), llvm::AlphaRegisterInfo::emitPrologue(), EmitTailCallStoreFPAndRetAddr(), EmitTailCallStoreRetAddr(), llvm::DwarfException::EndFunction(), estimateStackSize(), llvm::TargetInstrInfo::foldMemoryOperand(), llvm::X86InstrInfo::foldMemoryOperandImpl(), llvm::X86RegisterInfo::getCalleeSavedRegClasses(), llvm::X86RegisterInfo::getCalleeSavedRegs(), llvm::VirtRegMap::getEmergencySpillSlot(), llvm::X86RegisterInfo::getFrameIndexOffset(), llvm::TargetRegisterInfo::getFrameIndexOffset(), llvm::SystemZRegisterInfo::getFrameIndexOffset(), llvm::BlackfinRegisterInfo::getFrameIndexOffset(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::XCoreRegisterInfo::hasFP(), llvm::X86RegisterInfo::hasFP(), llvm::SystemZRegisterInfo::hasFP(), llvm::SPURegisterInfo::hasFP(), llvm::PPCRegisterInfo::hasFP(), llvm::MSP430RegisterInfo::hasFP(), llvm::MipsRegisterInfo::hasFP(), llvm::BlackfinRegisterInfo::hasFP(), llvm::ARMBaseRegisterInfo::hasFP(), llvm::AlphaRegisterInfo::hasFP(), llvm::X86RegisterInfo::hasReservedCallFrame(), llvm::Thumb1RegisterInfo::hasReservedCallFrame(), llvm::MSP430RegisterInfo::hasReservedCallFrame(), llvm::ARMBaseRegisterInfo::hasReservedCallFrame(), llvm::X86RegisterInfo::hasReservedSpillSlot(), InferAlignment(), llvm::RegScavenger::initRegState(), llvm::XCoreInstrInfo::isInvariantLoad(), llvm::X86InstrInfo::isInvariantLoad(), llvm::SystemZInstrInfo::isInvariantLoad(), llvm::PPCRegisterInfo::lowerDynamicAlloc(), llvm::SPUTargetLowering::LowerFormalArguments(), llvm::SparcTargetLowering::LowerFormalArguments(), MeetsMaxMemopRequirement(), needsFP(), llvm::XCoreRegisterInfo::needsFrameMoves(), llvm::X86RegisterInfo::needsStackRealignment(), PerformShuffleCombine(), llvm::XCoreRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::X86RegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::SystemZRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::BlackfinRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::PPCRegisterInfo::processFunctionBeforeFrameFinalized(), llvm::MSP430RegisterInfo::processFunctionBeforeFrameFinalized(), llvm::MipsRegisterInfo::processFunctionBeforeFrameFinalized(), llvm::VirtRegMap::RemoveMachineInstrFromMaps(), llvm::PEI::runOnMachineFunction(), llvm::FunctionLoweringInfo::set(), and llvm::XCoreInstrInfo::spillCalleeSavedRegisters().

const MachineFrameInfo* llvm::MachineFunction::getFrameInfo (  )  const [inline]

Definition at line 140 of file MachineFunction.h.

MachineJumpTableInfo* llvm::MachineFunction::getJumpTableInfo (  )  [inline]

getJumpTableInfo - Return the jump table info object for the current function. This object contains information about jump tables for switch instructions in the current function.

Definition at line 146 of file MachineFunction.h.

Referenced by llvm::MachOCodeEmitter::finishFunction(), llvm::ELFCodeEmitter::finishFunction(), llvm::ARMBaseInstrInfo::GetInstSizeInBytes(), llvm::X86IntelAsmPrinter::runOnMachineFunction(), llvm::X86ATTAsmPrinter::runOnMachineFunction(), and llvm::ELFCodeEmitter::startFunction().

const MachineJumpTableInfo* llvm::MachineFunction::getJumpTableInfo (  )  const [inline]

Definition at line 147 of file MachineFunction.h.

MachineConstantPool* llvm::MachineFunction::getConstantPool (  )  [inline]

const MachineConstantPool* llvm::MachineFunction::getConstantPool (  )  const [inline]

Definition at line 153 of file MachineFunction.h.

unsigned llvm::MachineFunction::getAlignment (  )  const [inline]

getAlignment - Return the alignment (log2, not bytes) of the function.

Definition at line 157 of file MachineFunction.h.

Referenced by llvm::X86ATTAsmPrinter::emitFunctionHeader(), llvm::X86IntelAsmPrinter::runOnMachineFunction(), and llvm::ELFCodeEmitter::startFunction().

void llvm::MachineFunction::setAlignment ( unsigned  A  )  [inline]

setAlignment - Set the alignment (log2, not bytes) of the function.

Definition at line 161 of file MachineFunction.h.

template<typename Ty>
Ty* llvm::MachineFunction::getInfo (  )  [inline]

MachineFunctionInfo - Keep track of various per-function pieces of information for backends that would like to do so.

Definition at line 167 of file MachineFunction.h.

References llvm::BumpPtrAllocator::Allocate(), and Ty.

Referenced by llvm::MipsRegisterInfo::adjustMipsStackFrame(), CalculateTailCallSPDiff(), llvm::ARMBaseRegisterInfo::eliminateCallFramePseudoInstr(), llvm::Thumb1RegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::XCoreRegisterInfo::emitEpilogue(), llvm::X86RegisterInfo::emitEpilogue(), llvm::Thumb1RegisterInfo::emitEpilogue(), llvm::SystemZRegisterInfo::emitEpilogue(), llvm::PPCRegisterInfo::emitEpilogue(), llvm::MSP430RegisterInfo::emitEpilogue(), llvm::MipsRegisterInfo::emitEpilogue(), llvm::ARMBaseRegisterInfo::emitEpilogue(), llvm::XCoreRegisterInfo::emitPrologue(), llvm::X86RegisterInfo::emitPrologue(), llvm::Thumb1RegisterInfo::emitPrologue(), llvm::SystemZRegisterInfo::emitPrologue(), llvm::PPCRegisterInfo::emitPrologue(), llvm::MSP430RegisterInfo::emitPrologue(), llvm::MipsRegisterInfo::emitPrologue(), llvm::ARMBaseRegisterInfo::emitPrologue(), llvm::X86RegisterInfo::getFrameIndexOffset(), llvm::SystemZRegisterInfo::getFrameIndexOffset(), llvm::X86InstrInfo::getGlobalBaseReg(), llvm::MipsInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalBaseReg(), llvm::AlphaInstrInfo::getGlobalRetAddr(), llvm::X86TargetLowering::getReturnAddressFrameIndex(), llvm::X86RegisterInfo::hasFP(), llvm::ARMJITInfo::Initialize(), llvm::ARMBaseInstrInfo::InsertBranch(), MustSaveLR(), needsFP(), llvm::XCoreRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::X86RegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::PPCRegisterInfo::processFunctionBeforeFrameFinalized(), llvm::MipsRegisterInfo::processFunctionBeforeFrameFinalized(), llvm::Thumb1InstrInfo::restoreCalleeSavedRegisters(), llvm::SystemZInstrInfo::restoreCalleeSavedRegisters(), llvm::X86IntelAsmPrinter::runOnMachineFunction(), llvm::X86ATTAsmPrinter::runOnMachineFunction(), llvm::XCoreInstrInfo::spillCalleeSavedRegisters(), llvm::X86InstrInfo::spillCalleeSavedRegisters(), llvm::SystemZInstrInfo::spillCalleeSavedRegisters(), llvm::MSP430InstrInfo::spillCalleeSavedRegisters(), spillsCR(), and llvm::PPCInstrInfo::storeRegToStackSlot().

template<typename Ty>
const Ty* llvm::MachineFunction::getInfo (  )  const [inline]

Definition at line 182 of file MachineFunction.h.

MachineBasicBlock* llvm::MachineFunction::getBlockNumbered ( unsigned  N  )  const [inline]

getBlockNumbered - MachineBasicBlocks are automatically numbered when they are inserted into the machine function. The block number for a machine basic block can be found by using the MBB::getBlockNumber method, this method provides the inverse mapping.

Definition at line 191 of file MachineFunction.h.

unsigned llvm::MachineFunction::getNumBlockIDs (  )  const [inline]

getNumBlockIDs - Return the number of MBB ID's allocated.

Definition at line 199 of file MachineFunction.h.

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveIntervals::computeNumbering(), and llvm::LiveVariables::runOnMachineFunction().

void MachineFunction::RenumberBlocks ( MachineBasicBlock *  MBB = 0  ) 

RenumberBlocks - This discards all of the MachineBasicBlock numbers and recomputes them. This guarantees that the MBB numbers are sequential, dense, and match the ordering of the blocks within the function. If a specific MachineBasicBlock is specified, only that block and those after it are renumbered.

RenumberBlocks - This discards all of the MachineBasicBlock numbers and recomputes them. This guarantees that the MBB numbers are sequential, dense, and match the ordering of the blocks within the function. If a specific MachineBasicBlock is specified, only that block and those after it are renumbered.

Definition at line 131 of file MachineFunction.cpp.

References begin(), E, empty(), end(), MBBI, and llvm::prior().

void MachineFunction::print ( std::ostream &  OS,
const PrefixPrinter &  prefix = PrefixPrinter() 
) const

void llvm::MachineFunction::print ( std::ostream *  OS,
const PrefixPrinter &  prefix = PrefixPrinter() 
) const [inline]

Definition at line 213 of file MachineFunction.h.

References print().

void MachineFunction::viewCFG (  )  const

viewCFG - This function is meant for use from the debugger. You can just say 'call F->viewCFG()' and a ghostview window should pop up from the program, displaying the CFG of the current function with the code for each basic block inside. This depends on there being a 'dot' and 'gv' program in your path.

Definition at line 310 of file MachineFunction.cpp.

References llvm::cerr(), getFunction(), and llvm::ViewGraph().

void MachineFunction::viewCFGOnly (  )  const

viewCFGOnly - This function is meant for use from the debugger. It works just like viewCFG, but it does not include the contents of basic blocks into the nodes, just the label. If you are only interested in the CFG this can make the graph smaller.

Definition at line 320 of file MachineFunction.cpp.

References llvm::cerr(), getFunction(), and llvm::ViewGraph().

void MachineFunction::dump (  )  const

dump - Print the current MachineFunction to cerr, useful for debugger use.

Definition at line 219 of file MachineFunction.cpp.

References llvm::cerr(), and print().

unsigned MachineFunction::addLiveIn ( unsigned  PReg,
const TargetRegisterClass *  RC 
)

addLiveIn - Add the specified physical register as a live-in value and create a corresponding virtual register for it.

addLiveIn - Add the specified physical register as a live-in value and create a corresponding virtual register for it.

Definition at line 332 of file MachineFunction.cpp.

References llvm::MachineRegisterInfo::addLiveIn(), llvm::TargetRegisterClass::contains(), llvm::MachineRegisterInfo::createVirtualRegister(), and getRegInfo().

iterator llvm::MachineFunction::begin (  )  [inline]

const_iterator llvm::MachineFunction::begin (  )  const [inline]

Definition at line 251 of file MachineFunction.h.

iterator llvm::MachineFunction::end (  )  [inline]

const_iterator llvm::MachineFunction::end (  )  const [inline]

Definition at line 253 of file MachineFunction.h.

reverse_iterator llvm::MachineFunction::rbegin (  )  [inline]

Definition at line 255 of file MachineFunction.h.

const_reverse_iterator llvm::MachineFunction::rbegin (  )  const [inline]

Definition at line 256 of file MachineFunction.h.

reverse_iterator llvm::MachineFunction::rend (  )  [inline]

Definition at line 257 of file MachineFunction.h.

const_reverse_iterator llvm::MachineFunction::rend (  )  const [inline]

Definition at line 258 of file MachineFunction.h.

unsigned llvm::MachineFunction::size (  )  const [inline]

Definition at line 260 of file MachineFunction.h.

Referenced by llvm::LazyLiveness::runOnMachineFunction().

bool llvm::MachineFunction::empty (  )  const [inline]

Definition at line 261 of file MachineFunction.h.

Referenced by RenumberBlocks().

const MachineBasicBlock& llvm::MachineFunction::front (  )  const [inline]

MachineBasicBlock& llvm::MachineFunction::front (  )  [inline]

Definition at line 263 of file MachineFunction.h.

const MachineBasicBlock& llvm::MachineFunction::back (  )  const [inline]

Definition at line 264 of file MachineFunction.h.

MachineBasicBlock& llvm::MachineFunction::back (  )  [inline]

Definition at line 265 of file MachineFunction.h.

void llvm::MachineFunction::push_back ( MachineBasicBlock *  MBB  )  [inline]

void llvm::MachineFunction::push_front ( MachineBasicBlock *  MBB  )  [inline]

Definition at line 268 of file MachineFunction.h.

void llvm::MachineFunction::insert ( iterator  MBBI,
MachineBasicBlock *  MBB 
) [inline]

void llvm::MachineFunction::splice ( iterator  InsertPt,
iterator  MBBI 
) [inline]

void llvm::MachineFunction::remove ( iterator  MBBI  )  [inline]

Definition at line 276 of file MachineFunction.h.

References MBBI.

Referenced by llvm::MachineBasicBlock::removeFromParent().

void llvm::MachineFunction::erase ( iterator  MBBI  )  [inline]

Definition at line 279 of file MachineFunction.h.

Referenced by llvm::MachineBasicBlock::eraseFromParent().

unsigned llvm::MachineFunction::addToMBBNumbering ( MachineBasicBlock *  MBB  )  [inline]

getNextMBBNumber - Returns the next unique number to be assigned to a MachineBasicBlock in this MachineFunction.

Definition at line 290 of file MachineFunction.h.

void llvm::MachineFunction::removeFromMBBNumbering ( unsigned  N  )  [inline]

removeFromMBBNumbering - Remove the specific machine basic block from our tracker, this is only really to be used by the MachineBasicBlock implementation.

Definition at line 298 of file MachineFunction.h.

MachineInstr * MachineFunction::CreateMachineInstr ( const TargetInstrDesc &  TID,
DebugLoc  DL,
bool  NoImp = false 
)

CreateMachineInstr - Allocate a new MachineInstr. Use this instead of `new MachineInstr'.

CreateMachineInstr - Allocate a new MachineInstr. Use this instead of `new MachineInstr'.

Definition at line 172 of file MachineFunction.cpp.

References MachineInstr.

Referenced by llvm::BuildMI(), FuseInst(), FuseTwoAddrInst(), and llvm::X86InstrInfo::unfoldMemoryOperand().

MachineInstr * MachineFunction::CloneMachineInstr ( const MachineInstr *  Orig  ) 

CloneMachineInstr - Create a new MachineInstr which is a copy of the 'Orig' instruction, identical in all ways except the the instruction has no parent, prev, or next.

CloneMachineInstr - Create a new MachineInstr which is a copy of the 'Orig' instruction, identical in all ways except the the instruction has no parent, prev, or next.

Definition at line 183 of file MachineFunction.cpp.

References MachineInstr.

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::X86InstrInfo::commuteInstruction(), llvm::ARMInstrInfo::reMaterialize(), llvm::TargetInstrInfoImpl::reMaterialize(), and llvm::X86InstrInfo::reMaterialize().

void MachineFunction::DeleteMachineInstr ( MachineInstr *  MI  ) 

MachineBasicBlock * MachineFunction::CreateMachineBasicBlock ( const BasicBlock *  bb = 0  ) 

void MachineFunction::DeleteMachineBasicBlock ( MachineBasicBlock *  MBB  ) 

DeleteMachineBasicBlock - Delete the given MachineBasicBlock.

Definition at line 213 of file MachineFunction.cpp.

References llvm::MachineBasicBlock::getParent(), and llvm::MachineBasicBlock::~MachineBasicBlock().

unsigned MachineFunction::getOrCreateDebugLocID ( GlobalVariable *  CompileUnit,
unsigned  Line,
unsigned  Col 
)

getOrCreateDebugLocID - Look up the DebugLocTuple index with the given source file, line, and column. If none currently exists, create a new DebugLocTuple, and insert it into the DebugIdMap.

getOrCreateDebugLocID - Look up the DebugLocTuple index with the given source file, line, and column. If none currently exists, create a new DebugLocTuple, and insert it into the DebugIdMap.

Definition at line 343 of file MachineFunction.cpp.

References llvm::DebugLocTracker::DebugIdMap, llvm::DebugLocTracker::DebugLocations, and II.

DebugLocTuple MachineFunction::getDebugLocTuple ( DebugLoc  DL  )  const

DebugLoc llvm::MachineFunction::getDefaultDebugLoc (  )  const [inline]

getDefaultDebugLoc - Get the default debug location for the machine function.

Definition at line 344 of file MachineFunction.h.

Referenced by llvm::DwarfDebug::BeginFunction().

void llvm::MachineFunction::setDefaultDebugLoc ( DebugLoc  DL  )  [inline]

setDefaultDebugLoc - Get the default debug location for the machine function.

Definition at line 348 of file MachineFunction.h.

DebugLocTracker& llvm::MachineFunction::getDebugLocInfo (  )  [inline]

getDebugLocInfo - Get the debug info location tracker.

Definition at line 351 of file MachineFunction.h.

Referenced by llvm::FunctionLoweringInfo::set().


The documentation for this class was generated from the following files: