Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
briggs_reg_alloc Class Reference#include <briggs_reg_alloc.h>
Inheritance diagram for briggs_reg_alloc:
List of all members.
Member Function Documentation
void briggs_reg_alloc::adjustNeighbors |
( |
int |
reg |
) |
[protected] |
|
void briggs_reg_alloc::allocate |
( |
procNode * |
proc |
) |
[virtual] |
|
|
Implements reg_alloc.
Definition at line 1301 of file briggs_reg_alloc.cc.
References CBZ::ArchInfo, assignRegisters(), buildAdjLists(), buildAdjMatrix(), coalesceRegisters(), computeSpillCosts(), lir_flow_walker::find_loops(), genSpillCode(), arch_info::get_all_regs(), arch_info::get_regs_fpr(), arch_info::get_regs_gpr(), makeDuChains(), makeWebs(), modifyCode(), num_regs, proc, pruneGraph(), sduList, and usable_regs.
Referenced by RegAllocWalker::at_proc(). |
bool briggs_reg_alloc::assignRegisters |
( |
|
) |
[protected] |
|
|
Definition at line 1008 of file briggs_reg_alloc.cc.
References arch_info::register_info::_id, adjLists, CBZ::ArchInfo, colorToRealReg, arch_info::get_reg_retval_fixed(), arch_info::get_reg_retval_float(), arch_info::get_regs_fpr(), arch_info::get_regs_gpr(), ListRecord::getColor(), WebRecord::getSpill(), nodeStack, num_regs, removeUnavailableColors(), and Symreg.
Referenced by allocate(). |
void briggs_reg_alloc::buildAdjLists |
( |
|
) |
[protected] |
|
void briggs_reg_alloc::buildAdjMatrix |
( |
|
) |
[protected] |
|
|
Definition at line 680 of file briggs_reg_alloc.cc.
References arch_info::register_info::_id, adjMatrix, CBZ::ArchInfo, lir_flow_walker::computeRegisterLiveness(), DUChainDefs, DUChainDefs_p, arch_info::get_reg_fp(), arch_info::get_reg_sp(), procNode::instructions(), interfere(), liveAt(), liveRegs, num_regs, num_webs, proc, Symreg, and Register::to_string().
Referenced by allocate(). |
void briggs_reg_alloc::changeWebRegister |
( |
WebRecord * |
web, |
|
|
const Register & |
newReg |
|
) |
[protected] |
|
|
Definition at line 1119 of file briggs_reg_alloc.cc.
References reg_or_const::_reg, def, LirInst::dest, DUChainDefs, WebRecord::getDefs(), WebRecord::getReg(), WebRecord::getUses(), LirInst::has_base(), LirInst::has_dest(), LirInst::has_offset(), LirInst::has_opnd1(), LirInst::has_opnd2(), LirInst::memBase, LirInst::memOffset, LirInst::nodeExtra, LirInst::opnd1, LirInst::opnd2, and use.
Referenced by coalesceRegisters(), makeWebs(), and modifyCode(). |
bool briggs_reg_alloc::coalesceRegisters |
( |
|
) |
[protected] |
|
|
Definition at line 765 of file briggs_reg_alloc.cc.
References adjMatrix, changeWebRegister(), deleteInstr(), LirInst::dest, LirInst::instruction, instruction_list, instruction_list_p, procNode::instructions(), isSymReg(), mn_Move, nonStore(), Register::num(), num_webs, LirInst::opnd1, proc, and Symreg.
Referenced by allocate(). |
void briggs_reg_alloc::computeSpillCosts |
( |
|
) |
[protected] |
|
|
Definition at line 857 of file briggs_reg_alloc.cc.
References reg_or_const::_reg, adjLists, LirInst::dest, LirInst::has_base(), LirInst::has_dest(), LirInst::has_offset(), LirInst::has_opnd1(), LirInst::has_opnd2(), LirInst::instruction, instruction_list, instruction_list_p, procNode::instructions(), LirInst::memBase, LirInst::memOffset, mn_Move, Register::num(), LirInst::opnd1, LirInst::opnd2, and proc.
Referenced by allocate(). |
template<class T> |
set< T > * briggs_reg_alloc::copySet |
( |
set< T > * |
s |
) |
[protected] |
|
void briggs_reg_alloc::genSpillCode |
( |
|
) |
[protected] |
|
|
Definition at line 1194 of file briggs_reg_alloc.cc.
References reg_or_const::_reg, LirBlock::add_inst_after(), procNode::alloc_stack_local(), LirInst::block, declNode::BLOCK, DATA_CONTENTS_FRAMEP, declNode::decl_location(), LirInst::dest, LirInst::dest_contents, Register::getRegFp(), LirInst::has_base(), LirInst::has_dest(), LirInst::has_offset(), LirInst::has_opnd1(), LirInst::has_opnd2(), instruction_list, instruction_list_p, procNode::instructions(), isSymReg(), loadSymReg(), LirInst::memBase, LirInst::memBase_contents, LirInst::memOffset, LirInst::memOffset_contents, Register::num(), LirInst::opnd1, LirInst::opnd1_contents, LirInst::opnd2, LirInst::opnd2_contents, proc, declNode::storage_location(), LIR::Store(), Symreg, and declNode::type().
Referenced by allocate(). |
bool briggs_reg_alloc::interfere |
( |
WebRecord * |
wr, |
|
|
int |
reg |
|
) |
[protected] |
|
|
Definition at line 216 of file briggs_reg_alloc.cc.
References arch_info::register_info::_id, arch_info::register_info::_type, CBZ::ArchInfo, arch_info::get_all_regs(), arch_info::get_reg_fp(), arch_info::get_reg_retval_fixed(), arch_info::get_reg_retval_float(), arch_info::get_reg_sp(), Symbol::getLirVt(), WebRecord::getReg(), WebRecord::getSym(), LirInst::instruction, instruction_list, instruction_list_p, procNode::instructions(), typeNode::is_float(), typeNode::is_integer(), typeNode::is_pointer(), liveRegs, mn_Call, LirInst::nodeExtra, Register::num(), proc, reg_fpr, reg_gpr, and Node::type().
Referenced by buildAdjMatrix(). |
bool briggs_reg_alloc::isSymReg |
( |
const Register & |
reg |
) |
[inline, protected] |
|
void briggs_reg_alloc::makeDuChains |
( |
sduList & |
DuChains |
) |
[protected] |
|
|
Definition at line 354 of file briggs_reg_alloc.cc.
References reg_or_const::_reg, CBZ::ArchInfo, def, DUChainUses, LirInst::get_dest(), arch_info::get_reg_by_index(), sdu::getDef(), lir_flow_walker::getInstructionFlowInfo(), lir_flow_walker::getInstructionsPostorder(), sdu::getUses(), LirInst::has_base(), LirInst::has_dest(), LirInst::has_offset(), LirInst::has_opnd1(), LirInst::has_opnd2(), LirInst::instruction, instruction_list, instruction_list_p, instruction_set_p, procNode::instructions(), cbz_util::list_find(), LirInst::memBase, LirInst::memOffset, mn_DeclLocal, Register::num(), num_regs, LirInst::opnd1, LirInst::opnd2, LirInst::preds, proc, and LirInst::succs.
Referenced by allocate(). |
void briggs_reg_alloc::makeWebs |
( |
sduList & |
DuChains |
) |
[protected] |
|
|
Definition at line 541 of file briggs_reg_alloc.cc.
References Symbol::_reg, Symbol::_type, CBZ::ArchInfo, changeWebRegister(), copySet(), DUChainDefs, LirInst::get_dest(), arch_info::get_reg_by_index(), sdu::getDef(), WebRecord::getDefs(), WebRecord::getReg(), WebRecord::getSym(), sdu::getSymbol(), sdu::getUses(), WebRecord::getUses(), procNode::instructions(), WebRecord::intersectUses(), Register::isValid(), Register::num(), num_regs, num_webs, proc, sduList_p, Symbol::sym_reg, Symreg, WebRecord::unionDefs(), WebRecord::unionUses(), WRSet, and WRSet_p.
Referenced by allocate(). |
void briggs_reg_alloc::modifyCode |
( |
|
) |
[protected] |
|
bool briggs_reg_alloc::nonStore |
( |
int |
reg_k, |
|
|
int |
reg_l, |
|
|
instruction_list_p |
instr |
|
) |
[protected] |
|
void briggs_reg_alloc::pruneGraph |
( |
|
) |
[protected] |
|
void briggs_reg_alloc::removeUnavailableColors |
( |
ListRecord * |
node, |
|
|
color_set & |
colors |
|
) |
[protected] |
|
Member Data Documentation
LRVector briggs_reg_alloc::adjLists [private]
|
|
vector< vector < bool > > briggs_reg_alloc::adjMatrix [private]
|
|
vector< int > briggs_reg_alloc::colorToRealReg [private]
|
|
const float briggs_reg_alloc::copyWt [static, private]
|
|
const float briggs_reg_alloc::defWt [static, private]
|
|
list< int > briggs_reg_alloc::nodeStack [private]
|
|
int briggs_reg_alloc::num_regs [private]
|
|
int briggs_reg_alloc::num_webs [private]
|
|
procNode* briggs_reg_alloc::proc [private]
|
|
|
Definition at line 374 of file briggs_reg_alloc.h.
Referenced by allocate(), buildAdjMatrix(), coalesceRegisters(), computeSpillCosts(), deleteInstr(), genSpillCode(), interfere(), loadSymReg(), makeDuChains(), makeWebs(), and nonStore(). |
int briggs_reg_alloc::regs_reserved [private]
|
|
WRVector briggs_reg_alloc::Symreg [private]
|
|
int briggs_reg_alloc::usable_regs [private]
|
|
const float briggs_reg_alloc::useWt [static, private]
|
|
The documentation for this class was generated from the following files:
|