Related articles |
---|
register allocation: basic blocks, liveness and next use kevin.phillips83@yahoo.com (kphillips) (2008-03-22) |
Re: register allocation: basic blocks, liveness and next use gene.ressler@gmail.com (Gene) (2008-03-22) |
Re: register allocation: basic blocks, liveness and next use max@gustavus.edu (Max Hailperin) (2008-03-23) |
Re: register allocation: basic blocks, liveness and next use max@gustavus.edu (Max Hailperin) (2008-03-23) |
Re: register allocation: basic blocks, liveness and next use max@gustavus.edu (Max Hailperin) (2008-03-23) |
Re: register allocation: basic blocks, liveness and next use kevin.phillips83@yahoo.com (kphillips) (2008-03-23) |
Re: register allocation: basic blocks, liveness and next use gene.ressler@gmail.com (Gene) (2008-03-23) |
Re: register allocation: basic blocks, liveness and next use cfc@shell01.TheWorld.com (Chris F Clark) (2008-03-23) |
[2 later articles] |
From: | Gene <gene.ressler@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Sat, 22 Mar 2008 20:47:01 -0700 (PDT) |
Organization: | Compilers Central |
References: | 08-03-084 |
Keywords: | registers |
Posted-Date: | 23 Mar 2008 10:28:11 EDT |
On Mar 22, 8:22 pm, kphillips <kevin.phillip...@yahoo.com> wrote:
> The TAC would be something of this sort:
>
> == Block 1 =========
> PUSHPARAM 2
> CALL t1 A //call A and store the return value in
> t1
> == Block 2 =========
> PUSHPARAM -3
> CALL t2 A
> == Block 3 =========
> ADD t3 = t1, t2
> PRINT t3
> =================
>
> The problem is that the temporaries in both block 1 (t1) and block 2
> (t2) would be discarded (assumed dead since they are at the end of the
> block) and block 3 can't compute the addition.
>
> Am I missing something here?
Perhaps the definition of a basic block.
The definition of a temporary requires that none of its defs can reach
the end of the corresponding block. Obviously your t1..3 don't meet
this requirement.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.