Desktop tool to quickly explore and analyze Swift Intermediate Representation (IR) generated by the LLVM compiler, and also generate assembly code.
- Deep Code Understanding: Developers can see how Swift code is transformed into both LLVM IR and assembly code, helping them better understand optimization and low-level behavior.
- Advanced Debugging: Viewing LLVM IR and assembly can help identify performance issues or hard-to-trace bugs in source code.
- Education and Learning: A valuable educational tool for learning about compilers and how different language constructs translate into intermediate representation and assembly.
- Optimization: Helps identify and optimize code snippets that are not compiling efficiently by providing insights from both LLVM IR and assembly.
- Comparative Analysis: Allows you to compare how different approaches or code versions generate different IR and assembly code, facilitating the choice of best coding practices.
Onone:
Compile without any optimization.Osize:
Compile with optimizations and target small code size.Ounchecked:
Compile with optimizations and remove runtime safety checks.O:
Compile with optimizations.
Download the dmg - click here
This project was inspired by kotlin-explorer developed by Romain Guy.
If you have any questions about the kotlin-explorer tool, I recommend you watch the talk Practical Optimizations - Romain Guy
swift-explorer is released under the MIT license. See LICENSE for details.