Ejemplo n.º 1
0
        private void FinalizeCodeBlock()
        {
            //TcbDependencyUpdate.Process(CodeBlock);

            //OutputTrace("Dependency Update");

            //Re-order computations so that less expensive output variables and temps are computed first
            TcbReOrderComputations.Process(CodeBlock, FixOutputComputationsOrder);

            this.ReportNormal("Re-order Computations", CodeBlock);

            if (EnableTestEvaluation)
            {
                EvaluationDataHistory.AddEvaluation("Re-order computations");
            }

            //Minimize number of temporary variables needed in the final code
            TcbReUseTempVariables.Process(CodeBlock);

            this.ReportNormal("Re-use Temp Variables", CodeBlock);

            CodeBlock.UpdateParametersDictionary();

            if (EnableTestEvaluation)
            {
                EvaluationDataHistory.AddEvaluation("Re-use temp variables");

                this.ReportNormal("Evaluation History", EvaluationDataHistory);
            }
        }
Ejemplo n.º 2
0
        internal static GMacCodeBlock Process(GMacCodeBlock codeBlock, bool orderOutputsById)
        {
            var processor = new TcbReOrderComputations(codeBlock, orderOutputsById);

            processor.BeginProcessing();

            return(codeBlock);
        }