X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firgraph.h;h=53a284b941a2de9a27e788916e740cc1a77c6a39;hb=889c0e4537bfe15888e29c5b41f1eaa1eac94443;hp=87bb9dc109a184f2a906c1a597d0e149a6c46a51;hpb=3a1332a3ef152098ab60ec5a30c66e495abd8ba0;p=libfirm diff --git a/include/libfirm/irgraph.h b/include/libfirm/irgraph.h index 87bb9dc10..53a284b94 100644 --- a/include/libfirm/irgraph.h +++ b/include/libfirm/irgraph.h @@ -521,6 +521,7 @@ enum ir_resources_enum_t { /* global (irp) resources */ IR_RESOURCE_ENTITY_LINK = 1 << 8, /**< IR-entity link fields are used. */ + IR_RESOURCE_TYPE_VISITED = 1 << 9, /**< type visited flags */ /* masks */ IR_RESOURCE_LOCAL_MASK = 0x00FF, /**< Mask for all local resources. */ @@ -533,11 +534,26 @@ void ir_reserve_resources(ir_graph *irg, ir_resources_t resources); void ir_free_resources(ir_graph *irg, ir_resources_t resources); ir_resources_t ir_resources_reserved(const ir_graph *irg); #else -#define ir_reserve_resources(irg,resources) -#define ir_free_resources(irg,resources) +#define ir_reserve_resources(irg,resources) (void)0 +#define ir_free_resources(irg,resources) (void)0 #define ir_resources_reserved(irg) 0 #endif +/** + * Graph State + */ +typedef enum { + IR_GRAPH_STATE_KEEP_MUX = 1 << 0, /**< should perform no further optimisations on Mux nodes */ + IR_GRAPH_STATE_ARCH_DEP = 1 << 1, /**< should not construct more nodes which irarch potentially breaks down */ +} ir_graph_state_t; + +/** set some state flags on the graph (this does not clear the other flags) */ +void set_irg_state(ir_graph *irg, ir_graph_state_t state); +/** clear some state flags of the graph */ +void clear_irg_state(ir_graph *irg, ir_graph_state_t state); +/** query wether a set of graph state flags are activated */ +int is_irg_state(const ir_graph *irg, ir_graph_state_t state); + /** Normalization: Move Proj nodes into the same block as its predecessors */ void normalize_proj_nodes(ir_graph *irg);