/// <summary>
        /// Extends the method compiler pipeline with x86 specific stages.
        /// </summary>
        /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline)
        {
            // FIXME: Create a specific code generator instance using requested feature flags.
            // FIXME: Add some more optimization passes, which take advantage of advanced x86 instructions
            // and packed operations available with SSE extensions
            methodCompilerPipeline.InsertAfterLast <PlatformStubStage>(
                new IMethodCompilerStage[]
            {
                //new CheckOperandCountStage(),
                new PlatformIntrinsicStage(),
                new LongOperandTransformationStage(),

                //new StopStage(),

                new IRTransformationStage(),
                new TweakTransformationStage(),

                new FixedRegisterAssignmentStage(),
                new SimpleDeadCodeRemovalStage(),
                new AddressModeConversionStage(),
                new FloatingPointStage(),
            });

            methodCompilerPipeline.InsertAfterLast <StackLayoutStage>(
                new BuildStackStage()
                );

            methodCompilerPipeline.InsertBefore <CodeGenerationStage>(
                new FinalTweakTransformationStage()
                );

            methodCompilerPipeline.InsertBefore <CodeGenerationStage>(
                new JumpPeepholeOptimizationStage()
                );
        }
Beispiel #2
0
        /// <summary>
        /// Extends the method compiler pipeline with x86 specific stages.
        /// </summary>
        /// <param name="compilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline compilerPipeline)
        {
            compilerPipeline.InsertBefore <LowerIRStage>(
                new IRSubstitutionStage()
                );

            compilerPipeline.InsertAfterLast <PlatformStubStage>(
                new IMethodCompilerStage[]
            {
                new PlatformIntrinsicStage(),
                new LongOperandTransformationStage(),
                new IRTransformationStage(),
                new TweakTransformationStage(),
                new FixedRegisterAssignmentStage(),
                new SimpleDeadCodeRemovalStage(),
                new AddressModeConversionStage(),
                new FloatingPointStage(),
            });

            compilerPipeline.InsertAfterLast <StackLayoutStage>(
                new BuildStackStage()
                );

            compilerPipeline.InsertBefore <CodeGenerationStage>(
                new FinalTweakTransformationStage()
                );

            compilerPipeline.InsertBefore <CodeGenerationStage>(
                new JumpOptimizationStage()
                );
        }
        /// <summary>
        /// Extends the pre-compiler pipeline with x86 compiler stages.
        /// </summary>
        /// <param name="compilerPipeline">The pipeline to extend.</param>
        public override void ExtendPreCompilerPipeline(CompilerPipeline compilerPipeline)
        {
            compilerPipeline.InsertAfterFirst <ICompilerStage>(
                new InterruptVectorStage()
                );

            compilerPipeline.InsertAfterLast <ICompilerStage>(
                new SSESetupStage()
                );
        }
        /// <summary>
        /// Extends the method compiler pipeline with ARMv6 specific stages.
        /// </summary>
        /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline)
        {
            methodCompilerPipeline.InsertAfterLast <PlatformStubStage>(
                new IMethodCompilerStage[]
            {
                //new LongOperandTransformationStage(),
                new IRTransformationStage(),
            });

            //methodCompilerPipeline.InsertAfterLast<CodeGenerationStage>(
            //    new ExceptionLayoutStage()
            //);

            methodCompilerPipeline.InsertBefore <GreedyRegisterAllocatorStage>(
                new StopStage()
                );
        }
        /// <summary>
        /// Extends the pre-compiler pipeline with x86 compiler stages.
        /// </summary>
        /// <param name="compilerPipeline">The pipeline to extend.</param>
        public override void ExtendPreCompilerPipeline(CompilerPipeline compilerPipeline)
        {
            compilerPipeline.InsertAfterFirst<ICompilerStage>(
                new InterruptVectorStage()
            );

            compilerPipeline.InsertAfterLast<ICompilerStage>(
                new SSESetupStage()
            );
        }
        /// <summary>
        /// Extends the method compiler pipeline with x86 specific stages.
        /// </summary>
        /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline)
        {
            methodCompilerPipeline.InsertAfterLast<PlatformStubStage>(
                new IMethodCompilerStage[]
                {
                    //new CheckOperandCountStage(),
                    new PlatformIntrinsicStage(),
                    new LongOperandTransformationStage(),

                    //new StopStage(),

                    new IRTransformationStage(),
                    new TweakTransformationStage(),

                    new FixedRegisterAssignmentStage(),
                    new SimpleDeadCodeRemovalStage(),
                    new AddressModeConversionStage(),
                    new FloatingPointStage(),
                });

            methodCompilerPipeline.InsertAfterLast<StackLayoutStage>(
                new BuildStackStage()
            );

            methodCompilerPipeline.InsertBefore<CodeGenerationStage>(
                new FinalTweakTransformationStage()
            );

            methodCompilerPipeline.InsertBefore<CodeGenerationStage>(
                new JumpOptimizationStage()
            );
        }
Beispiel #7
0
        /// <summary>
        /// Extends the method compiler pipeline with x86 specific stages.
        /// </summary>
        /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline)
        {
            // FIXME: Create a specific code generator instance using requested feature flags.
            // FIXME: Add some more optimization passes, which take advantage of advanced x86 instructions
            // and packed operations available with SSE extensions
            methodCompilerPipeline.InsertAfterLast<PlatformStubStage>(
                new IMethodCompilerStage[]
                {
                    //new CheckOperandCountStage(),
                    new PlatformIntrinsicTransformationStage(),
                    new LongOperandTransformationStage(),

                    //new StopStage(),
                    new IRTransformationStage(),
                    new TweakTransformationStage(),

                    new FixedRegisterAssignmentStage(),
                    new SimpleDeadCodeRemovalStage(),
                    new AddressModeConversionStage(),
                    new FloatingPointStage(),
                });

            methodCompilerPipeline.InsertAfterLast<StackLayoutStage>(
                new BuildStackStage()
            );

            methodCompilerPipeline.InsertBefore<CodeGenerationStage>(
                new FinalTweakTransformationStage()
            );

            methodCompilerPipeline.InsertBefore<CodeGenerationStage>(
                new JumpPeepholeOptimizationStage()
            );
        }
Beispiel #8
0
        /// <summary>
        /// Extends the method compiler pipeline with x86 specific stages.
        /// </summary>
        /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline)
        {
            // FIXME: Create a specific code generator instance using requested feature flags.
            // FIXME: Add some more optimization passes, which take advantage of advanced x86 instructions
            // and packed operations available with MMX/SSE extensions
            methodCompilerPipeline.InsertAfterLast<PlatformStubStage>(
                new IMethodCompilerStage[]
                {
                    //new IntrinsicTransformationStage(),
                    new LongOperandTransformationStage(),
                    new AddressModeConversionStage(),
                    new IRTransformationStage(),
                    new TweakTransformationStage(),
                    new MemToMemConversionStage(),
                });

            methodCompilerPipeline.InsertAfterLast<IBlockOrderStage>(
                new SimplePeepholeOptimizationStage()
            );

            methodCompilerPipeline.InsertAfterLast<CodeGenerationStage>(
                new ExceptionLayoutStage()
            );
        }
Beispiel #9
0
        /// <summary>
        /// Extends the compiler pipeline with x86 specific stages.
        /// </summary>
        /// <param name="compilerPipeline">The pipeline to extend.</param>
        public override void ExtendCompilerPipeline(CompilerPipeline compilerPipeline)
        {
            compilerPipeline.InsertAfterFirst<ICompilerStage>(
                new InterruptVectorStage()
            );

            compilerPipeline.InsertAfterFirst<InterruptVectorStage>(
                new ExceptionVectorStage()
            );

            compilerPipeline.InsertAfterLast<TypeLayoutStage>(
                new MethodTableBuilderStage()
            );
        }
Beispiel #10
0
        /// <summary>
        /// Extends the method compiler pipeline with ARMv6 specific stages.
        /// </summary>
        /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline)
        {
            methodCompilerPipeline.InsertAfterLast<PlatformStubStage>(
                new IMethodCompilerStage[]
                {
                    //new LongOperandTransformationStage(),
                    new IRTransformationStage(),
                });

            //methodCompilerPipeline.InsertAfterLast<CodeGenerationStage>(
            //    new ExceptionLayoutStage()
            //);

            methodCompilerPipeline.InsertBefore<GreedyRegisterAllocatorStage>(
                new StopStage()
            );
        }
Beispiel #11
0
        /// <summary>
        /// Extends the method compiler pipeline with AVR32 specific stages.
        /// </summary>
        /// <param name="methodCompilerPipeline">The method compiler pipeline to extend.</param>
        public override void ExtendMethodCompilerPipeline(CompilerPipeline methodCompilerPipeline)
        {
            methodCompilerPipeline.InsertAfterLast<PlatformStubStage>(
                new IMethodCompilerStage[]
                {
                    //new LongOperandTransformationStage(),
                    //new AddressModeConversionStage(),
                    new IRTransformationStage(),

                    //new TweakTransformationStage(),
                    //new MemToMemConversionStage(),
                });

            //methodCompilerPipeline.InsertAfterLast<IBlockOrderStage>(
            //    new SimplePeepholeOptimizationStage()
            //);

            //methodCompilerPipeline.InsertAfterLast<CodeGenerationStage>(
            //    new ExceptionLayoutStage()
            //);
        }