private void CheckAndClearEmptyBlock(BasicBlock block)
        {
            if (block.PreviousBlocks.Count != 0 || block.IsHeadBlock)
            {
                return;
            }

            trace?.Log($"*** Removed Block: {block}");

            var nextBlocks = block.NextBlocks.ToArray();

            EmptyBlockOfAllInstructions(block);

            BaseMethodCompilerStage.RemoveBlocksFromPHIInstructions(block, nextBlocks);

            foreach (var next in nextBlocks)
            {
                CheckAndClearEmptyBlock(next);
            }
        }
Beispiel #2
0
 public static void RemoveBlocksFromPHIInstructions(BasicBlock removedBlock, BasicBlock[] phiBlocks)
 {
     BaseMethodCompilerStage.RemoveBlocksFromPHIInstructions(removedBlock, phiBlocks);
 }