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