freenode/#sicl - IRC Chatlog
Search
6:19:37
beach
Random ideas about register allocation. I have been pondering how to express the x86 constraint that for a typical operation, the first operand must be in the same register as the result. I think I can express that constraint by introducing anonymous registers with an identity. So if I have z <- op(x, y), I can express that as R <- x, R <- op(R, y), z <- R.
6:20:06
beach
Then the problem of register allocation is reduced to assigning anonymous registers to real ones.
6:20:56
beach
I would have a mix between anonymous and real registers in LIR because instructions such as the FUNCALL-INSTRUCTION require arguments to be assigned to specific registers.
6:29:41
beach
Also, it is not quite correct to say that a lexical variable is "assigned to a register", because at any program point, several registers can contain the value of that variable. Take my previous example. A valid solution might have x in some register R' /= R before the operation. Then R <- x will make both R and R' contain the value of x.
6:30:30
beach
I mention that because I think some published techniques for register allocation assume at most one register for each variable.