/// <summary> /// Checks whether there is a definition from the beginning to the use node /// </summary> /// <param name="fdef"></param> /// <param name="otherDefinedOffsets"></param> /// <returns></returns> private bool HasDefinitionFromRootToUseNode(DUCoverStore dcs, FieldDefUseStore fuse, HashSet <int> otherDefinedOffsets) { DEFUSE_FEASIBILITY_TYPE feasibilityVal; if (this.feasibilityDicCache.TryGetValue(fuse, out feasibilityVal)) { if (feasibilityVal == DEFUSE_FEASIBILITY_TYPE.USE_FEASIBLE) { return(false); } else { return(true); } } InstructionGraph ig = dcs.GetInstructionGraph(fuse.Method); DepthFirstTraversal dft = new DepthFirstTraversal(ig); InstructionVertex iv = ig.GetVertex(fuse.Offset); var result = dft.HasDefClearPathFromBeginning(iv, otherDefinedOffsets); if (result) { this.feasibilityDicCache[fuse] = DEFUSE_FEASIBILITY_TYPE.USE_FEASIBLE; } else { this.feasibilityDicCache[fuse] = DEFUSE_FEASIBILITY_TYPE.USE_INFEASIBLE; } return(!result); }