/// <summary> /// Create program point graph from source begining by entryPoint /// </summary> /// <param name="entryBlock">Entry point into source (all feasible basic blocks will be included in program point graph)</param> /// <param name="sourceObject">Object that is source for program point graph (Function declaration, GlobalCode,...)</param> private ProgramPointGraph(BasicBlock entryBlock, LangElement sourceObject) { ProgramPointGraphID = PPG_ID++; Context = new PPGraphContext(this); SourceObject = sourceObject; _context = new PPGraphBuildingContext(this); var startBlock = _context.CreateSubprogramEntryBlock(out Start, entryBlock); var endBlock = _context.CreateEmptyBlock(out End); buildGraph(startBlock); //connecting end points has to be done before contracting (because of loosing child less points) connectChildLessPoints(); contractBlocks(); foreach (var point in Points) { point.SetOwningGraph(this); } //Associate everything in subgraph EvaluationLog.AssociatePointHierarchy(Start); }