LLVM API Documentation
#include <SimpleRegisterCoalescing.h>


Public Member Functions | |
| SimpleRegisterCoalescing () | |
| virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
| virtual void | releaseMemory () |
| virtual bool | runOnMachineFunction (MachineFunction &) |
| runOnMachineFunction - pass entry point | |
| bool | coalesceFunction (MachineFunction &mf, RegallocQuery &) |
| unsigned | getRepIntervalSize (unsigned Reg) |
| virtual void | print (std::ostream &O, const Module *=0) const |
| print - Implement the dump method. | |
| void | print (std::ostream *O, const Module *M=0) const |
Static Public Attributes | |
| static char | ID = 0 |
Classes | |
| struct | InstrSlots |
Definition at line 76 of file SimpleRegisterCoalescing.h.
| llvm::SimpleRegisterCoalescing::SimpleRegisterCoalescing | ( | ) | [inline] |
Definition at line 107 of file SimpleRegisterCoalescing.h.
| void SimpleRegisterCoalescing::getAnalysisUsage | ( | AnalysisUsage & | AU | ) | const [virtual] |
Register allocators must call this from their own getAnalysisUsage to cover the case where the coalescer is not a Pass in the proper sense and isn't managed by PassManager. PassManager needs to know which analyses to make available and which to invalidate when running the register allocator or any pass that might call coalescing. The long-term solution is to allow hierarchies of PassManagers.
Reimplemented from llvm::RegisterCoalescer.
Definition at line 70 of file SimpleRegisterCoalescing.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addPreservedID(), llvm::AnalysisUsage::addRequired(), llvm::Pass::getAnalysisUsage(), llvm::MachineDominatorsID, llvm::PHIEliminationID, llvm::StrongPHIElim, llvm::StrongPHIEliminationID, and llvm::TwoAddressInstructionPassID.
| void SimpleRegisterCoalescing::releaseMemory | ( | ) | [virtual] |
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 2249 of file SimpleRegisterCoalescing.cpp.
| bool SimpleRegisterCoalescing::runOnMachineFunction | ( | MachineFunction & | fn | ) | [virtual] |
runOnMachineFunction - pass entry point
Implements llvm::MachineFunctionPass.
Definition at line 2302 of file SimpleRegisterCoalescing.cpp.
References llvm::SmallVectorImpl< T >::back(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), llvm::LiveIntervals::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallSet< T, N >::count(), DEBUG, DOUT, E, llvm::SmallVectorImpl< T >::empty(), EnableJoining, llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::LiveIntervals::end(), llvm::TargetInstrInfo::EXTRACT_SUBREG, llvm::TargetRegisterInfo::getAllocatableSet(), llvm::LiveIntervals::getApproximateInstructionCount(), llvm::MachineFunction::getFunction(), llvm::TargetMachine::getInstrInfo(), llvm::LiveIntervals::getInterval(), llvm::Intrinsic::getName(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::TargetMachine::getRegisterInfo(), llvm::LiveIntervals::getSpillWeight(), llvm::MachineFunction::getTarget(), llvm::LiveIntervals::hasInterval(), HUGE_VALF, if(), llvm::SmallSet< T, N >::insert(), llvm::TargetInstrInfo::INSERT_SUBREG, llvm::MachineOperand::isDead(), llvm::MachineOperand::isDef(), llvm::TargetInstrInfo::isMoveInstr(), llvm::TargetRegisterInfo::isPhysicalRegister(), llvm::MachineOperand::isReg(), llvm::LiveIntervals::isReMaterializable(), llvm::MachineOperand::isUse(), llvm::TargetRegisterInfo::isVirtualRegister(), isZeroLengthInterval(), llvm::SimpleRegisterCoalescing::InstrSlots::NUM, llvm::SmallVectorImpl< T >::pop_back(), llvm::LiveInterval::preference, llvm::SmallVectorImpl< T >::push_back(), llvm::LiveInterval::reg, llvm::TargetRegisterInfo::regclass_begin(), llvm::TargetRegisterInfo::regclass_end(), llvm::MachineInstr::registerDefIsDead(), llvm::LiveIntervals::RemoveMachineInstrFromMaps(), llvm::MachineRegisterInfo::use_empty(), and llvm::LiveInterval::weight.
| bool llvm::SimpleRegisterCoalescing::coalesceFunction | ( | MachineFunction & | mf, | |
| RegallocQuery & | ifd | |||
| ) | [inline, virtual] |
Run the coalescer on this function, providing interference data to query. Return whether we removed any copies.
Implements llvm::RegisterCoalescer.
Definition at line 125 of file SimpleRegisterCoalescing.h.
getRepIntervalSize - Called from join priority queue sorting function. It returns the size of the interval that represent the given register.
Definition at line 132 of file SimpleRegisterCoalescing.h.
References llvm::LiveIntervals::getApproximateInstructionCount(), llvm::LiveIntervals::getInterval(), llvm::LiveIntervals::hasInterval(), and llvm::LiveIntervals::InstrSlots::NUM.
Referenced by llvm::JoinPriorityQueue< SF >::getRepIntervalSize().
| void SimpleRegisterCoalescing::print | ( | std::ostream & | O, | |
| const Module * | m = 0 | |||
| ) | const [virtual] |
print - Implement the dump method.
Reimplemented from llvm::Pass.
Definition at line 2472 of file SimpleRegisterCoalescing.cpp.
References llvm::LiveIntervals::print().
Referenced by print().
| void llvm::SimpleRegisterCoalescing::print | ( | std::ostream * | O, | |
| const Module * | M = 0 | |||
| ) | const [inline] |
char SimpleRegisterCoalescing::ID = 0 [static] |
Reimplemented from llvm::RegisterCoalescer.
Definition at line 106 of file SimpleRegisterCoalescing.h.
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.