X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbenode_t.h;h=db9259f1b52f815f2f24c50f1056c34ed790248f;hb=7b71c0bebe3c21ae2bfe11ebaa0ade64e3e39cdb;hp=72289c34ddbab3903c676a60b165bfb86dff1156;hpb=8b5f5ff3484444ec7f2143e19e9b0029892cf1af;p=libfirm diff --git a/ir/be/benode_t.h b/ir/be/benode_t.h index 72289c34d..db9259f1b 100644 --- a/ir/be/benode_t.h +++ b/ir/be/benode_t.h @@ -157,6 +157,20 @@ void be_set_Copy_op(ir_node *cpy, ir_node *op); * Make a new Perm node. */ ir_node *be_new_Perm(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int arity, ir_node *in[]); + +/** + * Reduce a Perm. + * Basically, we provide a map to remap the Perm's arguments. If an entry in the + * map is -1, the argument gets deleted. + * This function takes care, that the register data and the input array reflects + * the changes described by the map. + * This is needed by the Perm optimization/movement in belower.c, see push_through_perm(). + * @param perm The perm node. + * @param new_size The new number of arguments (must be smaller or equal to the current one). + * @param map A map assigning each operand a new index (or -1 to indicate deletion). + */ +void be_Perm_reduce(ir_node *perm, int new_size, int *map); + /** * Create a new MemPerm node. */ @@ -211,9 +225,10 @@ enum { }; enum { - pn_be_AddSP_res = 0, - pn_be_AddSP_M = 1, - pn_be_AddSP_last = 2 + pn_be_AddSP_sp = 0, + pn_be_AddSP_res = 1, + pn_be_AddSP_M = 2, + pn_be_AddSP_last = 3 }; /** @@ -240,7 +255,7 @@ enum { }; enum { - pn_be_SubSP_res = 0, + pn_be_SubSP_sp = 0, pn_be_SubSP_M = 1, pn_be_SubSP_last = 2 };