X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fia32%2Fia32_address_mode.h;h=524d54ae18e7a8d21a9c5a90143beb69cb4f1dbe;hb=8b7e7d88a5985399f40e45ff3ebc93d6606c8511;hp=a424d8ebf6673f73afac7096b1eb88bb2016e926;hpb=8974b94349462d835b33ad4f896d1821986458bd;p=libfirm diff --git a/ir/be/ia32/ia32_address_mode.h b/ir/be/ia32/ia32_address_mode.h index a424d8ebf..524d54ae1 100644 --- a/ir/be/ia32/ia32_address_mode.h +++ b/ir/be/ia32/ia32_address_mode.h @@ -35,21 +35,29 @@ */ typedef struct ia32_address_t ia32_address_t; struct ia32_address_t { - ir_node *base; /**< The base register (if any) */ - ir_node *index; /**< The index register (if any). */ - ir_node *mem; /**< The memory value (if any). */ - int offset; /**< An integer offset. */ - int scale; /**< An integer scale. {0,1,2,3} */ - ir_entity *symconst_ent; /**< A SynConst entity if any. */ - int use_frame; /**< Set, if the frame is accessed */ - ir_entity *frame_entity; /**< The accessed frame entity if any. */ - int symconst_sign; /**< The "sign" of the symconst. */ + ir_node *base; /**< The base register (if any) */ + ir_node *index; /**< The index register (if any). */ + ir_node *mem; /**< The memory value (if any). */ + int offset; /**< An integer offset. */ + int scale; /**< An integer scale. {0,1,2,3} */ + ir_entity *symconst_ent; /**< A SynConst entity if any. */ + int use_frame; /**< Set, if the frame is accessed */ + ir_entity *frame_entity; /**< The accessed frame entity if any. */ + int symconst_sign; /**< The "sign" of the symconst. */ }; +typedef enum ia32_create_am_flags_t { + ia32_create_am_force = 1U << 0, /**< Ignore the marking of node as a + non-address-mode node */ + ia32_create_am_double_use = 1U << 1 /**< Fold AM, even if the root of + address calculation has two users. + This is useful for dest AM */ +} ia32_create_am_flags_t; + /** * Create an address mode for a given node. */ -void ia32_create_address_mode(ia32_address_t *addr, ir_node *node, int force); +void ia32_create_address_mode(ia32_address_t *addr, ir_node *node, ia32_create_am_flags_t); /** * Mark those nodes of the given graph that cannot be used inside an @@ -65,7 +73,7 @@ void ia32_free_non_address_mode_nodes(void); /** * Tells whether the given node is a non address mode node. */ -int ia32_is_non_address_mode_node(ir_node *node); +int ia32_is_non_address_mode_node(ir_node const *node); /** * mark a node so it will not be used as part of address modes