Skip to content

heroesofcode/swift-explorer

Repository files navigation

Swift Explorer

CI ⬇️ Download App Platforms Git Version License

Desktop tool to quickly explore and analyze Swift Intermediate Representation (IR) generated by the LLVM compiler, and also generate assembly code.

Features

  • 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.

Optimization flags

  • 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.

Installing

Download the dmg - click here

Inspiration

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

License

swift-explorer is released under the MIT license. See LICENSE for details.

About

Desktop tool to quickly explore and analyze Swift code

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages