OptimizePackage runs optimization passes over the LLVM module for the given Go package.
(mod llvm.Module, config *compileopts.Config)
| 15 | // OptimizePackage runs optimization passes over the LLVM module for the given |
| 16 | // Go package. |
| 17 | func OptimizePackage(mod llvm.Module, config *compileopts.Config) { |
| 18 | _, speedLevel, _ := config.OptLevel() |
| 19 | |
| 20 | // Run TinyGo-specific optimization passes. |
| 21 | if speedLevel > 0 { |
| 22 | OptimizeMaps(mod) |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // Optimize runs a number of optimization and transformation passes over the |
| 27 | // given module. Some passes are specific to TinyGo, others are generic LLVM |
no test coverage detected