Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,271 of 2,753    |
|    Gene to kphillips    |
|    Re: register allocation: basic blocks, l    |
|    22 Mar 08 20:47:01    |
   
   From: gene.ressler@gmail.com   
      
   On Mar 22, 8:22 pm, kphillips 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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca