}
if (life->start < entry->start &&
- life->end >= entry->start)
+ life->end+1 >= entry->start)
{
/* starts earlier and overlaps */
entry->start = life->start;
}
}
-void ir_value_dump_life(ir_value *self, int (*oprintf)(const char*,...))
+void ir_value_dump_life(const ir_value *self, int (*oprintf)(const char*,...))
{
size_t i;
- oprintf("Life of %s:\n", self->name);
+ oprintf("Life of %12s:", self->name);
for (i = 0; i < self->life_count; ++i)
{
oprintf(" + [%i, %i]\n", self->life[i].start, self->life[i].end);
bool ir_values_overlap(const ir_value*, const ir_value*);
void ir_value_dump(ir_value*, int (*oprintf)(const char*,...));
-void ir_value_dump_life(ir_value *self, int (*oprintf)(const char*,...));
+void ir_value_dump_life(const ir_value *self, int (*oprintf)(const char*,...));
/* A vector of IR values */
typedef struct {