Abstract
A major problem in deriving a compiler from a formal definition is the production of efficient object code. In this context, we propose a solution to the problem of code generator generation.Our approach is based on a target machine description where the basic concepts used (access modes, access classes and instructions) are bottom-up hierarchically described by tree-patterns. These tree-patterns are written in an abstract tree language which is also used to write the intermediate program representation (input to the code generator).The first phase of code production is based on access mode template-driven rewritings in which the program intermediate representation is progressively transformed into its "canonical form". The result is that each program instruction is reduced to a sequence of elementary instructions, each of these elementary instructions representing an instance of an instruction pattern.The local and global optimizations phases as well as the storage management phase may be realized by multipass rewritings and attribute evaluations of the canonical form.In the last phase of code production, each pattern instruction instance of the updated intermediate form is replaced by the corresponding instance of the associated pattern code.KeywordsSource PositionCode ProductionAccess ModeAccess PathLeft ChildThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.