[Mono-dev] Global register allocator in JIT

Sergey Tikhonov tsv at solvo.ru
Tue Oct 10 16:24:24 EDT 2006


Hello,

I am trying to make global register allocator to work on Alpha mono 
port. It started to use dedicated global registers, but
I could not get an idea how it supposed to work. For example:
DUMP BLOCK 2:
 (beq[B3B4] (compare (and (or (long_conv_to_i4 (ldind.i 
regvar[alpha_r12])) (long_conv_to_i4 (ldind.i regvar[alpha_r13]))) 
iconst[3]) iconst[0]))
uses alpha_r12 and alpha_r13 registers that hold args passed to a method 
(so far good). But this code is translated to:
LOCAL REGALLOC: BASIC BLOCK: 2
        1  move R34 <- alpha_r12
        2  conv.i4 R33 <- R34
        3  move R36 <- alpha_r13
        4  conv.i4 R35 <- R36
        5  int_or R32 <- R33 R35
        6  int_and_imm R31 <- R32
        7  alpha_cmp_imm_eq R31
        8  int_bne_un
Now it start to use local registers to do conv.i4 conversion. Why it can 
use allocated global regs as source regs for conv opcode?
Should peephole pass to handle this? (but it would get complex :( ) How 
it should work?

Thank you,
Sergey.

tsv at solvo.ru
Solvo Ltd.






More information about the Mono-devel-list mailing list