private static IEnumerable<IRLTransformation> GetTransformations(Dex target, MethodBody body) { foreach (var transformation in optimizations1) { transformation.Transform(target, body); yield return transformation; } var noopRemove = new NopRemoveTransformation(); noopRemove.Transform(target, body); yield return noopRemove; bool hasChanges = true; while (hasChanges) { hasChanges = false; foreach (var transformation in incrementalOptimizations) { bool changed = transformation.Transform(target, body); if (changed) noopRemove.Transform(target, body); hasChanges = changed || hasChanges; yield return transformation; } } foreach (var transformation in optimizations2) { transformation.Transform(target, body); yield return transformation; } }
private static IEnumerable <IRLTransformation> GetTransformations(Dex target, MethodBody body) { foreach (var transformation in optimizations1) { transformation.Transform(target, body); yield return(transformation); } var noopRemove = new NopRemoveTransformation(); noopRemove.Transform(target, body); yield return(noopRemove); bool hasChanges = true; while (hasChanges) { hasChanges = false; foreach (var transformation in incrementalOptimizations) { bool changed = transformation.Transform(target, body); if (changed) { noopRemove.Transform(target, body); } hasChanges = changed || hasChanges; yield return(transformation); } } foreach (var transformation in optimizations2) { transformation.Transform(target, body); yield return(transformation); } }