Search in sources :

Example 11 with DF_LatticeCell

use of org.jikesrvm.compilers.opt.dfsolver.DF_LatticeCell in project JikesRVM by JikesRVM.

the class Dominators method updateBlocks.

/**
 * Creates a {@code DominatorInfo} for each basic block
 * in the data flow system solution.
 *
 * @param solution the solution to the Dominators equations
 */
public void updateBlocks(DF_Solution solution) {
    int capacityToPreventRehash = (int) (solution.size() * 1.4f);
    dominatorInfo = new HashMap<BasicBlock, DominatorInfo>(capacityToPreventRehash);
    for (final DF_LatticeCell latticeCell : solution.values()) {
        DominatorCell cell = (DominatorCell) latticeCell;
        BasicBlock b = cell.block;
        dominatorInfo.put(b, new DominatorInfo(cell.dominators));
        if (DEBUG) {
            System.out.println("Dominators of " + b + ":" + cell.dominators);
        }
    }
}
Also used : DF_LatticeCell(org.jikesrvm.compilers.opt.dfsolver.DF_LatticeCell) BasicBlock(org.jikesrvm.compilers.opt.ir.BasicBlock)

Aggregations

DF_LatticeCell (org.jikesrvm.compilers.opt.dfsolver.DF_LatticeCell)11 BasicBlock (org.jikesrvm.compilers.opt.ir.BasicBlock)4 ArrayCell (org.jikesrvm.compilers.opt.ssa.IndexPropagation.ArrayCell)2 ObjectCell (org.jikesrvm.compilers.opt.ssa.IndexPropagation.ObjectCell)2 Enumeration (java.util.Enumeration)1 TypeReference (org.jikesrvm.classloader.TypeReference)1 OptimizingCompilerException (org.jikesrvm.compilers.opt.OptimizingCompilerException)1 HeapOperand (org.jikesrvm.compilers.opt.ir.operand.HeapOperand)1 Operand (org.jikesrvm.compilers.opt.ir.operand.Operand)1