boolean (ControlFlow flow, int maybeDominator, int target) { class MyVisitor extends InstructionClientVisitor<Boolean> { private final BitSet myReachedWithoutDominator = new BitSet(); @Override public void visitInstruction(Instruction instruction, int offset, int nextOffset) { super.visitInstruction(instruction, offset, nextOffset); if (nextOffset != maybeDominator && (target == nextOffset || myReachedWithoutDominator.get(nextOffset))) { myReachedWithoutDominator.set(offset); } } @Override public Boolean getResult() { return myReachedWithoutDominator.get(0); } } MyVisitor visitor = new MyVisitor(); depthFirstSearch(flow, visitor, 0, target); return !visitor.getResult(); }