/* Make a fourcc for border checking. */
#define BORDER_FOURCC FOURCC('B', 'O', 'R', 'D')
-int has_reg_class(const be_chordal_env_t *env, const ir_node *irn)
-{
- return arch_irn_consider_in_reg_alloc(env->cls, irn);
-}
-
static inline border_t *border_add(be_chordal_env_t *env, struct list_head *head,
ir_node *irn, unsigned step, unsigned pressure,
unsigned is_def, unsigned is_real)
*/
void create_borders(ir_node *block, void *env_ptr);
-/**
- * Check, if an irn is of the register class currently under processing.
- * @param env The chordal environment.
- * @param irn The node.
- * @return 1, if the node is of that register class, 0 if not.
- */
-int has_reg_class(const be_chordal_env_t *env, const ir_node *irn);
-
/**
* Insert perm nodes
* @param env The chordal environment.
#define border_next(b) (list_entry((b)->list.next, border_t, list))
#define border_prev(b) (list_entry((b)->list.prev, border_t, list))
-#define chordal_has_class(chordal_env, irn) \
- arch_irn_consider_in_reg_alloc(chordal_env->cls, irn)
+/**
+ * Check, if an irn is of the register class currently under processing.
+ * @param env The chordal environment.
+ * @param irn The node.
+ * @return whether the node is of that register class.
+ */
+static inline bool has_reg_class(be_chordal_env_t const *const env, ir_node const *const irn)
+{
+ return arch_irn_consider_in_reg_alloc(env->cls, irn);
+}
void be_ra_chordal_color(be_chordal_env_t *chordal_env);
static void collect_phis_walker(ir_node *irn, void *data)
{
be_chordal_env_t *env = (be_chordal_env_t*)data;
- if (is_Phi(irn) && chordal_has_class(env, irn)) {
+ if (is_Phi(irn) && has_reg_class(env, irn)) {
ir_node *bl = get_nodes_block(irn);
set_irn_link(irn, get_irn_link(bl));
set_irn_link(bl, irn);