https://github.com/heroesofcode/swift-explorer
Desktop tool to quickly explore and analyze Swift Intermediate Representation (IR) generated by the LLVM compiler, and also generate assembly code.
https://github.com/heroesofcode/swift-explorer
explorer macos performance swiftui
Last synced: 9 months ago
JSON representation
Desktop tool to quickly explore and analyze Swift Intermediate Representation (IR) generated by the LLVM compiler, and also generate assembly code.
- Host: GitHub
- URL: https://github.com/heroesofcode/swift-explorer
- Owner: heroesofcode
- License: mit
- Created: 2024-06-22T06:10:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-15T23:12:24.000Z (10 months ago)
- Last Synced: 2025-05-16T00:23:06.864Z (10 months ago)
- Topics: explorer, macos, performance, swiftui
- Language: Swift
- Homepage:
- Size: 11.8 MB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Swift Explorer

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](https://github.com/heroesofcode/swift-explorer/releases/download/2.0.0/SwiftExplorer.dmg)
## Inspiration
This project was inspired by [kotlin-explorer](https://github.com/romainguy/kotlin-explorer) developed by [Romain Guy](https://github.com/romainguy).
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](https://github.com/heroesofcode/swift-explorer/blob/main/LICENSE) for details.
