首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 46 毫秒
1.
在编译原理和虚拟机技术的基础上,采用一种高级语言设计了一个简单的编译器。通过词法分析、语法分析和中间代码、虚拟机等进程,将源程序编译成目标程序,实现了复杂编译器的简单设计。  相似文献   

2.
面向嵌入式系统的优化编译器生成器设计   总被引:4,自引:0,他引:4  
构造嵌入式系统是一个硬件软件的协同设计问题 .嵌入式软件的有效开发需要相应编译器的支持 .由于嵌入式系统存储空间有限 ,所以编译器生成的机器代码必须非常紧凑 .我们可以使用编译器的生成器来提高编译器的开发效率 .本文给出了一种编译器生成器的设计原理 ,利用该编译器生成器可以迅速生成面向某种指令系统和机器特征 ,并且能够对输出代码进行自动紧凑的编译器  相似文献   

3.
This report describes the development of a transportable extendable self-compiler for the language SIMPL-T. SIMPL-T is designed as the base language for a family of languages. The structure of the SIMPL-T compiler and its transportable bootstrap are described. In addition, the procedures for generating a compiler for a new machine and for boot-strapping the new compiler on to the new machine are demonstrated.  相似文献   

4.
5.
Abstract machine modelling is a popular technique for developing portable compilers. A compiler can be quickly realized by translating the abstract machine operations to target machine operations. The problem with these compilers is that they trade execution efficiency for portability. Typically, the code emitted by these compilers runs two to three times slower than the code generated by compilers that employ sophisticated code generators. This paper describes a C compiler that uses abstract machine modelling to achieve portability. The emitted target machine code is improved by a simple, classical rule-directed peephole optimizer. Our experiments with this compiler on four machines show that a small number of very general handwritten patterns (under 40) yields code that is comparable to the code from compilers that use more sophisticated code generators. As an added bonus, compilation time on some machines is reduced by 10 to 20 per cent.  相似文献   

6.
针对基于虚拟机机制的软件PLC可移植性差,执行效率低等不足,研究基于嵌入式机器码的软件PLC系统,通过梯形图编译器、代码解析生成器、汇编编译器等处理,将用户开发的逻辑程序直接编译成能够在CPU环境下执行的嵌入式机器码,该方法减少PLC虚拟指令执行过程,提高软件PLc执行效率.  相似文献   

7.
VLIW机器在单个机器周期中同时发射并执行多个的并行操作,从而获得较高的指令级并行度,这些操作之间的依赖分析和调度工作则被完全交给相应的编译器执行,因此VLIW的并行性能能否充分发挥取决于VLIW体系结构相关编译器的质量。GNU开发的GCC是被最广泛使用的编译系统之一,它具有多语言、多平台支持的能力和开放的结构,能够运用各种成熟的常规编译优化技术生成高效的代码。文章分析了VLIW及GCC的结构特点,提出了一种基于GCC的VLIW编译系统设计方案,利用GCC进行RTL中间代码一级的体系结构无关优化和少量体系结构相关优化,在汇编代码一级针对VLIW结构进行体系结构相关的优化,从而充分利用GCC的成熟编译技术快速开发高效的VLIW多语言编译系统。  相似文献   

8.
袁正才  刘春林  胡定磊 《计算机工程》2004,30(22):79-80,116
VLIW DSP机器由于硬件控制简单,指令的并行性完全在编译时决定,因此编译程序成为基于VLIW DSP机器应用的关键因素。文章描述通过在编译程序中使用目标机器描述技术,提高了编译程序的可重定目标性,减少了生成目标编译程序的难度。  相似文献   

9.
The programming language LISP is usually implemented via an interpreter, and a compiler is added later as a LISP program. However, all such production compilers known to the authors produce explicit instructions for the given computer being used. This paper describes the development of a portable LISP compiler in the sense that only Standard LISP functions are used in its definition and the output is a sequence of abstract machine codes, easily mapped to instruction sequences on current computers. The resulting code is quite efficient, demonstrating once again the maxim that most compiler optimization is largely machine independent.  相似文献   

10.
李旭  卢凯  李根 《计算机科学》2009,36(4):129-132
随着Java语言的广泛应用,Java虚拟机的性能越来越受到人们重视,而虚拟机的动态编译技术是影响其性能的重要因素.Jikes RVM使用Java语言实现了一个Java虚拟机.首先分析了Jikes RVM的3个主要动态编译器的结构及其涉及的关键编译技术,包括基线编译、优化编译和自适应编译,然后利用SPECjvm Client98对Jikes RVM和Sun JVM的动态编译性能进行了测试和比较.测试结果显示,Jikes RVM的性能和Sun JVM性能基本相同,最后针对Jikes RVM的不足提出了改进Jikes RVM 编译器的方法.  相似文献   

11.
For pt.I. see ibid., p. 170-80. In pt.I, we presented a binding environment for the AND and OR parallel execution of logic programs. This environment was instrumental in rendering a compiler for the AND and OR parallel execution of logic programs machine independent. In this paper, we describe a compiler based on the Reduce-OR process model (ROPM) for the parallel execution of Prolog programs, and provide performance of the compiler on five parallel machines: the Encore Multimax, the Sequent Symmetry, the NCUBE 2, the Intel i860 hypercube and a network of Sun workstations. The compiler is part of a machine independent parallel Prolog development system built on top of a run time environment for parallel programming called the Chare kernel, and runs unchanged on these multiprocessors. In keeping with the objectives behind the ROPM, the compiler supports both on and independent AND parallelism in Prolog programs and is suitable for execution on both shared and nonshared memory machines. We discuss the performance of the Prolog compiler in some detail and describe how grain size can be used to deliver performance that is within 10% of the underlying sequential Prolog compiler on one processor, and scale linearly with increasing number of processors on problems exhibiting sufficient parallelism. The loose coupling between parallel and sequential components makes it possible to use the best available sequential compiler as the sequential component of our compiler  相似文献   

12.
该文根据目前编译原理的教学现状,设计了一个C教学编译器。它是一个基于Windows平台的编译器,不但能全面体现编译器的设计和实现过程而且还采用了教学上新的算法和结构设计思想。如基于需要给标识符分配空间、半缓冲区的应用,分离哈希链表的设计。同时,编译器在生成目标代码时,先生成虚拟机代码,再对虚拟机代码进行解释执行得出最终运行结果。这样就便于在不同目标机器上移植了。此技术在Java上已经广泛应用,但在C语言上还是尝试。  相似文献   

13.
Andorra-I is an experimental parallel Prolog system which transparently exploits both dependent and-parallelism and or-parallelism. One of the main components of Andorra-I is its preprocessor. In order to obtain efficient execution of programs in Andorra-I, the preprocessor includes a compiler for Andorra-I. The compiler includes a determinacy analyser and a clause compiler, and generates code for a specialised abstract machine. In this paper we discuss the main issues in the Andorra-I compiler, presenting its abstract instruction set and describing the algorithms used in its implementation.  相似文献   

14.
面向嵌入式系统的优化编译器生成器设计   总被引:3,自引:0,他引:3  
给出了一种编译器生成器的设计原理,利用编译器生成器可以迅速生成面向某种指令系统和机器特征,并且能够对输出代码进行自动紧凑的编译器。  相似文献   

15.
16.
With the aid of the EM (encoding machine) compiler tool kit, a preliminary version of a scalar C compiler was implemented on the Cyber 205 in a relatively short period of time. This C compiler emphasizes functionality more than efficiency. Several benchmark programs were used to measure the performance and to compare it with an equivalent C compiler for the VAX/UNIX system. In order to make it a production-quality C compiler, further enhancements will be necessary. This paper presents some motivating factors, implementation details, and proposes further work on developing the Cyber 205 C compiler.  相似文献   

17.
Local CPS conversion is a compiler transformation for improving the code generated for nested loops by a direct-style compiler that uses recursive functions to represent loops. The transformation selectively applies CPS conversion at non-tail call sites, which allows the compiler to use a single machine procedure and stack frame for both the caller and callee. In this paper, we describe LCPS conversion, as well as a supporting analysis. We have implemented Local CPS conversion in the MOBY compiler and describe our implementation. In addition to improving the performance of loops, Local CPS conversion is also used to aid the optimization of non-local control flow by the MOBY compiler. We present results from preliminary experiments with our compiler that show significant reductions in loop overhead as a result of Local CPS conversion.  相似文献   

18.
19.
一个自动编译系统ACS   总被引:1,自引:0,他引:1  
程虎  李爱武 《软件学报》1991,2(2):23-30
本文介绍一个自动编译系统ACS。对某上下文无关文法语言,写出其词法描述、语法描述、语义描述和目标机描述。ACS系统可以自动生成此语言在目标机上的编译程序。ACS系统由六个子模块组成:词法自动生成器、语法自动生成器、语义自动生成器、中间语言转换程序、优化程序和代码自动生成器。本文将分别讨论这六个子模块的原理和功能,还将给出用ACS系统生成的一个编译程序实例—Mini_Ada编译程序。  相似文献   

20.
设计和实现一个新的产品化的编译器通常需要几年时间。基于已有的编译器进行修改和扩展,是研发面向新体系结构的编译器的主要途径。GNU编译器集合(GCC)支持多种高级语言和多种目标处理器平台、文档及源代码开放等。基于GCC的Sparc后端,实现了支持四路双精度SIMD指令的四路双精度短向量寄存器的描述。在此过程中,定义了新的目标机,扩充了一类向量模式,定义了一类新的寄存器约束,实现了四路双精度寄存器的描述,定义了四路双精度SIMD指令的机器描述。对于面向此类SIMD指令的内嵌函数,GCC编译器能够正确使用该类向量寄存器来生成对应的SIMD指令。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号