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  

LirInst Class Reference

#include <instruction.h>

List of all members.

Public Member Functions

 LirInst ()
 LirInst (mnemonic instruction)
string to_string () const
bool should_emit () const
bool has_dest (bool declDefines=false) const
bool has_opnd1 () const
bool has_opnd2 (bool regOnly=true) const
bool has_base () const
bool has_offset (bool regOnly=true) const
bool has_target () const
int stack_arg_bytes (void)
void stack_arg_bytes (int bytes)
Register get_dest ()

Static Public Member Functions

string contents_str (declNode *pDecl)

Public Attributes

Register opnd1
declNodeopnd1_contents
reg_or_const opnd2
declNodeopnd2_contents
Register dest
declNodedest_contents
Register memBase
declNodememBase_contents
reg_or_const memOffset
declNodememOffset_contents
mnemonic instruction
string target
int dataSize
int dataAlign
constant dataValue
typeNodeprimaryType
typeNodeconvertType
LirBlockblock
NodenodeExtra
int _stack_arg_bytes
LirInst * targetInst
bool visited
instruction_set succs
instruction_set preds

Static Public Attributes

int contents_compiler_temp_index

Friends

ostream & operator<< (ostream &os, const LirInst &inst)


Constructor & Destructor Documentation

LirInst::LirInst  
 

Definition at line 44 of file instruction.cc.

References mn_undefined.

LirInst::LirInst mnemonic    instruction
 

Definition at line 59 of file instruction.cc.


Member Function Documentation

string LirInst::contents_str declNode   pDecl [static]
 

Definition at line 124 of file instruction.cc.

References DATA_CONTENTS_FRAMEP, DATA_CONTENTS_REG_IN, DATA_CONTENTS_REG_OUT, DATA_CONTENTS_RETVAL, DATA_CONTENTS_STACKP, and declNode::name().

Register LirInst::get_dest  
 

Definition at line 212 of file instruction.cc.

References dest, instruction, Register::isValid(), mn_DeclLocal, nodeExtra, and declNode::Storage_location::storageloc_register.

Referenced by briggs_reg_alloc::makeDuChains(), and briggs_reg_alloc::makeWebs().

bool LirInst::has_base   const
 

Definition at line 187 of file instruction.cc.

References instruction, and instruction_info.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), briggs_reg_alloc::genSpillCode(), arch_info::make_template_replacements(), and briggs_reg_alloc::makeDuChains().

bool LirInst::has_dest bool    declDefines = false const
 

Definition at line 155 of file instruction.cc.

References dest, instruction, instruction_info, Register::isValid(), mn_DeclLocal, nodeExtra, and declNode::Storage_location::storageloc_register.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), asm_gen_walker::doCalleeSave(), briggs_reg_alloc::genSpillCode(), arch_info::make_template_replacements(), briggs_reg_alloc::makeDuChains(), and briggs_reg_alloc::nonStore().

bool LirInst::has_offset bool    regOnly = true const
 

Definition at line 193 of file instruction.cc.

References reg_or_const::_is_const, instruction, instruction_info, and memOffset.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), briggs_reg_alloc::genSpillCode(), arch_info::make_template_replacements(), and briggs_reg_alloc::makeDuChains().

bool LirInst::has_opnd1   const
 

Definition at line 174 of file instruction.cc.

References instruction, and instruction_info.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), briggs_reg_alloc::genSpillCode(), arch_info::make_template_replacements(), and briggs_reg_alloc::makeDuChains().

bool LirInst::has_opnd2 bool    regOnly = true const
 

Definition at line 180 of file instruction.cc.

References reg_or_const::_is_const, instruction, instruction_info, and opnd2.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), briggs_reg_alloc::genSpillCode(), arch_info::make_template_replacements(), and briggs_reg_alloc::makeDuChains().

bool LirInst::has_target   const
 

Definition at line 200 of file instruction.cc.

References instruction, and instruction_info.

bool LirInst::should_emit   const
 

Definition at line 206 of file instruction.cc.

References instruction, and instruction_info.

Referenced by asm_gen_walker::emit().

void LirInst::stack_arg_bytes int    bytes [inline]
 

Definition at line 371 of file instruction.h.

int LirInst::stack_arg_bytes void    [inline]
 

Definition at line 370 of file instruction.h.

Referenced by asm_gen_walker::computeStackFrameSize().

string LirInst::to_string   const
 

Definition at line 78 of file instruction.cc.

References reg_or_const::_is_const, InstructionInfo::_name, InstructionInfo::_opndFormat, dest, instruction, instruction_info, memBase, memOffset, opnd1, opnd2, cbz_util::string_format(), cbz_util::string_replace(), reg_or_const::to_string(), Register::to_string(), and to_string().

Referenced by asm_gen_walker::emit(), operator<<(), and to_string().


Friends And Related Function Documentation

ostream& operator<< ostream &    os,
const LirInst &    inst
[friend]
 

Definition at line 147 of file instruction.cc.


Member Data Documentation

int LirInst::_stack_arg_bytes
 

Definition at line 323 of file instruction.h.

LirBlock* LirInst::block
 

Definition at line 313 of file instruction.h.

Referenced by LirBlock::add_inst(), LirBlock::add_inst_after(), LirBlock::add_inst_before(), briggs_reg_alloc::deleteInstr(), briggs_reg_alloc::depth(), briggs_reg_alloc::genSpillCode(), briggs_reg_alloc::loadSymReg(), and LirBlock::remove_inst().

int LirInst::contents_compiler_temp_index [static]
 

Initial value:

  1

Definition at line 120 of file instruction.cc.

typeNode* LirInst::convertType
 

Definition at line 307 of file instruction.h.

Referenced by LIR::ConvertType(), and arch_info::get_Lir2Asm_for_instruction().

int LirInst::dataAlign
 

Definition at line 302 of file instruction.h.

Referenced by LIR::DeclareGlobal(), and arch_info::make_template_replacements().

int LirInst::dataSize
 

Definition at line 301 of file instruction.h.

Referenced by LIR::DeclareGlobal(), arch_info::make_template_replacements(), LIR::StaticDataUninit(), and LIR::StaticDataZero().

constant LirInst::dataValue
 

Definition at line 303 of file instruction.h.

Referenced by LIR::make_data(), and arch_info::make_template_replacements().

Register LirInst::dest
 

Definition at line 281 of file instruction.h.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), LIR::BitwiseNOT(), LIR::Call(), briggs_reg_alloc::changeWebRegister(), briggs_reg_alloc::coalesceRegisters(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), LIR::ConvertType(), asm_gen_walker::doCalleeSave(), briggs_reg_alloc::genSpillCode(), get_dest(), LIR::GetEffectiveAddress(), LIR::GetGlobalAddress(), has_dest(), LIR::Load(), LIR::LoadImmediate(), LIR::LoadStatic(), LIR::make_simple(), arch_info::make_template_replacements(), LIR::Move(), LIR::Neg(), briggs_reg_alloc::nonStore(), and to_string().

declNode* LirInst::dest_contents
 

Definition at line 282 of file instruction.h.

Referenced by dummy_reg_alloc::allocate(), LIR::BitwiseNOT(), LIR::Call(), LIR::ConvertType(), briggs_reg_alloc::genSpillCode(), LIR::GetEffectiveAddress(), LIR::GetGlobalAddress(), LIR::Load(), LIR::LoadImmediate(), LIR::LoadStatic(), LIR::make_simple(), LIR::Move(), and LIR::Neg().

mnemonic LirInst::instruction
 

Definition at line 291 of file instruction.h.

Referenced by LIR::Branch(), lir_flow_walker::build_lir_blocks(), briggs_reg_alloc::coalesceRegisters(), briggs_reg_alloc::computeSpillCosts(), asm_gen_walker::computeStackFrameSize(), asm_gen_walker::doCalleeSave(), asm_gen_walker::doCallerSave(), arch_info::get_code_for_instruction(), get_dest(), arch_info::get_Lir2Asm_for_instruction(), lir_flow_walker::getInstructionFlowInfo(), lir_flow_walker::getInstructionsPostorder(), has_base(), has_dest(), has_offset(), has_opnd1(), has_opnd2(), has_target(), briggs_reg_alloc::interfere(), briggs_reg_alloc::makeDuChains(), should_emit(), and to_string().

Register LirInst::memBase
 

Definition at line 285 of file instruction.h.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), briggs_reg_alloc::genSpillCode(), LIR::GetEffectiveAddress(), LIR::Load(), arch_info::make_template_replacements(), briggs_reg_alloc::makeDuChains(), LIR::Store(), and to_string().

declNode* LirInst::memBase_contents
 

Definition at line 286 of file instruction.h.

Referenced by briggs_reg_alloc::genSpillCode(), LIR::GetEffectiveAddress(), LIR::Load(), and LIR::Store().

reg_or_const LirInst::memOffset
 

Definition at line 287 of file instruction.h.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), briggs_reg_alloc::genSpillCode(), LIR::GetEffectiveAddress(), LIR::GetGlobalAddress(), has_offset(), LIR::Load(), LIR::LoadStatic(), arch_info::make_template_replacements(), briggs_reg_alloc::makeDuChains(), LIR::Store(), LIR::StoreStatic(), and to_string().

declNode* LirInst::memOffset_contents
 

Definition at line 288 of file instruction.h.

Referenced by briggs_reg_alloc::genSpillCode(), LIR::GetEffectiveAddress(), LIR::GetGlobalAddress(), LIR::Load(), LIR::LoadStatic(), LIR::Store(), and LIR::StoreStatic().

Node* LirInst::nodeExtra
 

Definition at line 320 of file instruction.h.

Referenced by LIR::BeginProc(), LIR::Call(), briggs_reg_alloc::changeWebRegister(), LIR::DeclareGlobal(), LIR::DeclareLocal(), asm_gen_walker::doCallerSave(), LIR::EndProc(), get_dest(), has_dest(), briggs_reg_alloc::interfere(), LIR::LoadStatic(), arch_info::make_template_replacements(), and LIR::Return().

Register LirInst::opnd1
 

Definition at line 275 of file instruction.h.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), LIR::BitwiseNOT(), briggs_reg_alloc::changeWebRegister(), briggs_reg_alloc::coalesceRegisters(), LIR::Compare(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), LIR::ConvertType(), briggs_reg_alloc::genSpillCode(), LIR::make_simple(), arch_info::make_template_replacements(), briggs_reg_alloc::makeDuChains(), LIR::Move(), LIR::Neg(), LIR::Store(), LIR::StoreStatic(), and to_string().

declNode* LirInst::opnd1_contents
 

Definition at line 276 of file instruction.h.

Referenced by LIR::BitwiseNOT(), LIR::Compare(), LIR::ConvertType(), briggs_reg_alloc::genSpillCode(), LIR::make_simple(), LIR::Move(), LIR::Neg(), LIR::Store(), and LIR::StoreStatic().

reg_or_const LirInst::opnd2
 

Definition at line 277 of file instruction.h.

Referenced by dummy_reg_alloc::allocate(), asm_gen_walker::at_proc(), briggs_reg_alloc::changeWebRegister(), LIR::Compare(), lir_flow_walker::computeRegisterLiveness(), briggs_reg_alloc::computeSpillCosts(), briggs_reg_alloc::genSpillCode(), arch_info::get_Lir2Asm_for_instruction(), has_opnd2(), LIR::LoadImmediate(), LIR::make_simple(), arch_info::make_template_replacements(), briggs_reg_alloc::makeDuChains(), and to_string().

declNode* LirInst::opnd2_contents
 

Definition at line 278 of file instruction.h.

Referenced by LIR::Compare(), briggs_reg_alloc::genSpillCode(), and LIR::make_simple().

instruction_set LirInst::preds
 

Definition at line 336 of file instruction.h.

Referenced by lir_flow_walker::computeRegisterLiveness(), lir_flow_walker::getInstructionFlowInfo(), and briggs_reg_alloc::makeDuChains().

typeNode* LirInst::primaryType
 

Definition at line 306 of file instruction.h.

Referenced by LIR::ConvertType(), arch_info::get_Lir2Asm_for_instruction(), LIR::GetEffectiveAddress(), LIR::GetGlobalAddress(), LIR::Load(), LIR::LoadImmediate(), LIR::LoadStatic(), LIR::make_simple(), LIR::Store(), and LIR::StoreStatic().

instruction_set LirInst::succs
 

Definition at line 335 of file instruction.h.

Referenced by lir_flow_walker::computeRegisterLiveness(), lir_flow_walker::getInstructionFlowInfo(), and briggs_reg_alloc::makeDuChains().

string LirInst::target
 

Definition at line 294 of file instruction.h.

Referenced by LIR::BeginProc(), LIR::Branch(), lir_flow_walker::build_lir_blocks(), LIR::Call(), LIR::DeclareGlobal(), LIR::DeclareLocal(), LIR::EndProc(), LIR::GetGlobalAddress(), lir_flow_walker::getInstructionFlowInfo(), LIR::Jmp(), LIR::Label(), LIR::LoadStatic(), arch_info::make_template_replacements(), LIR::StaticDataUninit(), and LIR::StoreStatic().

LirInst* LirInst::targetInst
 

Definition at line 326 of file instruction.h.

Referenced by lir_flow_walker::getInstructionFlowInfo(), and lir_flow_walker::getInstructionsPostorder().

bool LirInst::visited
 

Definition at line 330 of file instruction.h.

Referenced by lir_flow_walker::computeRegisterLiveness(), and lir_flow_walker::getInstructionsPostorder().


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

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