4 * @author Sebastian Hack
6 * Backend node support.
8 * Copyright (C) 2005 Universitaet Karlsruhe
9 * Released under the GPL
15 #include "firm_config.h"
25 #define BE_SPILL_NO_OFFSET ((unsigned) -1)
37 void be_node_init(void);
39 const arch_irn_handler_t be_node_irn_handler;
41 ir_node *be_new_Spill(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_node *node_to_spill, ir_node *ctx);
42 ir_node *be_new_Reload(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_mode *mode, ir_node *spill_node);
43 ir_node *be_new_Copy(const arch_register_class_t *cls, ir_graph *irg, ir_node *block, ir_node *in);
44 ir_node *be_new_Perm(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int arity, ir_node *in[]);
45 ir_node *be_new_Keep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int arity, ir_node *in[]);
47 ir_node *be_spill(const arch_env_t *arch_env, ir_node *irn,ir_node *spill_ctx);
48 ir_node *be_reload(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *irn, int pos, ir_mode *mode, ir_node *spill);
50 int be_is_Spill(const ir_node *irn);
51 int be_is_Reload(const ir_node *irn);
52 int be_is_Copy(const ir_node *irn);
53 int be_is_Perm(const ir_node *irn);
54 int be_is_Keep(const ir_node *irn);
56 void be_set_Spill_entity(ir_node *irn, entity *ent);
57 entity *be_get_spill_entity(ir_node *irn);
59 ir_node *be_get_Spill_context(const ir_node *irn);
63 * Modify the output register requirements of a Perm.
64 * This function incur register constraints to an output value of a Perm.
65 * This is used when handling register constraints in general,
68 void be_set_Perm_out_req(ir_node *irn, int pos, const arch_register_req_t *req);
71 * Insert a Perm node after a specific node in the schedule.
72 * The Perm permutes over all values live at the given node.
73 * This means that all liveness intervals are cut apart at this
74 * location in the program.
76 ir_node *insert_Perm_after(const arch_env_t *env,
77 const arch_register_class_t *cls,
78 dom_front_info_t *dom_front,
81 #endif /* _BENODE_T_H */