and I started mutlithreading SortCommutativeRegisterUses as seen below.
Optimizations (in Simple.java)
- // Compute defList, useList, useCount fields for each register.
DefUse.computeDU(ir); - // Recompute isSSA flags
DefUse.recomputeSSA(ir); - / Simple copy propagation.
// This pass incrementally updates the register list.
copyPropagation(ir); - // Simple type propagation.
// This pass uses the register list, but doesn't modify it.
if (typeProp) {
typePropagation(ir);
} - // Perform simple bounds-check and arraylength elimination.
// This pass incrementally updates the register list
if (foldChecks) {
arrayPropagation(ir);
} - // Simple dead code elimination.
// This pass incrementally updates the register list
eliminateDeadInstructions(ir); - // constant folding
// This pass usually doesn't modify the DU, but
// if it does it will recompute it.
foldConstants(ir);
// Simple local expression folding respecting DU
if (ir.options.LOCAL_EXPRESSION_FOLDING && ExpressionFolding.performLocal(ir)) {
// constant folding again
foldConstants(ir);
} - // Try to remove conditional branches with constant operands
// If it actually constant folds a branch,
// this pass will recompute the DU
if (foldBranches) {
simplifyConstantBranches(ir);
} - // Should we sort commutative use operands
if (sortRegisters) {
sortCommutativeRegisterUses(ir);
}
In this code we multithread SortCommuativeRegisterUses optimization by forking a thread per Instruction clearly the granularity is to fine and we need to optimize the algorithm.
./rvm -X:aos:initial_compiler=opt -classpath dacapo-2006-10-MR2.jar Harness fop
Running Time
SpeedUps
No comments:
Post a Comment