├── .gitignore ├── LICENSE ├── README.md ├── c ├── ansi-c-refcard-a4.pdf ├── c89-bnf.pdf ├── cppalgo.pdf └── 让你不再害怕指针.pdf ├── deeplearning ├── blasqr.pdf └── cs231n_cnn.pdf ├── llvm ├── Books │ ├── LLVM Cookbook中文版.pdf │ ├── LLVM Essentials-2015.pdf │ ├── LLVM-Techniques-Tips-and-Best-Practies-zh-20220203.pdf │ └── Learn-LLVM-17-zh.pdf ├── IR │ ├── An introduction to LLVM.pdf │ └── Tutorial-Bridgers-LLVM_IR_tutorial.pdf ├── Instruction-Selection │ ├── Colombet-GlobalISel.pdf │ ├── Gohman_CodeGenAndSelectionDAGs.pdf │ └── MacLean-Fargnoli-ABeginnersGuide-to-SelectionDAG.pdf ├── MC │ └── Grosbach_Anderson_LLVMMC.pdf └── Others │ └── LLVM-Another-ToolChain-Platform.pptx ├── papers └── simple_and_efficient_construction_of_ssa.pdf ├── riscv ├── riscv-abi.pdf └── riscv-card.pdf └── x86 ├── CS356Unit4_x86_ISA.pdf └── x86-64bit-ccc-chapter.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store* 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 caipeng 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Study LLVM From Scratch 2 | 3 | 4 | 在编译原理教学中, 理论往往与实践脱节, 学生缺乏动手机会。LLVM作为开源的编译器框架, 为这一问题提供了解决方案。通过LLVM, 学生可以深入参与从源代码到目标代码的转换过程, 直观理解编译器的工作原理。其模块化设计让学生能够根据兴趣选择优化、代码生成或静态分析等方向, 提升实践能力的同时激发创新思维。分享LLVM, 不仅是为了传授知识,更是为了培养学生的兴趣与实践能力,为未来技术发展奠定基础。 5 | 6 | 下面是仓库的文件夹说明.每个文件夹下面可能还有子文件夹。 7 | 8 | | 文件夹 | 内容说明 | 9 | | ----------- | ----------- | 10 | | llvm | LLVM会议中的优秀幻灯片以及相关书籍 | 11 | | riscv | rsic-v的指令手册和ABI文档 | 12 | | c | c语言的文法等资源 | 13 | | deeplearning | 神经网络结构 | 14 | | x86 | x86汇编和调用约定等 | 15 | | papers | 相关的论文 | 16 | 17 | 18 | 未来还会持续补充更多资源。 19 | 20 | 如果你对基于LLVM开发编译器感兴趣,可以访问我录制的课程:[LLVM前端实践之从0到1实现一个C编译器](https://www.bilibili.com/cheese/play/ss31453?csource=private_space_class_null&spm_id_from=333.999.0.0)。 21 | 22 | 如果你对给LLVM添加后端感兴趣,可以访问我录制的课程:[LLVM实践之实现自定义后端](https://www.bilibili.com/cheese/play/ss62147?csource=private_space_class_null&spm_id_from=333.999.0.0)。 23 | 24 | 此外,也欢迎添加我的个人微信 **iiicpp**,一起讨论技术问题! 25 | -------------------------------------------------------------------------------- /c/ansi-c-refcard-a4.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/c/ansi-c-refcard-a4.pdf -------------------------------------------------------------------------------- /c/c89-bnf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/c/c89-bnf.pdf -------------------------------------------------------------------------------- /c/cppalgo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/c/cppalgo.pdf -------------------------------------------------------------------------------- /c/让你不再害怕指针.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/c/让你不再害怕指针.pdf -------------------------------------------------------------------------------- /deeplearning/blasqr.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/deeplearning/blasqr.pdf -------------------------------------------------------------------------------- /deeplearning/cs231n_cnn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/deeplearning/cs231n_cnn.pdf -------------------------------------------------------------------------------- /llvm/Books/LLVM Cookbook中文版.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Books/LLVM Cookbook中文版.pdf -------------------------------------------------------------------------------- /llvm/Books/LLVM Essentials-2015.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Books/LLVM Essentials-2015.pdf -------------------------------------------------------------------------------- /llvm/Books/LLVM-Techniques-Tips-and-Best-Practies-zh-20220203.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Books/LLVM-Techniques-Tips-and-Best-Practies-zh-20220203.pdf -------------------------------------------------------------------------------- /llvm/Books/Learn-LLVM-17-zh.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Books/Learn-LLVM-17-zh.pdf -------------------------------------------------------------------------------- /llvm/IR/An introduction to LLVM.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/IR/An introduction to LLVM.pdf -------------------------------------------------------------------------------- /llvm/IR/Tutorial-Bridgers-LLVM_IR_tutorial.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/IR/Tutorial-Bridgers-LLVM_IR_tutorial.pdf -------------------------------------------------------------------------------- /llvm/Instruction-Selection/Colombet-GlobalISel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Instruction-Selection/Colombet-GlobalISel.pdf -------------------------------------------------------------------------------- /llvm/Instruction-Selection/Gohman_CodeGenAndSelectionDAGs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Instruction-Selection/Gohman_CodeGenAndSelectionDAGs.pdf -------------------------------------------------------------------------------- /llvm/Instruction-Selection/MacLean-Fargnoli-ABeginnersGuide-to-SelectionDAG.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Instruction-Selection/MacLean-Fargnoli-ABeginnersGuide-to-SelectionDAG.pdf -------------------------------------------------------------------------------- /llvm/MC/Grosbach_Anderson_LLVMMC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/MC/Grosbach_Anderson_LLVMMC.pdf -------------------------------------------------------------------------------- /llvm/Others/LLVM-Another-ToolChain-Platform.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/llvm/Others/LLVM-Another-ToolChain-Platform.pptx -------------------------------------------------------------------------------- /papers/simple_and_efficient_construction_of_ssa.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/papers/simple_and_efficient_construction_of_ssa.pdf -------------------------------------------------------------------------------- /riscv/riscv-abi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/riscv/riscv-abi.pdf -------------------------------------------------------------------------------- /riscv/riscv-card.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/riscv/riscv-card.pdf -------------------------------------------------------------------------------- /x86/CS356Unit4_x86_ISA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/x86/CS356Unit4_x86_ISA.pdf -------------------------------------------------------------------------------- /x86/x86-64bit-ccc-chapter.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iiicp/study-llvm-from-scratch/ece3c36016e114d00091ce4dcacca9e45b8712c3/x86/x86-64bit-ccc-chapter.pdf --------------------------------------------------------------------------------