X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firmemory.h;h=fbc22461c2d17dce743f8a6147d76a66454f31f0;hb=e3e0e94d6bcf4257ff00c8bc173d13fd279932b1;hp=7670ad11977ec48fb41ae979d978513e2cfc41c4;hpb=435f2de77041f8056be00afb00b6ca5bc3ce53fc;p=libfirm diff --git a/include/libfirm/irmemory.h b/include/libfirm/irmemory.h index 7670ad119..fbc22461c 100644 --- a/include/libfirm/irmemory.h +++ b/include/libfirm/irmemory.h @@ -36,11 +36,11 @@ typedef enum { ir_sure_alias /**< Sure alias. */ } ir_alias_relation; -/** The state of the address taken flags. */ +/** The state of the entity usage flags. */ typedef enum { - ir_address_taken_not_computed, /**< Address taken flag is not computed. */ - ir_address_taken_computed /**< Address taken flag is computed. */ -} ir_address_taken_computed_state; + ir_entity_usage_not_computed, + ir_entity_usage_computed +} ir_entity_usage_computed_state; /** Possible options for the memory disambiguator. */ typedef enum { @@ -64,8 +64,9 @@ typedef enum { ir_sc_argument = 0x3, /**< an method argument */ ir_sc_tls = 0x4, /**< an address of a thread local storage variable */ ir_sc_malloced = 0x5, /**< an allocated heap address */ + ir_sc_globaladdr = 0x6, /**< a constant address of something, said to be alias free */ - ir_sc_modifier_nottaken = 0x80, /**< if set, the address of the variable was not taken */ + ir_sc_modifier_nottaken = 0x80 /**< if set, the address of the variable was not taken */ } ir_storage_class_class_t; /** @@ -164,44 +165,35 @@ ir_alias_relation get_alias_relation_ex( */ void mem_disambig_term(void); -/** - * Returns the current address taken state of the graph. - */ -ir_address_taken_computed_state get_irg_address_taken_state(const ir_graph *irg); +ir_entity_usage_computed_state get_irg_entity_usage_state(const ir_graph *irg); -/** - * Sets the current address taken state of the graph. - * - * @param irg the graph - * @param state the new state - */ -void set_irg_address_taken_state(ir_graph *irg, ir_address_taken_computed_state state); +void set_irg_entity_usage_state(ir_graph *irg, ir_entity_usage_computed_state state); /** - * Assure that the address taken flag is computed for the given graph. + * Assure that the entity usage flags have been computed for the given graph. * - * This is an intraprocedural analysis that computes the address_taken state + * This is an intraprocedural analysis that computes the entity usage state * for all local variables. * * Note that this is a conservative estimation that by no Firm transformation * can be invalidated, so it's only recomputed if manually triggered by calling - * set_irg_address_taken_state(irg, ir_address_taken_not_computed). + * set_irg_entity_usage_state(irg, ir_entity_usage_not_computed). * Even then the information is not cleaned from the variables, call - * assure_irg_address_taken_computed() again for recomputation. + * assure_irg_entity_usage_computed() again for recomputation. */ -void assure_irg_address_taken_computed(ir_graph *irg); +void assure_irg_entity_usage_computed(ir_graph *irg); /** * Returns the current address taken state of the globals. */ -ir_address_taken_computed_state get_irp_globals_address_taken_state(void); +ir_entity_usage_computed_state get_irp_globals_entity_usage_state(void); /** * Sets the current address taken state of the globals. * * @param state the new state */ -void set_irp_globals_address_taken_state(ir_address_taken_computed_state state); +void set_irp_globals_entity_usage_state(ir_entity_usage_computed_state state); /** * Assure that the address taken flag is computed for the global and TLS entities (variables). @@ -211,11 +203,11 @@ void set_irp_globals_address_taken_state(ir_address_taken_computed_state state); * * Note that this is a conservative estimation that by no Firm transformation * can be invalidated, so it's only recomputed if manually triggered by calling - * set_irp_globals_address_taken_state(ir_address_taken_not_computed). + * set_irp_globals_entity_usage_state(ir_entity_usage_not_computed). * Even then the information is not cleaned from the variables, call - * assure_irp_globals_address_taken_computed() again for recomputation. + * assure_irp_globals_entity_usage_computed() again for recomputation. */ -void assure_irp_globals_address_taken_computed(void); +void assure_irp_globals_entity_usage_computed(void); /** * Get the memory disambiguator options for a graph.