1 / 33

GNU Compiler Collection

GNU Compiler Collection. 2011/11/18 Kyungtae Kim. Contents. GCC source structure GCC overview GCC backend structure ( gimple -> RTL). Structure of GCC. Structure of GCC. Structure of GCC. GCC Backend. How GCC operates. How GCC operates. How GCC operates. AST. GENERIC. GIMPLE.

dandre
Download Presentation

GNU Compiler Collection

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GNU Compiler Collection 2011/11/18 Kyungtae Kim

  2. Contents • GCC source structure • GCC overview • GCC backend structure (gimple -> RTL)

  3. Structure of GCC

  4. Structure of GCC

  5. Structure of GCC

  6. GCC Backend

  7. How GCC operates

  8. How GCC operates

  9. How GCC operates AST GENERIC GIMPLE RTL

  10. The Architecture of GCC

  11. Basic Transformations in GCC

  12. cc1 2 1 3 4 5 6

  13. cc1 control flow main toplev_main do_compile compile_file lang_hooks.parse_file = c_common_parse_file lang_hooks.decls.final_write_globals = c_write_global_declarations c_parse_file cgraph_finalize_compilation_unit cgraph_optimize c_parser_translation_unit cgraph_analyze_functions cgraph_expand_all_functions ipa_passes c_parser_external_declaration cgraph_analyze_funtion c_parser_declaration_or_fndef all_ipa_passes cgraph_expand_function finish_function gimplify_function_tree cgraph_lower_function tree_rest_of_compilation tree_lowering_passes c_generericize all_passes all_lowering_passes

  14. cc1 control flow all_lowering_passes all_ipa_passes all_passes pass_pre pass_expand pass_build_ssa pass_lower_cf pass_loop2 pass_profile pass_build_cfg pass_sched pass_ira pass_thread_prologue_epilogue pass_sched2 pass_final

  15. Structure in cc1

  16. Structure in cc1

  17. Structure in cc1

  18. Structure in cc1

  19. Structure in cc1

  20. Structure in cc1

  21. Predefined Pass Lists

  22. Organization of Passes

  23. Execution Order in Intraprocedural Passes

  24. Execution Order in Interprocedural Passes

  25. GCC Retargetability Mechanism

  26. RTL Development time Build time Run time

  27. Specifying Target Instruction Semantics

  28. Specifying Target Instruction Semantics

  29. How GCC use target specific RTL as IR

  30. How GCC use target specific RTL as IR

  31. Instruction Specification and Translation: A Recap

  32. Hooking up Backend Details

  33. 3. Compiler Theory • Engineering The Compiler 완료(100%) • Compilers Principles, Techniques, & Tools 완료(100%) • Data Flow Analysis 완료(100%) • Optimizations and Machine Code Generation(23.7%) • Engineering a Compiler(0%) • Compiler Design: Virtual Machines(0%) • Heterogeneous Computing(0%) • SSA-Based Compiler(0%) • GNU Site의 Algorithm 문서(9/33) • GCC Internals(35.7%) • cpp Internals 완료(100%) • libiberty 완료(100%) • libgomp(100%) • cflow 완료(100%) 4. GNU Compiler Collection Source Analysis완료(100%) 5. C Compiler(cc1) Source Analysis(11.1%) <<< gcc-4.6.0이 올라와서 분석 시작! • front-end(8.9%) • middle-end(11.1%) • back-end(17.4%) 6. Tiny-C CompilerSource Analysis완료(100%) 7. BFD(Binary File Descriptor) • Linkers & Loaders 완료(100%) • BFD Internals(0%) 8. Binutils Source Analysis • Assembler[as] (0%) • Linker[ld] (34.2%) 9.Thesis & Other Resources • Basic Information about GCC 완료(100%) • The Conceptual Structure of GCC 완료(100%) • GCC Implementation Details 완료(100%) • Incremental-MD 완료(100%) • lto(Link-Time Optimization in GCC - Requirements and High-Level Design) 완료(100%) • GCC-Frontend-HOWTO 완료(100%) • whopr(WHOPR - Fast and Scalable Whole Program Optimizations in GCC) 완료(100%) • A Maintenance Programmer GCC(100%) • Tree SSA - A New optimization infrastructure(100%) • gcc-improvements(Improving the GCC) (100%) • Generic & Gimple (100%) • Partitioning the Conventional DBT System for Multiprocessors (100%) • Synchronization Aware Conflict Resolution for Runtime • Monitoring Using Transactional Memory (72%) 10. Seminar • Modern Compilation Framework - 이상훈 • Trustworthy Computing with Dynamic Linker - 김경태 < 스터디 진행 현황 > • 1. Configuration & Build • 2.All of CompilersSource View • 0.How to make GCC(Internals of Build Time) • 1. GCC 4.6.0VersionView(front-end, middle-end, back-end) • 2.GCC 4.6.0 Compilation Framework • 3.Front-end Overview • 4. Abstract Syntax Tree(AST) • 5. Parsing, Lexing • 6.GENERIC tree, GIMPLE tree • 7.Middle-end Overview • 8.Static Single Assignment(SSA) • 9.Data & Control Flow Analysis • 10.MD(Machine Descriptor) • 11.RTL & RTX • 12.Back-endOverview • 13.Instruction Selection • 14. Instruction Scheduling • 15.Register allocation • 16. LTO vs WHOPR • 17. Inter-Procedural Data & Control Flow Analysis • 18.GCC의 Architecture View • 19. GCC Porting 방법 • 20. GCC front-end에 새로운 Language 지원시키기 • 21. GCC middle-end에 새로운 Optimization Pass 쓰기 • 22. GCC back-end 작성법 • 23. Source 2 Source Compilation • 24. Polyhedral(PPL, CLOOG, GRAPHITE) • 25. libgomp(OpenMP) • 26. MPC, MPFR, GMP(Math Library) • 27. Auto Vectorization & Auto Parallelization • 28. ELF Format • 29. DWARF Format • 30. Binutils Internals • 31. BFD Library • 32. Assembler • 33. MAO(Micro Architectural Optimizer) • 34. Linker • 35. Static & Dynamic Compilation • 36. 향후 발전 방향 및 Programming Language 입장에서의 고찰 • 37. CGO Conference & GCC Workshop Contents Summary • 38. GCC Developers Summit Summary • 39. Source Code 전체 Review • 40. Compilation Framework에서 일어나는 Optimization에 기반한 실제 • Programming Optimization • 41. GCCInternals 책 쓰기

More Related