2 types derived from BasicBlock
Microsoft.CodeAnalysis (2)
CodeGen\BasicBlock.cs (2)
656
private class PooledBasicBlock :
BasicBlock
675
internal class BasicBlockWithHandlerScope :
BasicBlock
92 references to BasicBlock
Microsoft.CodeAnalysis (90)
CodeGen\BasicBlock.cs (20)
56
public static readonly ObjectPool<
BasicBlock
> Pool = CreatePool(32);
57
private static ObjectPool<
BasicBlock
> CreatePool(int size)
59
return new ObjectPool<
BasicBlock
>(() => new PooledBasicBlock(), size);
135
public
BasicBlock
NextBlock;
193
public
BasicBlock
BranchBlock
197
BasicBlock
result = null;
287
var
branchBlock = BranchBlock;
365
var
next = this.NextNontrivial;
388
private
BasicBlock
NextNontrivial
392
var
next = this.NextBlock;
404
private bool TryOptimizeSameAsNext(
BasicBlock
next, ref int delta)
442
private bool TryOptimizeBranchOverUncondBranch(
BasicBlock
next, ref int delta)
457
var
toRemove = this.NextBlock;
458
var
branchBlock = this.BranchBlock;
491
private bool TryOptimizeBranchToNextOrRet(
BasicBlock
next, ref int delta)
520
private bool TryOptimizeBranchToEquivalent(
BasicBlock
next, ref int delta)
557
private static bool AreIdentical(
BasicBlock
one,
BasicBlock
another)
670
BasicBlock
.Pool.Free(this);
736
public void GetBranchBlocks(ArrayBuilder<
BasicBlock
> branchBlocksBuilder)
CodeGen\ILBuilder.cs (46)
32
internal readonly
BasicBlock
leaderBlock;
35
private
BasicBlock
_lastCompleteBlock;
36
private
BasicBlock
_currentBlock;
88
private
BasicBlock
GetCurrentBlock()
104
var
block = _scopeManager.CreateBlock(this);
118
private void UpdatesForCreatedBlock(
BasicBlock
block)
176
BasicBlock
current = this.GetCurrentBlock();
261
ArrayBuilder<
BasicBlock
> reachableBlocks = ArrayBuilder<
BasicBlock
>.GetInstance();
271
private static void PushReachableBlockToProcess(ArrayBuilder<
BasicBlock
> reachableBlocks,
BasicBlock
block)
282
private static void MarkReachableFrom(ArrayBuilder<
BasicBlock
> reachableBlocks,
BasicBlock
block)
333
private static void MarkReachableFromBranch(ArrayBuilder<
BasicBlock
> reachableBlocks,
BasicBlock
block)
335
var
branchBlock = block.BranchBlock;
357
private static void RedirectBranchToBlockedDestination(
BasicBlock
block, object blockedDest)
364
var
newBranchBlock = block.BranchBlock;
374
private static object BlockedBranchDestination(
BasicBlock
src,
BasicBlock
dest)
427
private static void MarkReachableFromTry(ArrayBuilder<
BasicBlock
> reachableBlocks,
BasicBlock
block)
469
private static void MarkReachableFromFilter(ArrayBuilder<
BasicBlock
> reachableBlocks,
BasicBlock
block)
478
private static void MarkReachableFromSwitch(ArrayBuilder<
BasicBlock
> reachableBlocks,
BasicBlock
block)
481
var blockBuilder = ArrayBuilder<
BasicBlock
>.GetInstance();
484
foreach (
var
targetBlock in blockBuilder)
519
var
targetBlock = labelInfo.bb;
525
BasicBlock
targetsTarget = null;
579
var
targetBlock = labelInfo.bb;
585
BasicBlock
targetsTarget = null;
678
var
current = leaderBlock;
704
var
current = leaderBlock;
714
var
current = leaderBlock;
731
var
current = leaderBlock;
765
private static bool IsSpecialEndHandlerBlock(
BasicBlock
block)
779
var
current = leaderBlock;
834
var
current = leaderBlock;
893
for (
var
block = leaderBlock; block != null; block = block.NextBlock)
927
var blockBuilder = ArrayBuilder<
BasicBlock
>.GetInstance();
930
foreach (
var
branchBlock in blockBuilder)
1019
var
curBlock = GetCurrentBlock();
1218
private bool AllBlocks(Func<
BasicBlock
, bool> predicate)
1220
var
current = leaderBlock;
1240
BasicBlock
curBlock = GetCurrentBlock();
CodeGen\ILBuilderEmit.cs (7)
120
var
block = this.GetCurrentBlock();
195
var
block = this.GetCurrentBlock();
316
var
block = this.GetCurrentBlock();
325
var
block = this.GetCurrentBlock();
342
var
block = this.GetCurrentBlock();
351
private
BasicBlock
FinishFilterCondition()
353
var
block = this.GetCurrentBlock();
CodeGen\LabelInfo.cs (3)
22
internal readonly
BasicBlock
? bb;
42
internal LabelInfo(
BasicBlock
? bb, int stack, bool targetOfConditionalBranches)
49
internal LabelInfo WithNewTarget(
BasicBlock
? bb)
CodeGen\LocalScopeManager.cs (14)
93
internal
BasicBlock
CreateBlock(ILBuilder builder)
321
protected ImmutableArray<
BasicBlock
>.Builder Blocks;
380
public virtual
BasicBlock
CreateBlock(ILBuilder builder)
383
var
block = enclosingHandler == null ?
391
private static
BasicBlock
AllocatePooledBlock(ILBuilder builder)
393
var
block =
BasicBlock
.Pool.Allocate();
405
protected void AddBlock(
BasicBlock
block)
409
Blocks = ImmutableArray.CreateBuilder<
BasicBlock
>(4);
437
var
block = Blocks[i];
482
var
block = Blocks[i];
550
private
BasicBlock
_lastFilterConditionBlock;
606
public
BasicBlock
LastFilterConditionBlock => _lastFilterConditionBlock;
634
public override
BasicBlock
CreateBlock(ILBuilder builder)
Microsoft.CodeAnalysis.Test.Utilities (2)
Metadata\ILBuilderVisualizer.cs (2)
163
var
current = builder.leaderBlock;
222
var
branchBlock = block.BranchBlock;