C-Breeze
C Compiler Infrastructure

[ Project home page]
Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

dummy_reg_alloc Class Reference

#include <dummy_reg_alloc.h>

Inheritance diagram for dummy_reg_alloc:

reg_alloc List of all members.

Public Member Functions

 dummy_reg_alloc ()
 ~dummy_reg_alloc ()
void allocate (procNode *proc)

Protected Member Functions

void setup_rregs ()
bool is_real_reg (const Register &reg)
vreg_infoget_vreg (const Register &vreg)
rreg_infoget_rreg (const Register &rreg)
bool fix_allocated_virtual (Register &reg, const LirInst &inst)
bool allocate_real_for_virtual (Register &reg, declNode *pDecl, const LirInst &inst)

Protected Attributes

vector< vreg_info * > _vregs
vector< rreg_info * > _rregsGpr
int _rregsGprCount
vector< rreg_info * > _rregsFpr
int _rregsFprCount
int _lastRealRegFixed
int _lastRealRegFloat

Constructor & Destructor Documentation

dummy_reg_alloc::dummy_reg_alloc  
 

Definition at line 45 of file dummy_reg_alloc.cc.

References _rregsFprCount, and _rregsGprCount.

dummy_reg_alloc::~dummy_reg_alloc  
 

Definition at line 51 of file dummy_reg_alloc.cc.


Member Function Documentation

void dummy_reg_alloc::allocate procNode   proc [virtual]
 

Implements reg_alloc.

Definition at line 162 of file dummy_reg_alloc.cc.

References reg_or_const::_reg, allocate_real_for_virtual(), LirInst::dest, LirInst::dest_contents, fix_allocated_virtual(), LirInst::has_base(), LirInst::has_dest(), LirInst::has_offset(), LirInst::has_opnd1(), LirInst::has_opnd2(), instruction_list, instruction_list_p, procNode::instructions(), LirInst::memBase, LirInst::memOffset, LirInst::opnd1, LirInst::opnd2, and setup_rregs().

Referenced by dummy_reg_alloc_walker::at_proc().

bool dummy_reg_alloc::allocate_real_for_virtual Register   reg,
declNode   pDecl,
const LirInst   inst
[protected]
 

Definition at line 238 of file dummy_reg_alloc.cc.

References _lastRealRegFixed, _lastRealRegFloat, _rregsFpr, _rregsFprCount, _rregsGpr, _rregsGprCount, CBZFAIL, get_vreg(), typeNode::is_float(), is_real_reg(), dummy_reg_alloc::vreg_info::pRealReg, dummy_reg_alloc::rreg_info::pVirtualReg, dummy_reg_alloc::vreg_info::reclaimed, dummy_reg_alloc::rreg_info::reg, rreg_info, declNode::type(), and vreg_info.

Referenced by allocate().

bool dummy_reg_alloc::fix_allocated_virtual Register   reg,
const LirInst   inst
[protected]
 

Definition at line 199 of file dummy_reg_alloc.cc.

References get_vreg(), is_real_reg(), dummy_reg_alloc::vreg_info::pRealReg, dummy_reg_alloc::vreg_info::reclaimed, dummy_reg_alloc::rreg_info::reg, Register::to_string(), and vreg_info.

Referenced by allocate().

rreg_info * dummy_reg_alloc::get_rreg const Register   rreg [protected]
 

Definition at line 142 of file dummy_reg_alloc.cc.

References _rregsFpr, _rregsGpr, is_real_reg(), Register::num(), reg_fpr, reg_gpr, and Register::type().

vreg_info * dummy_reg_alloc::get_vreg const Register   vreg [protected]
 

Definition at line 115 of file dummy_reg_alloc.cc.

References _vregs, is_real_reg(), Register::num(), dummy_reg_alloc::vreg_info::reg, and vreg_info.

Referenced by allocate_real_for_virtual(), and fix_allocated_virtual().

bool dummy_reg_alloc::is_real_reg const Register   reg [inline, protected]
 

Definition at line 108 of file dummy_reg_alloc.cc.

References CBZ::ArchInfo, arch_info::get_all_regs(), and Register::num().

Referenced by allocate_real_for_virtual(), fix_allocated_virtual(), get_rreg(), and get_vreg().

void dummy_reg_alloc::setup_rregs   [protected]
 

Definition at line 56 of file dummy_reg_alloc.cc.

References _lastRealRegFixed, _lastRealRegFloat, _rregsFpr, _rregsFprCount, _rregsGpr, _rregsGprCount, CBZ::ArchInfo, arch_info::get_register(), arch_info::get_regs_fpr(), arch_info::get_regs_gpr(), dummy_reg_alloc::rreg_info::pInfo, dummy_reg_alloc::rreg_info::reg, and rreg_info.

Referenced by allocate().


Member Data Documentation

int dummy_reg_alloc::_lastRealRegFixed [protected]
 

Definition at line 147 of file dummy_reg_alloc.h.

Referenced by allocate_real_for_virtual(), and setup_rregs().

int dummy_reg_alloc::_lastRealRegFloat [protected]
 

Definition at line 148 of file dummy_reg_alloc.h.

Referenced by allocate_real_for_virtual(), and setup_rregs().

vector<rreg_info*> dummy_reg_alloc::_rregsFpr [protected]
 

Definition at line 143 of file dummy_reg_alloc.h.

Referenced by allocate_real_for_virtual(), get_rreg(), and setup_rregs().

int dummy_reg_alloc::_rregsFprCount [protected]
 

Definition at line 144 of file dummy_reg_alloc.h.

Referenced by allocate_real_for_virtual(), dummy_reg_alloc(), and setup_rregs().

vector<rreg_info*> dummy_reg_alloc::_rregsGpr [protected]
 

Definition at line 141 of file dummy_reg_alloc.h.

Referenced by allocate_real_for_virtual(), get_rreg(), and setup_rregs().

int dummy_reg_alloc::_rregsGprCount [protected]
 

Definition at line 142 of file dummy_reg_alloc.h.

Referenced by allocate_real_for_virtual(), dummy_reg_alloc(), and setup_rregs().

vector<vreg_info*> dummy_reg_alloc::_vregs [protected]
 

Definition at line 137 of file dummy_reg_alloc.h.

Referenced by get_vreg().


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

Generated on August 27, 2003
Back to the C-Breeze home page