Commit c4f6f664 authored by Sebastian Hack's avatar Sebastian Hack
Browse files

Added classify wrapper function.

parent da5841fc
...@@ -149,3 +149,9 @@ extern void arch_set_irn_register(const arch_env_t *env, ...@@ -149,3 +149,9 @@ extern void arch_set_irn_register(const arch_env_t *env,
assert(idx >= 0); assert(idx >= 0);
ops->set_irn_reg(ops, irn, idx, reg); ops->set_irn_reg(ops, irn, idx, reg);
} }
extern arch_irn_class_t arch_irn_classify(const arch_env_t *env, const ir_node *irn)
{
const arch_irn_ops_t *ops = get_irn_ops(env, irn);
return ops->classify(ops, irn);
}
...@@ -392,6 +392,14 @@ arch_get_irn_register(const arch_env_t *env, const ir_node *irn, int idx); ...@@ -392,6 +392,14 @@ arch_get_irn_register(const arch_env_t *env, const ir_node *irn, int idx);
extern void arch_set_irn_register(const arch_env_t *env, extern void arch_set_irn_register(const arch_env_t *env,
ir_node *irn, int idx, const arch_register_t *reg); ir_node *irn, int idx, const arch_register_t *reg);
/**
* Classify a node.
* @param env The architecture environment.
* @param irn The node.
* @return A classification of the node.
*/
extern arch_irn_class_t arch_irn_classify(const arch_env_t *env, const ir_node *irn);
#define arch_irn_has_reg_class(env, irn, pos, cls) \ #define arch_irn_has_reg_class(env, irn, pos, cls) \
((cls) == arch_get_irn_reg_class(env, irn, pos)) ((cls) == arch_get_irn_reg_class(env, irn, pos))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment