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