public void compute_MOP_Solution() { if (isEmpty()) return; // Don't bother to compute soln if we have no facts available. // 1. Initialize work list based on flow direction to make processing efficient! LinkedList<U> workList = generateWorkList(); // 2. Initialize a bitset with a flag set for all basic blocks int numNodes = scope.getCFG().getMaxNodeID(); BitSet bbSet = new BitSet(1+numNodes); bbSet.flip(0, numNodes); // set all bits from default of 0 to 1 (enebo: could we invert this in algo?) // 3. Iteratively compute data flow info while (!workList.isEmpty()) { workList.removeFirst().computeDataFlowInfo(workList, bbSet); } }
public void compute_MOP_Solution() { if (isEmpty()) return; // Don't bother to compute soln if we have no facts available. // 1. Initialize work list based on flow direction to make processing efficient! LinkedList<U> workList = generateWorkList(); // 2. Initialize a bitset with a flag set for all basic blocks int numNodes = scope.getCFG().getMaxNodeID(); BitSet bbSet = new BitSet(1+numNodes); bbSet.flip(0, numNodes); // set all bits from default of 0 to 1 (enebo: could we invert this in algo?) // 3. Iteratively compute data flow info while (!workList.isEmpty()) { workList.removeFirst().computeDataFlowInfo(workList, bbSet); } }
public void compute_MOP_Solution() { /** Are there are available data flow facts to run this problem? SSS FIXME: Silly optimization? */ if (!isEmpty()) { // 2. Initialize work list based on flow direction to make processing efficient! LinkedList<FlowGraphNode> workList = getInitialWorkList(); // 3. Initialize a bitset with a flag set for all basic blocks int numNodes = scope.cfg().getMaxNodeID(); BitSet bbSet = new BitSet(1+numNodes); bbSet.flip(0, numNodes); // 4. Iteratively compute data flow info while (!workList.isEmpty()) { workList.removeFirst().computeDataFlowInfo(workList, bbSet); } } }
public void compute_MOP_Solution() { /** Are there are available data flow facts to run this problem? SSS FIXME: Silly optimization? */ if (!isEmpty()) { // 2. Initialize work list based on flow direction to make processing efficient! LinkedList<FlowGraphNode> workList = getInitialWorkList(); // 3. Initialize a bitset with a flag set for all basic blocks int numNodes = scope.cfg().getMaxNodeID(); BitSet bbSet = new BitSet(1+numNodes); bbSet.flip(0, numNodes); // 4. Iteratively compute data flow info while (!workList.isEmpty()) { workList.removeFirst().computeDataFlowInfo(workList, bbSet); } } }
@Override public Object execute(IRScope scope, Object... data) { CFG cfg = (CFG) data[0]; try { buildDominatorTree(cfg, cfg.postOrderList(), cfg.getMaxNodeID()); } catch (Exception e) { LOG.debug("Caught exception building dom tree for {}", scope.cfg()); } return null; }
@Override public Object execute(IRScope scope, Object... data) { CFG cfg = (CFG) data[0]; try { buildDominatorTree(cfg, cfg.postOrderList(), cfg.getMaxNodeID()); } catch (Exception e) { LOG.debug("Caught exception building dom tree for {}", scope.getCFG()); } return null; }
@Override public Object execute(IRScope scope, Object... data) { CFG cfg = (CFG) data[0]; try { buildDominatorTree(cfg, cfg.postOrderList(), cfg.getMaxNodeID()); } catch (Exception e) { LOG.debug("Caught exception building dom tree for {}", scope.getCFG()); } return null; }
@Override public Object execute(IRScope scope, Object... data) { CFG cfg = (CFG) data[0]; try { buildDominatorTree(cfg, cfg.postOrderList(), cfg.getMaxNodeID()); } catch (Exception e) { LOG.debug("Caught exception building dom tree for {}", scope.cfg()); } return null; }
LinkedList<BasicBlock> list = new LinkedList<BasicBlock>(); Stack<BasicBlock> stack = new Stack<BasicBlock>(); BitSet visited = new BitSet(1 + getMaxNodeID());
LinkedList<BasicBlock> list = new LinkedList<BasicBlock>(); Stack<BasicBlock> stack = new Stack<BasicBlock>(); BitSet visited = new BitSet(1 + getMaxNodeID());
LinkedList<BasicBlock> list = new LinkedList<>(); Stack<BasicBlock> stack = new Stack<>(); boolean[] visited = new boolean[1 + getMaxNodeID()];
LinkedList<BasicBlock> list = new LinkedList<>(); Stack<BasicBlock> stack = new Stack<>(); boolean[] visited = new boolean[1 + getMaxNodeID()];