public CompositePass(CompilerPass cp1, CompilerPass cp2) { passes = new List <CompilerPass>(); passes.Add(cp1); passes.Add(cp2); passName = "Composite Pass ( "; foreach (CompilerPass cp in passes) { passName += cp.passName + " "; } passName += ")"; }
public StaticInliningAndUnrollingPass(StaticSettings settings) { this.settings = settings; passName = "Static Inlining and Loop Unrolling (" + settings.staticInlining.ToString() + "," + settings.numLoopUnrolls.ToString() + ")"; if (settings.numLoopUnrolls < 0 && settings.staticInlining <= 0) { // no-op cp = null; } else if (settings.numLoopUnrolls < 0) { cp = new InliningPass(settings.staticInlining); } else if (settings.staticInlining <= 0) { cp = new LoopUnrollingPass(settings.numLoopUnrolls); } else { cp = new CompositePass(new LoopUnrollingPass(settings.numLoopUnrolls), new InliningPass(settings.staticInlining)); } }