From: Pekka Enberg <penb...@cs.helsinki.fi> The ->end member of struct live_range is not part of the range. Fix up some range end checks in jit/linear-scan.c which assume ->end is part of the range.
Cc: Arthur HUILLET <arthur.huil...@free.fr> Signed-off-by: Pekka Enberg <penb...@cs.helsinki.fi> --- Arthur, I'd appreciate if you had a look at this patch before I go ahead and merge it. I don't think it fixes any of the issues we've seen but it should make the register allocator to spill less in some situations. jit/linear-scan.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jit/linear-scan.c b/jit/linear-scan.c index 5197d0d..5538bc7 100644 --- a/jit/linear-scan.c +++ b/jit/linear-scan.c @@ -232,7 +232,7 @@ static void allocate_blocked_reg(struct live_interval *current, } current->need_spill = 1; - } else if (block_pos[reg] > current->range.end) { + } else if (block_pos[reg] >= current->range.end) { /* Spilling made a register free for the whole current */ current->reg = reg; spill_all_intervals_intersecting(current, reg, active, @@ -283,7 +283,7 @@ static void try_to_allocate_free_reg(struct live_interval *current, return; } - if (current->range.end < free_until_pos[reg]) { + if (current->range.end <= free_until_pos[reg]) { /* * Register available for the full interval. */ -- 1.5.6.3 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel