Research and Implementation on Models of Cross-files Compilation
- Author
- GuoXuePeng
- Advisor
- ZhaoKeJia
- School
- National University of Defense Science and Technology
- Major
- Software Engineering
- Classification
- TP314 Compiler,interpreter
- Degree
- Master's thesis
- Year
- 2005
- Downloads
- 67
- Citations
- 1
Abstract
Compilation optimization is an important aspect of the compiler design. Especially for the high performance compiler design, advanced compilation optimization methods can greatly enhance the effect of compiler optimization. Many compilation optimizations depend on the scope compiler can see. The larger scope a compiler can see, the more information it can obtain, and the best effect its optimization will have. Nowadays the source code of applications tend to locate in many separate files due to the increment of the application’s size and the popularity of the software development model with OOP, so it is greatly necessary to evolve the traditional function-at-a-time or unit-at-a-time compilation model to support the cross-files compilation model. As rapid development of the computer hardware, the decrement of the memory’s price and the emergence of microprocessors with large size cache make it possible to implement this compilation model.GNU C Compiler is one of the most important compilers in the open-source world. Its frond-end supports many kinds of languages, and back-end supports many kinds of target machines. GNU C Compiler has been widely used not only in general purpose computer systems but also in the embedded systems due to its ability to target many platforms and its architecture. But supportless of cross-files compilation model is a shortcoming of GNU C Compiler.Based on the study of the existing cross-files compilation models, we summaried the problems to deal with the cross-files compilation model and some methods to solve these problems. We analyzed the abstract syntax tree represent of GCC, the optimization on the call-graph, and the approach to the command-line arguments. We proposed a completely cross-files compilation model and extended GCC source code to save and restore AST, and to reconstruct call-graph of whole-program. Eventually we implemented the model based on GCC 3.4.Cross-files compilation model widens the compiler’s scope and improves precision and effect of some compilation optimizations. Our test has shown that many optimizations, such as function inline, constant propagation etc, can benefit by the larger scope.
Table of contents
Originality statement to 3-
thesis Copyright use authorization 3-8
summary 8-9
ABSTRACT 9-10 < br /> The first chapter background and significance of the 10-13
1.1 topics 10-11
1.2 main topic of research content 11-12 <br / > 1.3 the main structure of the paper 12-13
across files compiled mode 13-24
2.1 Summary of cross-file compilation mode 13-16 < br /> 2.1.1 cross-file compilation mode process 13-14
2.1.2 cross-file compilation mode to solve the key problems 14-16
2.2 typical cross file compilation mode 16-21
2.2.1 OM system 16-17
2.2.2 Vortex system
2.2.3 SYZYGY, 17-19 system 19-20
2.2.4 LLVM system 20-21
2.3 four system more 21-24
2.3.1 compiler intermediate the results of the save opportunity 21-22
the the 2.3.2 compiler intermediate results saved in the form 22-24
Chapter GCC 3.4 Analysis 24-41
3.1 GCC3.4 compiler framework 24-26
3.2 GCC 3.4 front-end of the abstract syntax tree representation 26-28
3.2.1 syntax tree represented introduce 26-27
3.2.2 process abstract syntax tree said 27-28
3.3-based inter-process within a single file of the call graph optimization mode 28-34
3.3.1 Call Graph, 28-32
3.3.2 based on the call graph to the completion of the single-file interprocedural optimization process 32-34
3.4 based on the call graph of a function within associated 34-36
3.4.1 GCC function inlining general flow the 34-35 3.4.2 GCC
complete data structure with function inlining 35
3.4.3 GCC the complete function inlining core algorithm the 3.5 GCC currently 35-36
optimization mode insufficient 36-37
3.6 GCC command line arguments the processing mechanism introduced 37-41
Chapter proposed and implemented across file compiled mode 41-57
4.1 model introduced 41-43 <br / > 4.1.1 model generates background 41
structure and processes of the model 4.1.2 41-43
4.2 model to solve the problem and used data structures and algorithms 43-56
4.2.1 cross-file compilation mode processes specific to achieve 43-47
4.2.2 binaries to save abstract syntax tree design 47 - 48
4.2.3 abstract syntax tree to write specific realization the 48-54
4.2.4 abstract syntax tree reads and remodeling data structures and algorithms 54-55
4.2.5 call graph the reconstructed data structure and algorithm 55-56
4.3 model analysis 56-57
4.3.1 model time complexity analysis 56
4.3.2 model space complexity analysis 56-57
Chapter test results and analysis 57-63
5.1 test environment introduced 57
a 5.2 on 183.equake the test 57-60
5.3 further testing 60-63
5.3.1 for 256.bzip2 test 60-61
5.3.2 181.mcf test 61
5.3.3 Test Summary 61-63
Conclusion 63-64
Acknowledgements 64-65
Reference nbsp 65-67
of the academic achievements made during the study period; 67-68
Appendix A GCC 3.4 tree node list 68-71
Appendix B of this topic in the SPEC 2000 test package to use 71-72
Related dissertations
- A Compile-time Optimization Method for Heterogeneous Computing Platforms Based on LLVM
- Research on Compiler-directed Management Methods and Power Model for Scratchpad Memory
- G.729A vocoder algorithms and DSPs to achieve
- Low power consumption schedule of the two - dimensional SIMD architecture
- FDD trunking communication system 's OMAP platform
- DSP-based video transcoding system fast
- Research and Implementation on Compiler Framework for Translating Ansic C into CUDA C