( int round, RegAlloc alloc )
| 65 | // - At block head, "push" the new live-out to prior blocks. |
| 66 | // - - If they pick up new live-outs, put them on the worklist. |
| 67 | |
| 68 | public static boolean build( int round, RegAlloc alloc ) { |
| 69 | // Reset all to empty |
| 70 | resetBBLiveOut(); |
| 71 | resetIFG(); |
| 72 | |
| 73 | // Last block has nothing live out |
| 74 | assert WORK.isEmpty(); |
| 75 | for( CFGNode bb : alloc._code._cfg ) |
| 76 | if( bb.blockHead()) |
| 77 | WORK.push( bb ); |
| 78 | |
| 79 | // Process blocks until no more changes |
| 80 | while( !WORK.isEmpty() ) |
| 81 | do_block(round,alloc,WORK.pop()); |
| 82 | |
| 83 | return alloc.success(); |
| 84 | } |
| 85 | |
| 86 | // Walk one block backwards, compute live-in from live-out, and build IFG |
no test coverage detected