protected override void Run() { if (!HasCode) { return; } if (!MethodCompiler.IsInSSAForm) { return; } if (HasProtectedRegions) { return; } var analysis = new SparseConditionalConstantPropagation(BasicBlocks, CreateTraceLog); var deadBlocks = analysis.GetDeadBlocked(); var constants = analysis.GetIntegerConstants(); RemoveDeadBlocks(deadBlocks); ReplaceVirtualRegistersWithConstants(constants); ConstantCount.Set(constants.Count); DeadBlockCount.Set(deadBlocks.Count); if (CompilerSettings.FullCheckMode) { CheckAllPhiInstructions(); } }
protected override void Run() { var analysis = new SparseConditionalConstantPropagation(BasicBlocks, this); var deadBlocks = analysis.GetDeadBlocked(); var constants = analysis.GetIntegerConstants(); RemoveDeadBlocks(deadBlocks); ReplaceVirtualRegistersWithConstants(constants); ConstantCount.Set(constants.Count); DeadBlockCount.Set(deadBlocks.Count); }
protected override void Run() { var analysis = new SparseConditionalConstantPropagation(BasicBlocks, this); var deadBlocks = analysis.GetDeadBlocked(); var constants = analysis.GetIntegerConstants(); ReplaceVirtualRegistersWithConstants(constants); RemoveDeadBlocks(deadBlocks); UpdateCounter("ConditionalConstantPropagation.ConstantVariableCount", constants.Count); UpdateCounter("ConditionalConstantPropagation.ConstantVariableUse", conditionalConstantPropagation); UpdateCounter("ConditionalConstantPropagation.DeadBlocks", deadBlocks.Count); UpdateCounter("ConditionalConstantPropagation.IRInstructionRemoved", instructionsRemovedCount); }
protected override void Run() { if (!HasCode) { return; } if (HasProtectedRegions) { return; } var analysis = new SparseConditionalConstantPropagation(BasicBlocks, CreateTraceLog); var deadBlocks = analysis.GetDeadBlocked(); var constants = analysis.GetIntegerConstants(); RemoveDeadBlocks(deadBlocks); ReplaceVirtualRegistersWithConstants(constants); ConstantCount.Set(constants.Count); DeadBlockCount.Set(deadBlocks.Count); }