X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeirg.h;h=3be9065b46a1f051c9a4680b61ae386d88e89f4e;hb=f84594874e48e9883cfb1e040856f3f56782c956;hp=a96452046caec6d8bf4f3af972d19a005d62fcf5;hpb=f8cc15664f571aa7ef89d6f6bc8d5bd2b8ca7d53;p=libfirm diff --git a/ir/be/beirg.h b/ir/be/beirg.h index a96452046..3be9065b4 100644 --- a/ir/be/beirg.h +++ b/ir/be/beirg.h @@ -31,13 +31,21 @@ #include "be_t.h" #include "irtypes.h" -be_lv_t *be_assure_liveness(ir_graph *irg); - -void be_assure_dom_front(ir_graph *irg); -void be_invalidate_dom_front(ir_graph *irg); +void be_assure_live_sets(ir_graph *irg); +void be_assure_live_chk(ir_graph *irg); +/** + * Liveness is invalid (call when nodes have been added but the control + * flow has not been changed) + */ +void be_invalidate_live_sets(ir_graph *irg); +/** + * Call when control flow has changed. + * be_invalidate_live_sets() is called. + */ +void be_invalidate_live_chk(ir_graph *irg); /** - * frees all memory allocated by birg structures (liveness, dom_front, ...). + * frees all memory allocated by birg structures (liveness, ...). * The memory of the birg structure itself is not freed. */ void be_free_birg(ir_graph *irg); @@ -61,7 +69,6 @@ struct be_stack_layout_t { 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 */ bool sp_relative : 1; /**< entities are addressed relative to @@ -76,8 +83,6 @@ typedef struct be_irg_t { ir_graph *irg; be_main_env_t *main_env; be_abi_irg_t *abi; - 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 @@ -106,16 +111,6 @@ static inline be_lv_t *be_get_irg_liveness(const ir_graph *irg) return be_birg_from_irg(irg)->lv; } -static inline ir_exec_freq *be_get_irg_exec_freq(const ir_graph *irg) -{ - return be_birg_from_irg(irg)->exec_freq; -} - -static inline be_dom_front_info_t *be_get_irg_dom_front(const ir_graph *irg) -{ - return be_birg_from_irg(irg)->dom_front; -} - static inline be_abi_irg_t *be_get_irg_abi(const ir_graph *irg) { return be_birg_from_irg(irg)->abi; @@ -126,11 +121,6 @@ static inline void be_set_irg_abi(ir_graph *irg, be_abi_irg_t *abi) be_birg_from_irg(irg)->abi = abi; } -static inline be_options_t *be_get_irg_options(const ir_graph *irg) -{ - return be_birg_from_irg(irg)->main_env->options; -} - /** deprecated */ static inline ir_graph *be_get_birg_irg(const be_irg_t *birg) { @@ -144,8 +134,10 @@ static inline const arch_env_t *be_get_irg_arch_env(const ir_graph *irg) static inline struct obstack *be_get_be_obst(const ir_graph *irg) { - be_irg_t *birg = be_birg_from_irg(irg); - return &birg->obst; + be_irg_t *const birg = be_birg_from_irg(irg); + struct obstack *const obst = &birg->obst; + assert(obstack_object_size(obst) == 0); + return obst; } static inline be_stack_layout_t *be_get_irg_stack_layout(const ir_graph *irg)