1 instantiation of BasicBlockAnalysisData
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (1)
24new(() => new BasicBlockAnalysisData());
83 references to BasicBlockAnalysisData
Microsoft.CodeAnalysis.Workspaces (83)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.AnalysisData.cs (17)
27/// Pooled <see cref="BasicBlockAnalysisData"/> allocated during analysis with the 30private readonly ArrayBuilder<BasicBlockAnalysisData> _allocatedBasicBlockAnalysisDatas; 39_allocatedBasicBlockAnalysisDatas = ArrayBuilder<BasicBlockAnalysisData>.GetInstance(); 77public BasicBlockAnalysisData CurrentBlockAnalysisData { get; } 82public BasicBlockAnalysisData AdditionalConditionalBranchAnalysisData { get; } 91public BasicBlockAnalysisData AnalyzeLocalFunctionInvocation(IMethodSymbol localFunction, CancellationToken cancellationToken) 105var result = AnalyzeLocalFunctionInvocationCore(localFunction, cancellationToken); 111public BasicBlockAnalysisData AnalyzeLambdaInvocation(IFlowAnonymousFunctionOperation lambda, CancellationToken cancellationToken) 120var result = AnalyzeLambdaInvocationCore(lambda, cancellationToken); 126protected abstract BasicBlockAnalysisData AnalyzeLocalFunctionInvocationCore(IMethodSymbol localFunction, CancellationToken cancellationToken); 127protected abstract BasicBlockAnalysisData AnalyzeLambdaInvocationCore(IFlowAnonymousFunctionOperation lambda, CancellationToken cancellationToken); 168public BasicBlockAnalysisData CreateBlockAnalysisData() 170var instance = BasicBlockAnalysisData.GetInstance(); 175public void TrackAllocatedBlockAnalysisData(BasicBlockAnalysisData allocatedData) 243public void SetCurrentBlockAnalysisDataFrom(BasicBlockAnalysisData newBlockAnalysisData) 251foreach (var instance in _allocatedBasicBlockAnalysisDatas)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.BasicBlockAnalysisData.cs (10)
23private static readonly ObjectPool<BasicBlockAnalysisData> s_pool = 35public static BasicBlockAnalysisData GetInstance() => s_pool.Allocate(); 53public void SetAnalysisDataFrom(BasicBlockAnalysisData other) 121public bool Equals(BasicBlockAnalysisData other) 177public static BasicBlockAnalysisData Merge( 178BasicBlockAnalysisData data1, 179BasicBlockAnalysisData data2, 180Action<BasicBlockAnalysisData> trackAllocatedData) 205var mergedData = GetInstance(); 225private static void AddEntries(Dictionary<ISymbol, PooledHashSet<IOperation>> result, BasicBlockAnalysisData source)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.cs (1)
43BasicBlockAnalysisData AnalyzeLocalFunction(IMethodSymbol localFunction)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (29)
21private sealed partial class DataFlowAnalyzer : DataFlowAnalyzer<BasicBlockAnalysisData> 35var entryBlockAnalysisData = GetEmptyAnalysisData(); 44_ = CustomDataFlowAnalysis<BasicBlockAnalysisData>.Run(cfg, analyzer, cancellationToken); 51private static BasicBlockAnalysisData AnalyzeLocalFunctionOrLambdaInvocation( 62var resultBlockAnalysisData = CustomDataFlowAnalysis<BasicBlockAnalysisData>.Run(cfg, analyzer, cancellationToken); 72var clonedBasicBlockData = parentAnalysisData.CreateBlockAnalysisData(); 88public override BasicBlockAnalysisData AnalyzeBlock(BasicBlock basicBlock, CancellationToken cancellationToken) 119public override BasicBlockAnalysisData AnalyzeNonConditionalBranch( 121BasicBlockAnalysisData currentBlockAnalysisData, 125public override (BasicBlockAnalysisData fallThroughSuccessorData, BasicBlockAnalysisData conditionalSuccessorData) AnalyzeConditionalBranch( 127BasicBlockAnalysisData currentAnalysisData, 131using var savedCurrentAnalysisData = BasicBlockAnalysisData.GetInstance(); 134var newCurrentAnalysisData = AnalyzeBranch(basicBlock.FallThroughSuccessor, basicBlock, currentAnalysisData, cancellationToken); 138var fallThroughSuccessorData = _analysisData.AdditionalConditionalBranchAnalysisData; 140var conditionalSuccessorData = AnalyzeBranch(basicBlock.ConditionalSuccessor, basicBlock, savedCurrentAnalysisData, cancellationToken); 145private BasicBlockAnalysisData AnalyzeBranch( 148BasicBlockAnalysisData currentBlockAnalysisData, 198public override BasicBlockAnalysisData GetCurrentAnalysisData(BasicBlock basicBlock) 201public override BasicBlockAnalysisData GetEmptyAnalysisData() 204public override void SetCurrentAnalysisData(BasicBlock basicBlock, BasicBlockAnalysisData data, CancellationToken cancellationToken) 207public override bool IsEqual(BasicBlockAnalysisData analysisData1, BasicBlockAnalysisData analysisData2) 210public override BasicBlockAnalysisData Merge( 211BasicBlockAnalysisData analysisData1, 212BasicBlockAnalysisData analysisData2, 214=> BasicBlockAnalysisData.Merge(analysisData1, analysisData2, _analysisData.TrackAllocatedBlockAnalysisData);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (16)
22private sealed partial class DataFlowAnalyzer : DataFlowAnalyzer<BasicBlockAnalysisData> 29/// Map from basic block to current <see cref="BasicBlockAnalysisData"/> for dataflow analysis. 31private readonly PooledDictionary<BasicBlock, BasicBlockAnalysisData> _analysisDataByBasicBlockMap; 36private readonly Func<IMethodSymbol, ControlFlowGraph, AnalysisData, CancellationToken, BasicBlockAnalysisData> _analyzeLocalFunctionOrLambdaInvocation; 76PooledDictionary<BasicBlock, BasicBlockAnalysisData> analysisDataByBasicBlockMap, 80Func<IMethodSymbol, ControlFlowGraph, AnalysisData, CancellationToken, BasicBlockAnalysisData> analyzeLocalFunctionOrLambdaInvocation, 119Func<IMethodSymbol, ControlFlowGraph, AnalysisData, CancellationToken, BasicBlockAnalysisData> analyzeLocalFunctionOrLambdaInvocation) 164private static PooledDictionary<BasicBlock, BasicBlockAnalysisData> CreateAnalysisDataByBasicBlockMap( 167var builder = PooledDictionary<BasicBlock, BasicBlockAnalysisData>.GetInstance(); 202public BasicBlockAnalysisData GetBlockAnalysisData(BasicBlock basicBlock) 205public BasicBlockAnalysisData GetOrCreateBlockAnalysisData(BasicBlock basicBlock, CancellationToken cancellationToken) 399var mergedAnalysisData = _analysisDataByBasicBlockMap[basicBlock]; 425public void SetBlockAnalysisData(BasicBlock basicBlock, BasicBlockAnalysisData data) 428public void SetBlockAnalysisDataFrom(BasicBlock basicBlock, BasicBlockAnalysisData data, CancellationToken cancellationToken) 486protected override BasicBlockAnalysisData AnalyzeLocalFunctionInvocationCore(IMethodSymbol localFunction, CancellationToken cancellationToken) 501protected override BasicBlockAnalysisData AnalyzeLambdaInvocationCore(IFlowAnonymousFunctionOperation lambda, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.OperationTreeAnalysisData.cs (5)
21private readonly Func<IMethodSymbol, BasicBlockAnalysisData> _analyzeLocalFunction; 27Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 43Func<IMethodSymbol, BasicBlockAnalysisData> analyzeLocalFunction) 52protected override BasicBlockAnalysisData AnalyzeLocalFunctionInvocationCore(IMethodSymbol localFunction, CancellationToken cancellationToken) 59protected override BasicBlockAnalysisData AnalyzeLambdaInvocationCore(IFlowAnonymousFunctionOperation lambda, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.Walker.cs (5)
349var newAnalysisData = _currentAnalysisData.AnalyzeLocalFunctionInvocation(localFunction, _cancellationToken); 355var newAnalysisData = _currentAnalysisData.AnalyzeLambdaInvocation(lambda, _cancellationToken); 531var savedCurrentAnalysisData = _currentAnalysisData.CreateBlockAnalysisData(); 534var mergedAnalysisData = _currentAnalysisData.CreateBlockAnalysisData(); 539mergedAnalysisData = BasicBlockAnalysisData.Merge(mergedAnalysisData,