#include "main/bitset.h"
#include "register_allocate.h"
-#define NO_REG ~0
+#define NO_REG ~0U
struct ra_reg {
BITSET_WORD *conflicts;
ra_add_transitive_reg_conflict(struct ra_regs *regs,
unsigned int base_reg, unsigned int reg)
{
- int i;
+ unsigned int i;
ra_add_reg_conflict(regs, reg, base_reg);
for (rc = 0; rc < regs->count; rc++) {
int conflicts = 0;
- int i;
+ unsigned int i;
if (!reg_belongs_to_class(rc, regs->classes[c]))
continue;
}
}
- if (!progress && best_optimistic_node != ~0) {
+ if (!progress && best_optimistic_node != ~0U) {
decrement_q(g, best_optimistic_node);
g->stack[g->stack_count] = best_optimistic_node;
g->stack_count++;
static bool
ra_select(struct ra_graph *g)
{
- int i;
int start_search_reg = 0;
while (g->stack_count != 0) {
+ unsigned int i;
unsigned int ri;
unsigned int r = -1;
int n = g->stack[g->stack_count - 1];
static float
ra_get_spill_benefit(struct ra_graph *g, unsigned int n)
{
- int j;
+ unsigned int j;
float benefit = 0;
int n_class = g->nodes[n].class;