use of com.jopdesign.common.code.ControlFlowGraph.BasicBlockNode in project jop by jop-devel.
the class WCETTool method dfaInfeasibleEdge.
/**
* Get infeasible edges for certain basic block call string
* @param cfg the CFG containing the block
* @param block get infeasible outgoing edges for the block
* @param cs the callstring
* @return The infeasible edges for this basic block
*/
private List<CFGEdge> dfaInfeasibleEdge(ControlFlowGraph cfg, BasicBlock block, CallString cs) {
List<CFGEdge> retval = new LinkedList<CFGEdge>();
if (getDfaLoopBounds() != null) {
LoopBounds lbs = getDfaLoopBounds();
Set<FlowEdge> edges = lbs.getInfeasibleEdges(block.getLastInstruction(), cs);
for (FlowEdge e : edges) {
BasicBlockNode head = cfg.getHandleNode(e.getHead());
BasicBlockNode tail = cfg.getHandleNode(e.getTail());
CFGEdge edge = cfg.getEdge(tail, head);
if (edge != null) {
retval.add(edge);
} else {
// edge does was removed from the CFG
// logger.warn("The infeasible edge between "+head+" and "+tail+" does not exist");
}
}
}
return retval;
}
Aggregations