#include "entity_t.h"
#include "be_t.h"
-#include "bearch.h"
+#include "bearch_t.h"
#define BE_OUT_POS(p) (-((p) + 1))
ir_node *be_new_MemPerm(const arch_env_t *arch_env, ir_graph *irg, ir_node *bl, int n, ir_node *in[]);
ir_node *be_new_Keep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int arity, ir_node *in[]);
+void be_Keep_add_node(ir_node *keep, const arch_register_class_t *cls, ir_node *node);
+
ir_node *be_new_FrameLoad(const arch_register_class_t *cls_frame, const arch_register_class_t *cls_data,
ir_graph *irg, ir_node *bl, ir_node *mem, ir_node *frame, ir_entity *ent);
ir_node *be_new_FrameStore(const arch_register_class_t *cls_frame, const arch_register_class_t *cls_data,
/** Returns the number of real returns values */
int be_Return_get_n_rets(ir_node *ret);
+/** appends a node to the return node, returns the position of the node */
+int be_Return_append_node(ir_node *ret, ir_node *node);
+
/**
* Construct a new Stack Parameter node.
*/
ir_node *be_new_Barrier(ir_graph *irg, ir_node *bl, int n, ir_node *in[]);
+/**
+ * Appends a node to a barrier, returns the result proj of the node
+ */
+ir_node *be_Barrier_append_node(ir_node *barrier, ir_node *node);
+
+/**
+ * Appends a register out requirement to a RegParams node
+ *
+ * @returns the proj node for the new register
+ */
+ir_node *be_RegParams_append_out_reg(ir_node *regparams,
+ const arch_env_t *arch_env,
+ const arch_register_t *reg);
+
/**
* Make a spill node.
*
int be_is_IncSP(const ir_node *irn);
int be_is_SetSP(const ir_node *irn);
int be_is_AddSP(const ir_node *irn);
+int be_is_SubSP(const ir_node *irn);
int be_is_RegParams(const ir_node *irn);
int be_is_StackParam(const ir_node *irn);
int be_is_FrameAddr(const ir_node *irn);
*/
void be_phi_handler_reset(arch_irn_handler_t *handler);
+/**
+ * Set the register requirements for a phi node.
+ */
+void be_set_phi_reg_req(const arch_env_t *arch_env, ir_node *phi,
+ const arch_register_req_t *req);
+
+/*
+ * Set flags for a phi node
+ */
+void be_set_phi_flags(const arch_env_t *arch_env, ir_node *phi,
+ arch_irn_flags_t flags);
+
/**
* irn handler for common be nodes.
*/