Class GotoLoopDetection
- java.lang.Object
-
- com.ensoftcorp.open.c.commons.analysis.GotoLoopDetection
-
public class GotoLoopDetection extends java.lang.Object
It uses immediate dominance (idom) analysis to detect Goto loop and add tag as Goto_Back_Edge to the edge which cause loop. It also gives the count of Goto loops.- Author:
- Sharwan Ram
-
-
Constructor Summary
Constructors Constructor Description GotoLoopDetection()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<com.ensoftcorp.atlas.core.db.graph.Node,com.ensoftcorp.atlas.core.db.graph.Node>
getIDOM(com.ensoftcorp.atlas.core.query.Q function)
Returns an immediate dominator (idom) mapping in the control flow graph of the given functionstatic java.lang.String
recoverFunctionGotoLoops(com.ensoftcorp.atlas.core.query.Q cfg)
static java.lang.String
recoverGotoLoops()
static java.lang.String
recoverGotoLoops(com.ensoftcorp.atlas.core.query.Q app)
-
-
-
Method Detail
-
recoverGotoLoops
public static java.lang.String recoverGotoLoops()
-
recoverGotoLoops
public static java.lang.String recoverGotoLoops(com.ensoftcorp.atlas.core.query.Q app)
-
recoverFunctionGotoLoops
public static java.lang.String recoverFunctionGotoLoops(com.ensoftcorp.atlas.core.query.Q cfg)
-
getIDOM
public static java.util.Map<com.ensoftcorp.atlas.core.db.graph.Node,com.ensoftcorp.atlas.core.db.graph.Node> getIDOM(com.ensoftcorp.atlas.core.query.Q function)
Returns an immediate dominator (idom) mapping in the control flow graph of the given function- Parameters:
function
-- Returns:
- Map which contains immediate dominator (idom) mapping, like:- (node, idom of node)
-
-