summaryrefslogtreecommitdiffhomepage
path: root/ir/be/benode.h
diff options
context:
space:
mode:
authorChristoph Mallon <mallon@cs.uni-saarland.de>2015-08-07 23:53:17 +0200
committerChristoph Mallon <mallon@cs.uni-saarland.de>2015-08-09 09:47:27 +0200
commit36de184977ec02d6df9a3194520ae19307c526eb (patch)
treeb69c227f7437bfe564ba891160fa9cdd97ac9b8d /ir/be/benode.h
parent4f7811db7b0ad2348da3689d6f43ed07aa48d2f5 (diff)
be: Reintroduce be_Start.
All backends have similar empty Start nodes, which just provide registers. So having one generic backend Start node to share some infrastructure is sensible.
Diffstat (limited to 'ir/be/benode.h')
-rw-r--r--ir/be/benode.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/ir/be/benode.h b/ir/be/benode.h
index ea1acf0..fd226be 100644
--- a/ir/be/benode.h
+++ b/ir/be/benode.h
@@ -29,7 +29,8 @@ typedef enum be_opcode {
beo_MemPerm,
beo_Perm,
beo_Relocation,
- beo_last = beo_Relocation
+ beo_Start,
+ beo_last = beo_Start
} be_opcode;
typedef struct be_node_attr_t {
@@ -50,6 +51,7 @@ extern ir_op *op_be_Keep;
extern ir_op *op_be_MemPerm;
extern ir_op *op_be_Perm;
extern ir_op *op_be_Relocation;
+extern ir_op *op_be_Start;
/**
* Determines if irn is a be_node.
@@ -193,16 +195,26 @@ ir_entity *be_get_Relocation_entity(ir_node const* node);
unsigned be_get_Relocation_kind(ir_node const* node);
+typedef enum be_start_out {
+ BE_START_NO,
+ BE_START_REG,
+ BE_START_IGNORE,
+} be_start_out;
+
+ir_node *be_new_Start(ir_graph *irg, be_start_out const *outs);
+
+ir_node *be_get_Start_mem(ir_graph *irg);
+
/**
- * Create a new Proj node. Its mode is determined from the out requirement
- * @p pos of @p pred.
+ * Get Proj of start node with a specific register.
*/
-ir_node *be_new_Proj(ir_node *pred, unsigned pos);
+ir_node *be_get_Start_proj(ir_graph *irg, arch_register_t const *reg);
/**
- * Search for output of start node with a specific register
+ * Create a new Proj node. Its mode is determined from the out requirement
+ * @p pos of @p pred.
*/
-ir_node *be_get_initial_reg_value(ir_graph *irg, const arch_register_t *reg);
+ir_node *be_new_Proj(ir_node *pred, unsigned pos);
/**
* Gets the Proj with number pn from irn.
@@ -218,6 +230,7 @@ static inline bool be_is_MemPerm (const ir_node *irn) { return get_irn_op(irn)
static inline bool be_is_Keep (const ir_node *irn) { return get_irn_op(irn) == op_be_Keep ; }
static inline bool be_is_IncSP (const ir_node *irn) { return get_irn_op(irn) == op_be_IncSP ; }
static inline bool be_is_Relocation(const ir_node *irn) { return get_irn_op(irn) == op_be_Relocation; }
+static inline bool be_is_Start (const ir_node *irn) { return get_irn_op(irn) == op_be_Start ; }
static inline be_asm_attr_t const *get_be_asm_attr_const(ir_node const *const asmn)
{