alloc_int_finder.g.hh

Go to the documentation of this file.
00001 // This file is automatically generated, do not edit.
00002 
00003 /*!
00004         \file
00005         \author jaz
00006 */
00007 
00008 #ifndef lestes__backend_v2__workers__alloc_int_finder_g_hh__included
00009 #define lestes__backend_v2__workers__alloc_int_finder_g_hh__included
00010 
00011 #include <lestes/std/list.hh>
00012 #include <lestes/std/vector.hh>
00013 #include <lestes/backend_v2/common.hh>
00014 #include <lestes/backend_v2/workers/worker_base.g.hh>
00015 
00016 #include <lestes/std/objectize_macros.hh>
00017 package(lestes);
00018 package(backend_v2);
00019 package(structs);
00020 class func_data;
00021 end_package(structs);
00022 end_package(backend_v2);
00023 end_package(lestes);
00024 
00025 package(lestes);
00026 package(backend_v2);
00027 package(intercode);
00028 class ge_pi;
00029 end_package(intercode);
00030 end_package(backend_v2);
00031 end_package(lestes);
00032 
00033 package(lestes);
00034 package(backend_v2);
00035 package(intercode);
00036 class ge_sp;
00037 end_package(intercode);
00038 end_package(backend_v2);
00039 end_package(lestes);
00040 
00041 package(lestes);
00042 package(backend_v2);
00043 package(intercode);
00044 class ge_operand_mem;
00045 end_package(intercode);
00046 end_package(backend_v2);
00047 end_package(lestes);
00048 
00049 package(lestes);
00050 package(backend_v2);
00051 package(intercode);
00052 class ge_operand_reg;
00053 end_package(intercode);
00054 end_package(backend_v2);
00055 end_package(lestes);
00056 
00057 package(lestes);
00058 package(backend_v2);
00059 package(workers);
00060 class liveness_range;
00061 end_package(workers);
00062 end_package(backend_v2);
00063 end_package(lestes);
00064 
00065 package(lestes);
00066 package(md);
00067 package(instructions);
00068 class tm_instr_op_reg_base;
00069 end_package(instructions);
00070 end_package(md);
00071 end_package(lestes);
00072 
00073 package(lestes);
00074 package(backend_v2);
00075 package(intercode);
00076 class pi_mem_factory;
00077 end_package(intercode);
00078 end_package(backend_v2);
00079 end_package(lestes);
00080 
00081 package(lestes);
00082 package(md);
00083 package(registers);
00084 class tm_register;
00085 end_package(registers);
00086 end_package(md);
00087 end_package(lestes);
00088 
00089 package(lestes);
00090 package(backend_v2);
00091 package(workers);
00092 
00093 
00094 class alloc_int_finder;
00095 class alloc_interval;
00096 
00097 
00098 //! Splits liveranges to a set of intervals with nonempty intersection of sets of allowed register.
00099 class alloc_int_finder : public worker_base {
00100 public:
00101         void process();
00102 
00103         ptr< ::lestes::backend_v2::structs::func_data > get_result();
00104 
00105         ptr<set<ulint> > ge_pi__get_allowed_regs_for_op(ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< ::lestes::backend_v2::intercode::ge_operand_reg > op);
00106 
00107         ptr< ::lestes::md::instructions::tm_instr_op_reg_base > ge_pi__find_tm_op_by_ge_op(ptr< ::lestes::backend_v2::intercode::ge_pi > ge, ptr< ::lestes::backend_v2::intercode::ge_operand_reg > op);
00108 
00109         
00110         //! First generated factory method for class alloc_int_finder.
00111         static ptr< alloc_int_finder > create (
00112                 ptr< ::lestes::backend_v2::structs::func_data > a__worker_base__data);
00113 
00114         
00115 
00116         //! for purposes of dumping
00117         virtual ptr<reflection_list> reflection_get() const;
00118         //! for purposes of dumping
00119         virtual ptr<field_list_list> field_values_get() const;
00120         
00121 protected:
00122         //! Generated constructor for class alloc_int_finder.
00123         alloc_int_finder (
00124                 ptr< ::lestes::backend_v2::structs::func_data > a__worker_base__data);
00125 
00126         //! Marking routine for class alloc_int_finder. 
00127         virtual void gc_mark();
00128 
00129 private:
00130         static ptr<reflection_list> reflection;
00131         
00132 }; // alloc_int_finder
00133 
00134 
00135 /*! \brief Group of pseudoinstructions that use the same register operand and it has nonempty intersection of sets of allowed registers for the operand.
00136 
00137 A register allocator takes a set of intervals and allocates a register to each interval. The operand uses the same allocated register within every pseudoinstruction
00138                 of the group.
00139 */
00140 class alloc_interval : public ::lestes::std::object {
00141 public:
00142         //! The method operand_get returns the value of the field alloc_interval::operand.
00143         ptr< ::lestes::backend_v2::intercode::ge_operand_reg > operand_get() const;
00144 
00145         //! The method operand_set sets the field alloc_interval::operand to the given value.
00146         void operand_set(const ptr< ::lestes::backend_v2::intercode::ge_operand_reg > &);
00147 
00148         //! The method rng_get returns the value of the field alloc_interval::rng.
00149         ptr< ::lestes::backend_v2::workers::liveness_range > rng_get() const;
00150 
00151         //! The method rng_set sets the field alloc_interval::rng to the given value.
00152         void rng_set(const ptr< ::lestes::backend_v2::workers::liveness_range > &);
00153 
00154         //! The method prev_get returns the value of the field alloc_interval::prev.
00155         ptr< alloc_interval > prev_get() const;
00156 
00157         //! The method prev_set sets the field alloc_interval::prev to the given value.
00158         void prev_set(const ptr< alloc_interval > &);
00159 
00160         //! The method next_get returns the value of the field alloc_interval::next.
00161         ptr< alloc_interval > next_get() const;
00162 
00163         //! The method next_set sets the field alloc_interval::next to the given value.
00164         void next_set(const ptr< alloc_interval > &);
00165 
00166         //! The method allocated_spill_place_get returns the value of the field alloc_interval::allocated_spill_place.
00167         ptr< ::lestes::backend_v2::intercode::pi_mem_factory > allocated_spill_place_get() const;
00168 
00169         //! The method allocated_spill_place_set sets the field alloc_interval::allocated_spill_place to the given value.
00170         void allocated_spill_place_set(const ptr< ::lestes::backend_v2::intercode::pi_mem_factory > &);
00171 
00172         //! The method allocated_reg_get returns the value of the field alloc_interval::allocated_reg.
00173         ptr< ::lestes::md::registers::tm_register > allocated_reg_get() const;
00174 
00175         //! The method allocated_reg_set sets the field alloc_interval::allocated_reg to the given value.
00176         void allocated_reg_set(const ptr< ::lestes::md::registers::tm_register > &);
00177 
00178         //! The method allocated_obj_prev_owner_get returns the value of the field alloc_interval::allocated_obj_prev_owner.
00179         ptr< alloc_interval > allocated_obj_prev_owner_get() const;
00180 
00181         //! The method allocated_obj_prev_owner_set sets the field alloc_interval::allocated_obj_prev_owner to the given value.
00182         void allocated_obj_prev_owner_set(const ptr< alloc_interval > &);
00183 
00184         //! The method start_get returns the value of the field alloc_interval::start.
00185         ulint start_get() const;
00186 
00187         //! The method start_set sets the field alloc_interval::start to the given value.
00188         void start_set(ulint);
00189 
00190         //! The method end_get returns the value of the field alloc_interval::end.
00191         ulint end_get() const;
00192 
00193         //! The method end_set sets the field alloc_interval::end to the given value.
00194         void end_set(ulint);
00195 
00196         //! The method instructions_get returns the value of the field alloc_interval::instructions.
00197         ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > instructions_get() const;
00198 
00199         //! The method instructions_set sets the field alloc_interval::instructions to the given value.
00200         void instructions_set(const ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > & );
00201 
00202         //! The method allowed_registers_get returns the value of the field alloc_interval::allowed_registers.
00203         ptr< ::lestes::std::set< ulint > > allowed_registers_get() const;
00204 
00205         //! The method allowed_registers_set sets the field alloc_interval::allowed_registers to the given value.
00206         void allowed_registers_set(const ptr< ::lestes::std::set< ulint > > & );
00207 
00208         
00209         //! First generated factory method for class alloc_interval.
00210         static ptr< alloc_interval > create (
00211                 ptr< ::lestes::backend_v2::intercode::ge_operand_reg > a__alloc_interval__operand,
00212                 ptr< ::lestes::backend_v2::workers::liveness_range > a__alloc_interval__rng,
00213                 ptr< alloc_interval > a__alloc_interval__prev,
00214                 ptr< alloc_interval > a__alloc_interval__next,
00215                 ptr< ::lestes::backend_v2::intercode::pi_mem_factory > a__alloc_interval__allocated_spill_place,
00216                 ptr< ::lestes::md::registers::tm_register > a__alloc_interval__allocated_reg,
00217                 ptr< alloc_interval > a__alloc_interval__allocated_obj_prev_owner,
00218                 ulint a__alloc_interval__start,
00219                 ulint a__alloc_interval__end,
00220                 ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > a__alloc_interval__instructions,
00221                 ptr< ::lestes::std::set< ulint > > a__alloc_interval__allowed_registers);
00222 
00223         //! Second generated factory method for class alloc_interval.
00224         static ptr< alloc_interval > create (
00225                 ptr< ::lestes::backend_v2::intercode::ge_operand_reg > a__alloc_interval__operand,
00226                 ptr< ::lestes::backend_v2::workers::liveness_range > a__alloc_interval__rng);
00227 
00228         
00229 
00230         //! for purposes of dumping
00231         virtual ptr<reflection_list> reflection_get() const;
00232         //! for purposes of dumping
00233         virtual ptr<field_list_list> field_values_get() const;
00234         
00235 protected:
00236         //! Generated constructor for class alloc_interval.
00237         alloc_interval (
00238                 ptr< ::lestes::backend_v2::intercode::ge_operand_reg > a__alloc_interval__operand,
00239                 ptr< ::lestes::backend_v2::workers::liveness_range > a__alloc_interval__rng,
00240                 ptr< alloc_interval > a__alloc_interval__prev,
00241                 ptr< alloc_interval > a__alloc_interval__next,
00242                 ptr< ::lestes::backend_v2::intercode::pi_mem_factory > a__alloc_interval__allocated_spill_place,
00243                 ptr< ::lestes::md::registers::tm_register > a__alloc_interval__allocated_reg,
00244                 ptr< alloc_interval > a__alloc_interval__allocated_obj_prev_owner,
00245                 ulint a__alloc_interval__start,
00246                 ulint a__alloc_interval__end,
00247                 ptr< ::lestes::std::vector< srp< ::lestes::backend_v2::intercode::ge_pi > > > a__alloc_interval__instructions,
00248                 ptr< ::lestes::std::set< ulint > > a__alloc_interval__allowed_registers);
00249 
00250         //! Marking routine for class alloc_interval. 
00251         virtual void gc_mark();
00252 
00253 private:
00254         //! A operand.
00255         srp< ::lestes::backend_v2::intercode::ge_operand_reg > operand;
00256         //! A source live range.
00257         srp< ::lestes::backend_v2::workers::liveness_range > rng;
00258         //! A preceding interval of the source live range.
00259         srp< alloc_interval > prev;
00260         //! A following interval of the source live range.
00261         srp< alloc_interval > next;
00262         //! An allocated spillplace for the interval.
00263         srp< ::lestes::backend_v2::intercode::pi_mem_factory > allocated_spill_place;
00264         //! An allocated register for the interval.
00265         srp< ::lestes::md::registers::tm_register > allocated_reg;
00266         //! An interval that uses the allocated object (register, spillplace) before the current interval.
00267         srp< alloc_interval > allocated_obj_prev_owner;
00268         //! A schedule position of the first pseudoinstruction of the interval.
00269         ulint start;
00270         //! A schedule position of the last pseudoinstruction of the interval.
00271         ulint end;
00272         //! A list of instruction of the interval.
00273         srp< ::lestes::std::vector< srp< ::lestes::backend_v2::intercode::ge_pi > > >  instructions;
00274         //! A list of allowed registers for the interval.
00275         srp< ::lestes::std::set< ulint > >  allowed_registers;
00276         static ptr<reflection_list> reflection;
00277         
00278 }; // alloc_interval
00279 
00280 
00281 end_package(workers);
00282 end_package(backend_v2);
00283 end_package(lestes);
00284 
00285 #endif // lestes__backend_v2__workers__alloc_int_finder_g_hh__included

Generated on Mon Feb 12 18:22:11 2007 for lestes by doxygen 1.5.1-20070107