X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeirg.h;h=a3f9e5f36dfa9ab924abcfe49565a1a4e911cfc0;hb=493bdbad35484ae790f9d098c439048c95091d3f;hp=0ce62e4f852e64f7993b4420ea568f21d0c8ba67;hpb=c8ed98c9de91c1b252b3c2e184471bbee953c696;p=libfirm diff --git a/ir/be/beirg.h b/ir/be/beirg.h index 0ce62e4f8..a3f9e5f36 100644 --- a/ir/be/beirg.h +++ b/ir/be/beirg.h @@ -56,16 +56,18 @@ void be_free_birg(ir_graph *irg); * - frame_type: A class type describing the frame layout. */ struct be_stack_layout_t { - ir_type *arg_type; /**< A type describing the stack argument layout. */ - ir_type *between_type; /**< A type describing the "between" layout. */ - ir_type *frame_type; /**< The frame type. */ - - ir_type *order[N_FRAME_TYPES]; /**< arg, between and frame types ordered. */ - - ir_entity **param_map; /**< An array mapping type parameters to arg_type entries */ - int initial_offset; /**< the initial difference between stack pointer and frame pointer */ - int initial_bias; /**< the initial stack bias */ - int stack_dir; /**< -1 for decreasing, 1 for increasing. */ + ir_type *arg_type; /**< A type describing the stack argument layout. */ + ir_type *between_type; /**< A type describing the "between" layout. */ + ir_type *frame_type; /**< The frame type. */ + + ir_type *order[N_FRAME_TYPES]; /**< arg, between and frame types ordered. */ + + ir_entity **param_map; /**< An array mapping type parameters to arg_type entries */ + int initial_offset; /**< the initial difference between stack pointer and frame pointer */ + int initial_bias; /**< the initial stack bias */ + int stack_dir; /**< -1 for decreasing, 1 for increasing. */ + bool sp_relative : 1; /**< entities are addressed relative to + stack pointer (omit-fp mode) */ }; /** @@ -76,15 +78,19 @@ typedef struct be_irg_t { ir_graph *irg; be_main_env_t *main_env; be_abi_irg_t *abi; - arch_code_generator_t *cg; ir_exec_freq *exec_freq; be_dom_front_info_t *dom_front; be_lv_t *lv; be_stack_layout_t stack_layout; + unsigned *allocatable_regs; /**< registers available for the + allocator */ + arch_register_req_t *sp_req; /**< requirements for stackpointer producing + nodes. */ struct obstack obst; /**< birg obstack (mainly used to keep register constraints which we can't keep - in the irg obst, because it gets replace + in the irg obst, because it gets replaced during code selection) */ + void *isa_link; /**< architecture specific per-graph data*/ } be_irg_t; static inline be_irg_t *be_birg_from_irg(const ir_graph *irg) @@ -117,14 +123,14 @@ static inline be_abi_irg_t *be_get_irg_abi(const ir_graph *irg) return be_birg_from_irg(irg)->abi; } -static inline be_options_t *be_get_irg_options(const ir_graph *irg) +static inline void be_set_irg_abi(ir_graph *irg, be_abi_irg_t *abi) { - return be_birg_from_irg(irg)->main_env->options; + be_birg_from_irg(irg)->abi = abi; } -static inline arch_code_generator_t *be_get_irg_cg(const ir_graph *irg) +static inline be_options_t *be_get_irg_options(const ir_graph *irg) { - return be_birg_from_irg(irg)->cg; + return be_birg_from_irg(irg)->main_env->options; } /** deprecated */