summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bearch.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-06-19 07:43:14 +0200
committerMatthias Braun <matze@braunis.de>2015-06-19 07:46:02 +0200
commit7726c953c2fc56ba65a50a634c521a4d1225a381 (patch)
treece02f4caec5453a91a7024713ab3ad905b963160 /ir/be/bearch.h
parent2109a91a5fe049e0b11a99b4bb070a9d20498292 (diff)
move op_estimated_cost callback to isa_if; remove arch_irn_ops
Diffstat (limited to 'ir/be/bearch.h')
-rw-r--r--ir/be/bearch.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/ir/be/bearch.h b/ir/be/bearch.h
index 0d28c0e..409da65 100644
--- a/ir/be/bearch.h
+++ b/ir/be/bearch.h
@@ -62,8 +62,6 @@ ENUM_BITSET(arch_register_req_type_t)
extern arch_register_req_t const arch_no_requirement;
#define arch_no_register_req (&arch_no_requirement)
-int arch_get_op_estimated_cost(const ir_node *irn);
-
/**
* Get the register allocated for a value.
*/
@@ -277,16 +275,6 @@ static inline bool reg_reqs_equal(const arch_register_req_t *req1,
return true;
}
-struct arch_irn_ops_t {
- /**
- * Get the estimated cycle count for @p irn.
- *
- * @param irn The node.
- * @return The estimated cycle count for this operation
- */
- int (*get_op_estimated_cost)(const ir_node *irn);
-};
-
/**
* Architecture interface.
*/
@@ -334,6 +322,12 @@ struct arch_isa_if_t {
* intrinsics here.
*/
void (*handle_intrinsics)(ir_graph *irg);
+
+ /**
+ * Get a cost estimation for node @p irn. The cost should be similar to the
+ * number of cycles necessary to execute the instruction.
+ */
+ unsigned (*get_op_estimated_cost)(const ir_node *irn);
};
static inline bool arch_irn_is_ignore(const ir_node *irn)