lestes::backend_v2::workers::spillgen Class Reference

Performs spillgen generation. More...

#include <spillgen.g.hh>

Inheritance diagram for lestes::backend_v2::workers::spillgen:

Inheritance graph
[legend]
List of all members.

Public Member Functions

ptr< ::lestes::std::vector<
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
active_intervals_get () const
 The method active_intervals_get returns the value of the field spillgen::active_intervals.
void active_intervals_set (const ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > &)
 The method active_intervals_set sets the field spillgen::active_intervals to the given value.
ptr< ::lestes::std::vector<
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
expired_intervals_get () const
 The method expired_intervals_get returns the value of the field spillgen::expired_intervals.
void expired_intervals_set (const ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > &)
 The method expired_intervals_set sets the field spillgen::expired_intervals to the given value.
ptr< ::lestes::std::vector<
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
waiting_intervals_get () const
 The method waiting_intervals_get returns the value of the field spillgen::waiting_intervals.
void waiting_intervals_set (const ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > &)
 The method waiting_intervals_set sets the field spillgen::waiting_intervals to the given value.
ptr< ::lestes::std::set< ulint > > free_registers_get () const
 The method free_registers_get returns the value of the field spillgen::free_registers.
void free_registers_set (const ptr< ::lestes::std::set< ulint > > &)
 The method free_registers_set sets the field spillgen::free_registers to the given value.
ptr< ::lestes::std::set< ulint > > used_registers_get () const
 The method used_registers_get returns the value of the field spillgen::used_registers.
void used_registers_set (const ptr< ::lestes::std::set< ulint > > &)
 The method used_registers_set sets the field spillgen::used_registers to the given value.
ptr< ::lestes::std::set< ulint > > all_registers_get () const
 The method all_registers_get returns the value of the field spillgen::all_registers.
void all_registers_set (const ptr< ::lestes::std::set< ulint > > &)
 The method all_registers_set sets the field spillgen::all_registers to the given value.
ptr< ::lestes::std::map< ulint,
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
register_owners_get () const
 The method register_owners_get returns the value of the field spillgen::register_owners.
void register_owners_set (const ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::workers::alloc_interval > > > &)
 The method register_owners_set sets the field spillgen::register_owners to the given value.
ptr< ::lestes::std::set< srp<
::lestes::backend_v2::intercode::pi_mem_factory > > > 
free_spill_spaces_get () const
 The method free_spill_spaces_get returns the value of the field spillgen::free_spill_spaces.
void free_spill_spaces_set (const ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::pi_mem_factory > > > &)
 The method free_spill_spaces_set sets the field spillgen::free_spill_spaces to the given value.
ptr< ::lestes::md::registers::move_generatormove_gen_get () const
 The method move_gen_get returns the value of the field spillgen::move_gen.
void move_gen_set (const ptr< ::lestes::md::registers::move_generator > &)
 The method move_gen_set sets the field spillgen::move_gen to the given value.
bool registers_freed_get () const
 The method registers_freed_get returns the value of the field spillgen::registers_freed.
void registers_freed_set (bool)
 The method registers_freed_set sets the field spillgen::registers_freed to the given value.
ptr< ::lestes::std::map< srp<
::lestes::backend_v2::intercode::pi_mem_factory >,
srp< ::lestes::backend_v2::intercode::ge_pi > > > 
spill_space_last_use_get () const
 The method spill_space_last_use_get returns the value of the field spillgen::spill_space_last_use.
void spill_space_last_use_set (const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::backend_v2::intercode::ge_pi > > > &)
 The method spill_space_last_use_set sets the field spillgen::spill_space_last_use to the given value.
ptr< ::lestes::std::map< ulint,
srp< ::lestes::backend_v2::intercode::ge_pi > > > 
register_last_use_get () const
 The method register_last_use_get returns the value of the field spillgen::register_last_use.
void register_last_use_set (const ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::intercode::ge_pi > > > &)
 The method register_last_use_set sets the field spillgen::register_last_use to the given value.
ptr< ::lestes::std::map< srp<
::lestes::backend_v2::intercode::ge_operand_reg >,
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
op2interval_get () const
 The method op2interval_get returns the value of the field spillgen::op2interval.
void op2interval_set (const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< ::lestes::backend_v2::workers::alloc_interval > > > &)
 The method op2interval_set sets the field spillgen::op2interval to the given value.
ptr< ::lestes::std::map< srp<
::lestes::backend_v2::intercode::ge_operand_reg >,
srp< spillgen_group > > > 
op2group_get () const
 The method op2group_get returns the value of the field spillgen::op2group.
void op2group_set (const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > > &)
 The method op2group_set sets the field spillgen::op2group to the given value.
ptr< ::lestes::std::list<
srp< spillgen_group > > > 
groups_get () const
 The method groups_get returns the value of the field spillgen::groups.
void groups_set (const ptr< ::lestes::std::list< srp< spillgen_group > > > &)
 The method groups_set sets the field spillgen::groups to the given value.
ptr< ::lestes::std::set< ulint > > regs_used_by_groups_get () const
 The method regs_used_by_groups_get returns the value of the field spillgen::regs_used_by_groups.
void regs_used_by_groups_set (const ptr< ::lestes::std::set< ulint > > &)
 The method regs_used_by_groups_set sets the field spillgen::regs_used_by_groups to the given value.
ptr< ::lestes::std::set< srp<
::lestes::backend_v2::intercode::ge_pi > > > 
curr_generated_instructions_get () const
 The method curr_generated_instructions_get returns the value of the field spillgen::curr_generated_instructions.
void curr_generated_instructions_set (const ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::ge_pi > > > &)
 The method curr_generated_instructions_set sets the field spillgen::curr_generated_instructions to the given value.
void process ()
 Performs spill-code generation on a function body.
ptr< ::lestes::backend_v2::structs::func_dataget_result ()
 Returns data of the processed function with spill-code included.
ptr< ::lestes::backend_v2::intercode::ge_pifind_last_use_of_register (ulint regid)
 Returns a pseudoinstruction that is the last user of a register.
void set_last_use_of_register (ulint regid, ptr< ::lestes::backend_v2::intercode::ge_pi > ge)
void process_instruction (ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< list< srp< ::lestes::backend_v2::intercode::ge_pi > > > output, list< srp< ::lestes::backend_v2::intercode::ge_pi > >::iterator insert_pos)
void generate_spill_code (ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< list< srp< ::lestes::backend_v2::intercode::ge_pi > > > output, list< srp< ::lestes::backend_v2::intercode::ge_pi > >::iterator insert_pos)
ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > generate_backup_code (ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< spillgen_group > group, ptr< set< srp< ::lestes::backend_v2::workers::alloc_interval > > > reg_orig_owners)
ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > generate_restore_code (ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< spillgen_group > group, ptr< set< srp< ::lestes::backend_v2::workers::alloc_interval > > > reg_orig_owners)
ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > generate_load_code (ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< spillgen_group > group, ptr< ::lestes::backend_v2::workers::alloc_interval > interval, ptr< ::lestes::backend_v2::intercode::ge_operand_reg > operand, ptr< ::lestes::md::registers::tm_register > reg)
ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > generate_store_code (ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< spillgen_group > group, ptr< ::lestes::backend_v2::workers::alloc_interval > interval, ptr< ::lestes::backend_v2::intercode::ge_operand_reg > operand, ptr< ::lestes::md::registers::tm_register > reg)
void insert_code_to_bb (ptr< ::lestes::backend_v2::workers::basic_block > bb, ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > code, bool back)
void free_group_resources ()
 Frees resources (registers,spill-places) used by spill-code generation for the currently processed instruction.
ptr< ::lestes::backend_v2::intercode::ge_piinterval_find_previous_instruction (ptr< ::lestes::backend_v2::workers::alloc_interval > interval, ulint pos)
ptr< ::lestes::backend_v2::intercode::ge_piinterval_find_next_instruction (ptr< ::lestes::backend_v2::workers::alloc_interval > interval, ulint pos)
ptr< set< srp< ::lestes::backend_v2::workers::alloc_interval > > > find_register_owners (ptr< ::lestes::md::registers::tm_register > reg)
ptr< set< srp< ::lestes::backend_v2::workers::spillgen_group > > > find_groups_by_reg (ptr< ::lestes::md::registers::tm_register > reg)
void allocate_regs_for_groups ()
 Allocates registers to operand groups of a currently processed instruction.
void allocate_reg_for_group (ptr< spillgen_group > group)
 Allocates register to a operand group of a currently processed instruction.
void steal_register_from_siblings (ptr< spillgen_group > thief, ptr< set< ulint > > allowed_regs)
bool identify_groups (ptr< ::lestes::backend_v2::intercode::ge_pi > ge)
ptr< set< ulint > > filter_regs_by_data_type (ptr< set< ulint > > reg_set, ulint type)
void setup_registers ()
 Fills the all_registers set with all the available registers.
void find_free_registers ()
 Recomputes the free_registers set.
ptr< ::lestes::backend_v2::intercode::pi_mem_factoryget_free_spill_space (ptr< ::lestes::md::types::tm_data_type_base > type)
bool expire_old_intervals (ulint curr_point)
 Removes intervals whoose endpoints precede a currently processed point from the active_intervals set.
bool activate_waiting_intervals (ulint curr_point)
 Adds intervals whoose startpoints follows a currently processed point to the active_intervals set.
void set_instruction_property (ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > instrs, ulint property_id, lstring property_value)
virtual ptr< reflection_listreflection_get () const
 for purposes of dumping
virtual ptr< field_list_listfield_values_get () const
 for purposes of dumping

Static Public Member Functions

static ptr< spillgencreate (ptr< ::lestes::backend_v2::structs::func_data > a__worker_base__data, ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__active_intervals, ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__expired_intervals, ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__waiting_intervals, ptr< ::lestes::std::set< ulint > > a__spillgen__free_registers, ptr< ::lestes::std::set< ulint > > a__spillgen__used_registers, ptr< ::lestes::std::set< ulint > > a__spillgen__all_registers, ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__register_owners, ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::pi_mem_factory > > > a__spillgen__free_spill_spaces, ptr< ::lestes::md::registers::move_generator > a__spillgen__move_gen, bool a__spillgen__registers_freed, ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::backend_v2::intercode::ge_pi > > > a__spillgen__spill_space_last_use, ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::intercode::ge_pi > > > a__spillgen__register_last_use, ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__op2interval, ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > > a__spillgen__op2group, ptr< ::lestes::std::list< srp< spillgen_group > > > a__spillgen__groups, ptr< ::lestes::std::set< ulint > > a__spillgen__regs_used_by_groups, ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::ge_pi > > > a__spillgen__curr_generated_instructions)
 First generated factory method for class spillgen.
static ptr< spillgencreate (ptr< ::lestes::backend_v2::structs::func_data > a__worker_base__data)
 Second generated factory method for class spillgen.

Protected Member Functions

 spillgen (ptr< ::lestes::backend_v2::structs::func_data > a__worker_base__data, ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__active_intervals, ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__expired_intervals, ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__waiting_intervals, ptr< ::lestes::std::set< ulint > > a__spillgen__free_registers, ptr< ::lestes::std::set< ulint > > a__spillgen__used_registers, ptr< ::lestes::std::set< ulint > > a__spillgen__all_registers, ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__register_owners, ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::pi_mem_factory > > > a__spillgen__free_spill_spaces, ptr< ::lestes::md::registers::move_generator > a__spillgen__move_gen, bool a__spillgen__registers_freed, ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::backend_v2::intercode::ge_pi > > > a__spillgen__spill_space_last_use, ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::intercode::ge_pi > > > a__spillgen__register_last_use, ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< ::lestes::backend_v2::workers::alloc_interval > > > a__spillgen__op2interval, ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > > a__spillgen__op2group, ptr< ::lestes::std::list< srp< spillgen_group > > > a__spillgen__groups, ptr< ::lestes::std::set< ulint > > a__spillgen__regs_used_by_groups, ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::ge_pi > > > a__spillgen__curr_generated_instructions)
 Generated constructor for class spillgen.
virtual void gc_mark ()
 Marking routine for class spillgen.

Private Attributes

srp< ::lestes::std::vector<
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
active_intervals
 A list of active intervals.
srp< ::lestes::std::vector<
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
expired_intervals
 A list of already processed intervals.
srp< ::lestes::std::vector<
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
waiting_intervals
 A list of intervals witing for processing.
srp< ::lestes::std::set< ulint > > free_registers
 A set of free registers.
srp< ::lestes::std::set< ulint > > used_registers
 A set of used registers.
srp< ::lestes::std::set< ulint > > all_registers
 A set of all the registers that machine description contains.
srp< ::lestes::std::map< ulint,
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
register_owners
 A map that holds information about which interval has which register allocated.
srp< ::lestes::std::set< srp<
::lestes::backend_v2::intercode::pi_mem_factory > > > 
free_spill_spaces
 A set of free spill-places.
srp< ::lestes::md::registers::move_generatormove_gen
 Provides generation of copy-code between register and memory.
bool registers_freed
srp< ::lestes::std::map< srp<
::lestes::backend_v2::intercode::pi_mem_factory >,
srp< ::lestes::backend_v2::intercode::ge_pi > > > 
spill_space_last_use
 A map between a spill-space and its last use.
srp< ::lestes::std::map< ulint,
srp< ::lestes::backend_v2::intercode::ge_pi > > > 
register_last_use
 A map between a register and its last use.
srp< ::lestes::std::map< srp<
::lestes::backend_v2::intercode::ge_operand_reg >,
srp< ::lestes::backend_v2::workers::alloc_interval > > > 
op2interval
 A map between an operand and its active interval.
srp< ::lestes::std::map< srp<
::lestes::backend_v2::intercode::ge_operand_reg >,
srp< spillgen_group > > > 
op2group
 A map between an operand and its active group.
srp< ::lestes::std::list<
srp< spillgen_group > > > 
groups
 Active groups.
srp< ::lestes::std::set< ulint > > regs_used_by_groups
 A set of registers used by active groups.
srp< ::lestes::std::set< srp<
::lestes::backend_v2::intercode::ge_pi > > > 
curr_generated_instructions
 A spill-code that has been generated for a current intruction.

Static Private Attributes

static ptr< reflection_listreflection = reflection

Detailed Description

Performs spillgen generation.


Constructor & Destructor Documentation

lestes::backend_v2::workers::spillgen::spillgen ( ptr< ::lestes::backend_v2::structs::func_data a__worker_base__data,
ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__active_intervals,
ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__expired_intervals,
ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__waiting_intervals,
ptr< ::lestes::std::set< ulint > >  a__spillgen__free_registers,
ptr< ::lestes::std::set< ulint > >  a__spillgen__used_registers,
ptr< ::lestes::std::set< ulint > >  a__spillgen__all_registers,
ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__register_owners,
ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::pi_mem_factory > > >  a__spillgen__free_spill_spaces,
ptr< ::lestes::md::registers::move_generator a__spillgen__move_gen,
bool  a__spillgen__registers_freed,
ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::backend_v2::intercode::ge_pi > > >  a__spillgen__spill_space_last_use,
ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::intercode::ge_pi > > >  a__spillgen__register_last_use,
ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__op2interval,
ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > >  a__spillgen__op2group,
ptr< ::lestes::std::list< srp< spillgen_group > > >  a__spillgen__groups,
ptr< ::lestes::std::set< ulint > >  a__spillgen__regs_used_by_groups,
ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::ge_pi > > >  a__spillgen__curr_generated_instructions 
) [protected]

Generated constructor for class spillgen.

Generated constructor for class spillgen.

Author:
lsg


Member Function Documentation

ptr<::lestes::std::vector< srp<::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::active_intervals_get (  )  const

The method active_intervals_get returns the value of the field spillgen::active_intervals.

Returns:
The value of spillgen::active_intervals.
Author:
lsg

void lestes::backend_v2::workers::spillgen::active_intervals_set ( const ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > &  x  ) 

The method active_intervals_set sets the field spillgen::active_intervals to the given value.

Parameters:
[in] x The new value to set spillgen::active_intervals to.
Author:
lsg

ptr<::lestes::std::vector< srp<::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::expired_intervals_get (  )  const

The method expired_intervals_get returns the value of the field spillgen::expired_intervals.

Returns:
The value of spillgen::expired_intervals.
Author:
lsg

void lestes::backend_v2::workers::spillgen::expired_intervals_set ( const ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > &  x  ) 

The method expired_intervals_set sets the field spillgen::expired_intervals to the given value.

Parameters:
[in] x The new value to set spillgen::expired_intervals to.
Author:
lsg

ptr<::lestes::std::vector< srp<::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::waiting_intervals_get (  )  const

The method waiting_intervals_get returns the value of the field spillgen::waiting_intervals.

Returns:
The value of spillgen::waiting_intervals.
Author:
lsg

void lestes::backend_v2::workers::spillgen::waiting_intervals_set ( const ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > &  x  ) 

The method waiting_intervals_set sets the field spillgen::waiting_intervals to the given value.

Parameters:
[in] x The new value to set spillgen::waiting_intervals to.
Author:
lsg

ptr<::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::free_registers_get (  )  const

The method free_registers_get returns the value of the field spillgen::free_registers.

Returns:
The value of spillgen::free_registers.
Author:
lsg

void lestes::backend_v2::workers::spillgen::free_registers_set ( const ptr< ::lestes::std::set< ulint > > &  x  ) 

The method free_registers_set sets the field spillgen::free_registers to the given value.

Parameters:
[in] x The new value to set spillgen::free_registers to.
Author:
lsg

ptr<::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::used_registers_get (  )  const

The method used_registers_get returns the value of the field spillgen::used_registers.

Returns:
The value of spillgen::used_registers.
Author:
lsg

void lestes::backend_v2::workers::spillgen::used_registers_set ( const ptr< ::lestes::std::set< ulint > > &  x  ) 

The method used_registers_set sets the field spillgen::used_registers to the given value.

Parameters:
[in] x The new value to set spillgen::used_registers to.
Author:
lsg

ptr<::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::all_registers_get (  )  const

The method all_registers_get returns the value of the field spillgen::all_registers.

Returns:
The value of spillgen::all_registers.
Author:
lsg

void lestes::backend_v2::workers::spillgen::all_registers_set ( const ptr< ::lestes::std::set< ulint > > &  x  ) 

The method all_registers_set sets the field spillgen::all_registers to the given value.

Parameters:
[in] x The new value to set spillgen::all_registers to.
Author:
lsg

ptr<::lestes::std::map< ulint, srp<::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::register_owners_get (  )  const

The method register_owners_get returns the value of the field spillgen::register_owners.

Returns:
The value of spillgen::register_owners.
Author:
lsg

void lestes::backend_v2::workers::spillgen::register_owners_set ( const ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::workers::alloc_interval > > > &  x  ) 

The method register_owners_set sets the field spillgen::register_owners to the given value.

Parameters:
[in] x The new value to set spillgen::register_owners to.
Author:
lsg

ptr<::lestes::std::set< srp<::lestes::backend_v2::intercode::pi_mem_factory > > > lestes::backend_v2::workers::spillgen::free_spill_spaces_get (  )  const

The method free_spill_spaces_get returns the value of the field spillgen::free_spill_spaces.

Returns:
The value of spillgen::free_spill_spaces.
Author:
lsg

void lestes::backend_v2::workers::spillgen::free_spill_spaces_set ( const ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::pi_mem_factory > > > &  x  ) 

The method free_spill_spaces_set sets the field spillgen::free_spill_spaces to the given value.

Parameters:
[in] x The new value to set spillgen::free_spill_spaces to.
Author:
lsg

ptr<::lestes::md::registers::move_generator > lestes::backend_v2::workers::spillgen::move_gen_get (  )  const

The method move_gen_get returns the value of the field spillgen::move_gen.

Returns:
The value of spillgen::move_gen.
Author:
lsg

void lestes::backend_v2::workers::spillgen::move_gen_set ( const ptr< ::lestes::md::registers::move_generator > &  x  ) 

The method move_gen_set sets the field spillgen::move_gen to the given value.

Parameters:
[in] x The new value to set spillgen::move_gen to.
Author:
lsg

bool lestes::backend_v2::workers::spillgen::registers_freed_get (  )  const

The method registers_freed_get returns the value of the field spillgen::registers_freed.

Returns:
The value of spillgen::registers_freed.
Author:
lsg

void lestes::backend_v2::workers::spillgen::registers_freed_set ( bool  x  ) 

The method registers_freed_set sets the field spillgen::registers_freed to the given value.

Parameters:
[in] x The new value to set spillgen::registers_freed to.
Author:
lsg

ptr<::lestes::std::map< srp<::lestes::backend_v2::intercode::pi_mem_factory >, srp<::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::spill_space_last_use_get (  )  const

The method spill_space_last_use_get returns the value of the field spillgen::spill_space_last_use.

Returns:
The value of spillgen::spill_space_last_use.
Author:
lsg

void lestes::backend_v2::workers::spillgen::spill_space_last_use_set ( const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::backend_v2::intercode::ge_pi > > > &  x  ) 

The method spill_space_last_use_set sets the field spillgen::spill_space_last_use to the given value.

Parameters:
[in] x The new value to set spillgen::spill_space_last_use to.
Author:
lsg

ptr<::lestes::std::map< ulint, srp<::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::register_last_use_get (  )  const

The method register_last_use_get returns the value of the field spillgen::register_last_use.

Returns:
The value of spillgen::register_last_use.
Author:
lsg

void lestes::backend_v2::workers::spillgen::register_last_use_set ( const ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::intercode::ge_pi > > > &  x  ) 

The method register_last_use_set sets the field spillgen::register_last_use to the given value.

Parameters:
[in] x The new value to set spillgen::register_last_use to.
Author:
lsg

ptr<::lestes::std::map< srp<::lestes::backend_v2::intercode::ge_operand_reg >, srp<::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::op2interval_get (  )  const

The method op2interval_get returns the value of the field spillgen::op2interval.

Returns:
The value of spillgen::op2interval.
Author:
lsg

void lestes::backend_v2::workers::spillgen::op2interval_set ( const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< ::lestes::backend_v2::workers::alloc_interval > > > &  x  ) 

The method op2interval_set sets the field spillgen::op2interval to the given value.

Parameters:
[in] x The new value to set spillgen::op2interval to.
Author:
lsg

ptr<::lestes::std::map< srp<::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > > lestes::backend_v2::workers::spillgen::op2group_get (  )  const

The method op2group_get returns the value of the field spillgen::op2group.

Returns:
The value of spillgen::op2group.
Author:
lsg

void lestes::backend_v2::workers::spillgen::op2group_set ( const ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > > &  x  ) 

The method op2group_set sets the field spillgen::op2group to the given value.

Parameters:
[in] x The new value to set spillgen::op2group to.
Author:
lsg

ptr<::lestes::std::list< srp< spillgen_group > > > lestes::backend_v2::workers::spillgen::groups_get (  )  const

The method groups_get returns the value of the field spillgen::groups.

Returns:
The value of spillgen::groups.
Author:
lsg

void lestes::backend_v2::workers::spillgen::groups_set ( const ptr< ::lestes::std::list< srp< spillgen_group > > > &  x  ) 

The method groups_set sets the field spillgen::groups to the given value.

Parameters:
[in] x The new value to set spillgen::groups to.
Author:
lsg

ptr<::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::regs_used_by_groups_get (  )  const

The method regs_used_by_groups_get returns the value of the field spillgen::regs_used_by_groups.

Returns:
The value of spillgen::regs_used_by_groups.
Author:
lsg

void lestes::backend_v2::workers::spillgen::regs_used_by_groups_set ( const ptr< ::lestes::std::set< ulint > > &  x  ) 

The method regs_used_by_groups_set sets the field spillgen::regs_used_by_groups to the given value.

Parameters:
[in] x The new value to set spillgen::regs_used_by_groups to.
Author:
lsg

ptr<::lestes::std::set< srp<::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::curr_generated_instructions_get (  )  const

The method curr_generated_instructions_get returns the value of the field spillgen::curr_generated_instructions.

Returns:
The value of spillgen::curr_generated_instructions.
Author:
lsg

void lestes::backend_v2::workers::spillgen::curr_generated_instructions_set ( const ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::ge_pi > > > &  x  ) 

The method curr_generated_instructions_set sets the field spillgen::curr_generated_instructions to the given value.

Parameters:
[in] x The new value to set spillgen::curr_generated_instructions to.
Author:
lsg

void lestes::backend_v2::workers::spillgen::process (  )  [virtual]

Performs spill-code generation on a function body.

Implements lestes::backend_v2::workers::worker_base.

ptr<::lestes::backend_v2::structs::func_data > lestes::backend_v2::workers::spillgen::get_result (  )  [virtual]

Returns data of the processed function with spill-code included.

Implements lestes::backend_v2::workers::worker_base.

ptr< ge_pi > lestes::backend_v2::workers::spillgen::find_last_use_of_register ( ulint  regid  ) 

Returns a pseudoinstruction that is the last user of a register.

Parameters:
regid The register.
Returns:
The last user.

void lestes::backend_v2::workers::spillgen::set_last_use_of_register ( ulint  regid,
ptr< ::lestes::backend_v2::intercode::ge_pi ge 
)

void lestes::backend_v2::workers::spillgen::process_instruction ( ptr< ::lestes::backend_v2::intercode::ge_pi ge,
ptr< list< srp< ::lestes::backend_v2::intercode::ge_pi > > >  output,
list< srp< ::lestes::backend_v2::intercode::ge_pi > >::iterator  insert_pos 
)

void lestes::backend_v2::workers::spillgen::generate_spill_code ( ptr< ::lestes::backend_v2::intercode::ge_pi ge,
ptr< list< srp< ::lestes::backend_v2::intercode::ge_pi > > >  output,
list< srp< ::lestes::backend_v2::intercode::ge_pi > >::iterator  insert_pos 
)

ptr<vector<srp< ::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::generate_backup_code ( ptr< ::lestes::backend_v2::intercode::ge_pi ge,
ptr< spillgen_group group,
ptr< set< srp< ::lestes::backend_v2::workers::alloc_interval > > >  reg_orig_owners 
)

ptr<vector<srp< ::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::generate_restore_code ( ptr< ::lestes::backend_v2::intercode::ge_pi ge,
ptr< spillgen_group group,
ptr< set< srp< ::lestes::backend_v2::workers::alloc_interval > > >  reg_orig_owners 
)

ptr<vector<srp< ::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::generate_load_code ( ptr< ::lestes::backend_v2::intercode::ge_pi ge,
ptr< spillgen_group group,
ptr< ::lestes::backend_v2::workers::alloc_interval interval,
ptr< ::lestes::backend_v2::intercode::ge_operand_reg operand,
ptr< ::lestes::md::registers::tm_register reg 
)

ptr<vector<srp< ::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::generate_store_code ( ptr< ::lestes::backend_v2::intercode::ge_pi ge,
ptr< spillgen_group group,
ptr< ::lestes::backend_v2::workers::alloc_interval interval,
ptr< ::lestes::backend_v2::intercode::ge_operand_reg operand,
ptr< ::lestes::md::registers::tm_register reg 
)

void lestes::backend_v2::workers::spillgen::insert_code_to_bb ( ptr< ::lestes::backend_v2::workers::basic_block bb,
ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > >  code,
bool  back 
)

void lestes::backend_v2::workers::spillgen::free_group_resources (  ) 

Frees resources (registers,spill-places) used by spill-code generation for the currently processed instruction.

ptr< ::lestes::backend_v2::intercode::ge_pi > lestes::backend_v2::workers::spillgen::interval_find_previous_instruction ( ptr< ::lestes::backend_v2::workers::alloc_interval interval,
ulint  pos 
)

ptr< ::lestes::backend_v2::intercode::ge_pi > lestes::backend_v2::workers::spillgen::interval_find_next_instruction ( ptr< ::lestes::backend_v2::workers::alloc_interval interval,
ulint  pos 
)

ptr<set<srp< ::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::find_register_owners ( ptr< ::lestes::md::registers::tm_register reg  ) 

ptr<set<srp< ::lestes::backend_v2::workers::spillgen_group > > > lestes::backend_v2::workers::spillgen::find_groups_by_reg ( ptr< ::lestes::md::registers::tm_register reg  ) 

void lestes::backend_v2::workers::spillgen::allocate_regs_for_groups (  ) 

Allocates registers to operand groups of a currently processed instruction.

void lestes::backend_v2::workers::spillgen::allocate_reg_for_group ( ptr< spillgen_group group  ) 

Allocates register to a operand group of a currently processed instruction.

Parameters:
group The group.

void lestes::backend_v2::workers::spillgen::steal_register_from_siblings ( ptr< spillgen_group thief,
ptr< set< ulint > >  allowed_regs 
)

bool lestes::backend_v2::workers::spillgen::identify_groups ( ptr< ::lestes::backend_v2::intercode::ge_pi ge  ) 

ptr<set<ulint> > lestes::backend_v2::workers::spillgen::filter_regs_by_data_type ( ptr< set< ulint > >  reg_set,
ulint  type 
)

void lestes::backend_v2::workers::spillgen::setup_registers (  ) 

Fills the all_registers set with all the available registers.

void lestes::backend_v2::workers::spillgen::find_free_registers (  ) 

Recomputes the free_registers set.

free_registers <- all_registers - used_registers

ptr< ::lestes::backend_v2::intercode::pi_mem_factory > lestes::backend_v2::workers::spillgen::get_free_spill_space ( ptr< ::lestes::md::types::tm_data_type_base type  ) 

bool lestes::backend_v2::workers::spillgen::expire_old_intervals ( ulint  curr_point  ) 

Removes intervals whoose endpoints precede a currently processed point from the active_intervals set.

Parameters:
curr_point The current point.
Returns:
True if an interval has expired. False otherwise.

bool lestes::backend_v2::workers::spillgen::activate_waiting_intervals ( ulint  curr_point  ) 

Adds intervals whoose startpoints follows a currently processed point to the active_intervals set.

Parameters:
curr_point The current point.
Returns:
True if an interval has been added. False otherwise.

void lestes::backend_v2::workers::spillgen::set_instruction_property ( ptr< vector< srp< ::lestes::backend_v2::intercode::ge_pi > > >  instrs,
ulint  property_id,
lstring  property_value 
)

ptr< spillgen > lestes::backend_v2::workers::spillgen::create ( ptr< ::lestes::backend_v2::structs::func_data a__worker_base__data,
ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__active_intervals,
ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__expired_intervals,
ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__waiting_intervals,
ptr< ::lestes::std::set< ulint > >  a__spillgen__free_registers,
ptr< ::lestes::std::set< ulint > >  a__spillgen__used_registers,
ptr< ::lestes::std::set< ulint > >  a__spillgen__all_registers,
ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__register_owners,
ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::pi_mem_factory > > >  a__spillgen__free_spill_spaces,
ptr< ::lestes::md::registers::move_generator a__spillgen__move_gen,
bool  a__spillgen__registers_freed,
ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::backend_v2::intercode::ge_pi > > >  a__spillgen__spill_space_last_use,
ptr< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::intercode::ge_pi > > >  a__spillgen__register_last_use,
ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< ::lestes::backend_v2::workers::alloc_interval > > >  a__spillgen__op2interval,
ptr< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > >  a__spillgen__op2group,
ptr< ::lestes::std::list< srp< spillgen_group > > >  a__spillgen__groups,
ptr< ::lestes::std::set< ulint > >  a__spillgen__regs_used_by_groups,
ptr< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::ge_pi > > >  a__spillgen__curr_generated_instructions 
) [static]

First generated factory method for class spillgen.

This factory method for class spillgen takes values of all fields as arguments.

Author:
lsg

ptr< spillgen > lestes::backend_v2::workers::spillgen::create ( ptr< ::lestes::backend_v2::structs::func_data a__worker_base__data  )  [static]

Second generated factory method for class spillgen.

This factory method for class spillgen uses initializers.

Author:
lsg

ptr< object::reflection_list > lestes::backend_v2::workers::spillgen::reflection_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::backend_v2::workers::worker_base.

ptr< object::field_list_list > lestes::backend_v2::workers::spillgen::field_values_get (  )  const [virtual]

for purposes of dumping

Reimplemented from lestes::backend_v2::workers::worker_base.

void lestes::backend_v2::workers::spillgen::gc_mark ( void   )  [protected, virtual]

Marking routine for class spillgen.

Marking routine is used for garbage collection.

Author:
lsg

Reimplemented from lestes::backend_v2::workers::worker_base.


Member Data Documentation

srp< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::active_intervals [private]

A list of active intervals.

srp< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::expired_intervals [private]

A list of already processed intervals.

srp< ::lestes::std::vector< srp< ::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::waiting_intervals [private]

A list of intervals witing for processing.

srp< ::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::free_registers [private]

A set of free registers.

srp< ::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::used_registers [private]

A set of used registers.

srp< ::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::all_registers [private]

A set of all the registers that machine description contains.

srp< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::register_owners [private]

A map that holds information about which interval has which register allocated.

srp< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::pi_mem_factory > > > lestes::backend_v2::workers::spillgen::free_spill_spaces [private]

A set of free spill-places.

srp< ::lestes::md::registers::move_generator > lestes::backend_v2::workers::spillgen::move_gen [private]

Provides generation of copy-code between register and memory.

bool lestes::backend_v2::workers::spillgen::registers_freed [private]

srp< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::pi_mem_factory >, srp< ::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::spill_space_last_use [private]

A map between a spill-space and its last use.

srp< ::lestes::std::map< ulint, srp< ::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::register_last_use [private]

A map between a register and its last use.

srp< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< ::lestes::backend_v2::workers::alloc_interval > > > lestes::backend_v2::workers::spillgen::op2interval [private]

A map between an operand and its active interval.

srp< ::lestes::std::map< srp< ::lestes::backend_v2::intercode::ge_operand_reg >, srp< spillgen_group > > > lestes::backend_v2::workers::spillgen::op2group [private]

A map between an operand and its active group.

srp< ::lestes::std::list< srp< spillgen_group > > > lestes::backend_v2::workers::spillgen::groups [private]

Active groups.

srp< ::lestes::std::set< ulint > > lestes::backend_v2::workers::spillgen::regs_used_by_groups [private]

A set of registers used by active groups.

srp< ::lestes::std::set< srp< ::lestes::backend_v2::intercode::ge_pi > > > lestes::backend_v2::workers::spillgen::curr_generated_instructions [private]

A spill-code that has been generated for a current intruction.

ptr< object::reflection_list > lestes::backend_v2::workers::spillgen::reflection = reflection [static, private]

Reimplemented from lestes::backend_v2::workers::worker_base.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:43:19 2007 for lestes by doxygen 1.5.1-20070107