With multiple ranges per interval it is expensive to calculate interval intersection. We do not have to check intersection between current and intervals which have incompatible register type. That's because this information will not be used after all. pick_register() will not consider those registers. For example, we do not have to check at which position XMM0 register is available if we are allocating a general purpose register.
Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- jit/linear-scan.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/jit/linear-scan.c b/jit/linear-scan.c index 187eb49..c824104 100644 --- a/jit/linear-scan.c +++ b/jit/linear-scan.c @@ -210,6 +210,9 @@ static void allocate_blocked_reg(struct live_interval *current, if (it->fixed_reg) continue; + if (!reg_supports_type(it->reg, current->var_info->vm_type)) + continue; + if (intervals_intersect(it, current)) { pos = next_use_pos(it, interval_start(current)); set_use_pos(use_pos, it->reg, pos); @@ -227,6 +230,9 @@ static void allocate_blocked_reg(struct live_interval *current, if (!it->fixed_reg) continue; + if (!reg_supports_type(it->reg, current->var_info->vm_type)) + continue; + if (intervals_intersect(it, current)) { unsigned long pos; @@ -277,6 +283,9 @@ static void try_to_allocate_free_reg(struct live_interval *current, } list_for_each_entry(it, inactive, interval_node) { + if (!reg_supports_type(it->reg, current->var_info->vm_type)) + continue; + if (intervals_intersect(it, current)) { unsigned long pos; -- 1.6.3.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