Ejemplo n.º 1
0
 /**
  * The entry point for this phase
  *
  * @param ir the IR
  * @param forward Should we compute regular dominators, or post-dominators?
  * @param unfactor Should we unfactor the CFG?
  */
 public static void perform(IR ir, boolean forward, boolean unfactor) {
   if (ir.hasReachableExceptionHandlers()) {
     if (unfactor) {
       ir.unfactor();
     } else {
       throw new OperationNotImplementedException("IR with exception handlers");
     }
   }
   LTDominators dom = new LTDominators(ir, forward);
   dom.analyze(ir);
 }
Ejemplo n.º 2
0
 /**
  * Compute approximate dominator/post dominator without unfactoring exception handlers. Can only
  * be used if what the client wants is approximate domination (ie, if it doesn't actually have to
  * be correct...)
  *
  * @param ir the IR
  * @param forward Should we compute regular dominators, or post-dominators?
  */
 public static void approximate(IR ir, boolean forward) {
   LTDominators dom = new LTDominators(ir, forward);
   dom.analyze(ir);
 }