X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbenode_t.h;h=5654ced6e886855f007ac103e2214ae297a363a1;hb=f5a1564c99cbdfc8d4773385beeb10f45a989755;hp=499fb11527305df7795ee54ba8daf1e891df7432;hpb=2cc256e5c8310acfebb981a3671c78e116a449fb;p=libfirm diff --git a/ir/be/benode_t.h b/ir/be/benode_t.h index 499fb1152..5654ced6e 100644 --- a/ir/be/benode_t.h +++ b/ir/be/benode_t.h @@ -17,6 +17,7 @@ #include "irmode.h" #include "irnode.h" +#include "be_t.h" #include "bearch.h" struct _be_node_factory_t { @@ -33,18 +34,17 @@ struct _be_node_factory_t { typedef struct _be_node_factory_t be_node_factory_t; -be_node_factory_t *be_node_factory_init(be_node_factory_t *factory, - const arch_isa_if_t *isa); +be_node_factory_t *be_node_factory_init(be_node_factory_t *factory, const arch_isa_t *isa); const arch_irn_handler_t *be_node_get_irn_handler(const be_node_factory_t *f); ir_node *new_Spill(const be_node_factory_t *factory, const arch_register_class_t *cls, - ir_graph *irg, ir_node *bl, ir_node *node_to_spill); + ir_graph *irg, ir_node *bl, ir_node *node_to_spill, ir_node *ctx); ir_node *new_Reload(const be_node_factory_t *factory, - const arch_register_class_t *cls, - ir_graph *irg, ir_node *bl, ir_node *spill_node); + const arch_register_class_t *cls, ir_graph *irg, + ir_node *bl, ir_mode *mode, ir_node *spill_node); ir_node *new_Perm(const be_node_factory_t *factory, const arch_register_class_t *cls, @@ -54,15 +54,39 @@ ir_node *new_Copy(const be_node_factory_t *factory, const arch_register_class_t *cls, ir_graph *irg, ir_node *block, ir_node *in); -ir_node *be_spill(const be_node_factory_t *factory, const arch_env_t *env, ir_node *irn); -ir_node *be_reload(const be_node_factory_t *factory, const arch_env_t *env, ir_node *irn); +ir_node *be_spill( + const be_node_factory_t *factory, + const arch_env_t *arch_env, + ir_node *irn, + ir_node *spill_ctx); + +ir_node *be_reload( + const be_node_factory_t *factory, + const arch_env_t *arch_env, + const arch_register_class_t *cls, + ir_node *irn, int pos, ir_mode *mode, ir_node *spill); -int is_Spill(const be_node_factory_t *f, const ir_node *irn); +int is_Spill(const ir_node *irn); -ir_node *get_Reload_Spill(ir_node *reload); +int is_Perm(const ir_node *irn); -void insert_perm(const be_node_factory_t *factory, - const arch_register_class_t *reg_class, - ir_node *in_front_of); +/** + * Modify the output register requirements of a Perm. + * This function incur register constraints to an output value of a Perm. + * This is used when handling register constraints in general, + * see beconstrperm.c + */ +void be_set_Perm_out_req(ir_node *irn, int pos, const arch_register_req_t *req); + +/** + * Insert a Perm node after a specific node in the schedule. + * The Perm permutes over all values live at the given node. + * This means that all liveness intervals are cut apart at this + * location in the program. + */ +ir_node *insert_Perm_after(const be_main_env_t *env, + const arch_register_class_t *cls, + dom_front_info_t *dom_front, + ir_node *pos); #endif /* _BENODE_T_H */