SlideShare a Scribd company logo
Hi, I'm Yusuke
@kitasuke
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Why SIL? 
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Why SIL?
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Why SIL?
→ Better idea of Swift type system !
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Why SIL?
→ Better idea of Swift type system !
→ Optimizations magic "✨
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Why SIL?
→ Better idea of Swift type system !
→ Optimizations magic "✨
→ For fun and profit $
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
SIL  
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Swift
Intermediate
LanguageSIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
SIL is a language specific
Intermediate
Representation
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Swift 
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Swift Compiler
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Swift Compiler
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Swift Compiler
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
raw SIL
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
canonical SIL
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Objective-C 
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Clang   
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Clang
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
SIL  
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
How SIL works?
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.swift
func number() -> Int {
let x: Int
x = 1
return x
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Emit SIL
$swiftc -emit-sil sample.swift > sample.sil
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Emit SIL with optimizations
$swiftc -emit-sil -O sample.swift > sample.sil
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil with optimizations
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = integer_literal $Builtin.Int64, 1
%1 = struct $Int (%0 : $Builtin.Int64)
return %1 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil with optimizations
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = integer_literal $Builtin.Int64, 1
%1 = struct $Int (%0 : $Builtin.Int64)
return %1 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil with optimizations
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = integer_literal $Builtin.Int64, 1
%1 = struct $Int (%0 : $Builtin.Int64)
return %1 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil with optimizations
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = integer_literal $Builtin.Int64, 1
%1 = struct $Int (%0 : $Builtin.Int64)
return %1 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil with optimizations
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = integer_literal $Builtin.Int64, 1
%1 = struct $Int (%0 : $Builtin.Int64)
return %1 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.sil with optimizations
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = integer_literal $Builtin.Int64, 1
%1 = struct $Int (%0 : $Builtin.Int64)
return %1 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Diff
sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int {
bb0:
%0 = alloc_stack $Int, let, name "x"
%1 = integer_literal $Builtin.Int64, 1
%2 = struct $Int (%1 : $Builtin.Int64)
store %2 to %0 : $*Int
dealloc_stack %0 : $*Int
return %2 : $Int
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.swift
func number() -> Int {
let x: Int
x = 1
return x
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
sample.swift with optimizations
func number() -> Int {
return 1
}
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Mem2Reg
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Register Promotion of
Stack Allocations
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Optimizations !✨
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Optimization flags
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Optimization flags
→ -Onone
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Optimization flags
→ -Onone
→ -O
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Optimization flags
→ -Onone
→ -O
→ -Ounchecked
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Optimization flags
→ -Onone
→ -O
→ -Ounchecked
→ -Osize
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Tips for debug
→ -Xllvm -sil-print-all
→ -Xllvm -sil-print-only-functions
→ -Xllvm -sil-print-before/after/around
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Summary
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Summary
→ Optimize, optimize and optimize !
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Summary
→ Optimize, optimize and optimize !
→ Better idea of how Swift Compiler works "
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Summary
→ Optimize, optimize and optimize !
→ Better idea of how Swift Compiler works "
→ Definitely worth learning #
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
References
→ Swift type in SIL
→ swift/docs/SIL.rst
→ Debugging the Swift Compiler
→ Swift's High-Level IR: A Case Study of
Complementing LLVM IR with Language-Specific
Optimization
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
Thank you!
SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018

More Related Content

Similar to SIL for First Time Learners

Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own Domain
Ken Collins
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
ichikaway
 
Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24
Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24
Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24
Kei IWASAKI
 
Evolution and AI
Evolution and AIEvolution and AI
Evolution and AI
Miyoshi Kosuke
 
Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#
Paulo Morgado
 
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays
 
The Birth of FormalBears - A new META for BEAR.Sunday applications
The Birth of FormalBears - A new META for BEAR.Sunday applicationsThe Birth of FormalBears - A new META for BEAR.Sunday applications
The Birth of FormalBears - A new META for BEAR.Sunday applications
Atsuhiro Kubo
 
05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters
Alexandre Moneger
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATS
Kiwamu Okabe
 
Contributing swift
Contributing swiftContributing swift
Contributing swift
Yuki Kuroda
 
Shibuyajs Digest
Shibuyajs DigestShibuyajs Digest
Shibuyajs Digest
takesako
 
Pragmatic sbt
Pragmatic sbtPragmatic sbt
Pragmatic sbt
Hermann Hueck
 
From Android NDK To AOSP
From Android NDK To AOSPFrom Android NDK To AOSP
From Android NDK To AOSP
Min-Yih Hsu
 
[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx
[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx
[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx
AhmedElbaloug
 
Measures for Growth with Firebase Remote Config & Unit Testing Using RxSwift
Measures for Growth with Firebase Remote Config & Unit Testing Using RxSwiftMeasures for Growth with Firebase Remote Config & Unit Testing Using RxSwift
Measures for Growth with Firebase Remote Config & Unit Testing Using RxSwift
Fumiya Sakai
 
The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210
Mahmoud Samir Fayed
 
WebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All RevolutionaryWebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All Revolutionary
C4Media
 
Un monde où 1 ms vaut 100 M€ - Devoxx France 2015
Un monde où 1 ms vaut 100 M€ - Devoxx France 2015Un monde où 1 ms vaut 100 M€ - Devoxx France 2015
Un monde où 1 ms vaut 100 M€ - Devoxx France 2015
ThierryAbalea
 
Seaborn graphing present
Seaborn graphing presentSeaborn graphing present
Seaborn graphing present
Yilin Zeng
 
JavaScript Code Kata Workshop – JavaScript Conference 2012 – OPITZ CONSULTIN...
JavaScript Code Kata Workshop –  JavaScript Conference 2012 – OPITZ CONSULTIN...JavaScript Code Kata Workshop –  JavaScript Conference 2012 – OPITZ CONSULTIN...
JavaScript Code Kata Workshop – JavaScript Conference 2012 – OPITZ CONSULTIN...
OPITZ CONSULTING Deutschland
 

Similar to SIL for First Time Learners (20)

Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own Domain
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
 
Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24
Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24
Collaboration hack with slackbot - PyCon HK 2018 - 2018.11.24
 
Evolution and AI
Evolution and AIEvolution and AI
Evolution and AI
 
Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#
 
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
 
The Birth of FormalBears - A new META for BEAR.Sunday applications
The Birth of FormalBears - A new META for BEAR.Sunday applicationsThe Birth of FormalBears - A new META for BEAR.Sunday applications
The Birth of FormalBears - A new META for BEAR.Sunday applications
 
05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters05 - Bypassing DEP, or why ASLR matters
05 - Bypassing DEP, or why ASLR matters
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATS
 
Contributing swift
Contributing swiftContributing swift
Contributing swift
 
Shibuyajs Digest
Shibuyajs DigestShibuyajs Digest
Shibuyajs Digest
 
Pragmatic sbt
Pragmatic sbtPragmatic sbt
Pragmatic sbt
 
From Android NDK To AOSP
From Android NDK To AOSPFrom Android NDK To AOSP
From Android NDK To AOSP
 
[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx
[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx
[GEMINI EXTERNAL DECK] Introduction to Gemini.pptx
 
Measures for Growth with Firebase Remote Config & Unit Testing Using RxSwift
Measures for Growth with Firebase Remote Config & Unit Testing Using RxSwiftMeasures for Growth with Firebase Remote Config & Unit Testing Using RxSwift
Measures for Growth with Firebase Remote Config & Unit Testing Using RxSwift
 
The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210The Ring programming language version 1.9 book - Part 56 of 210
The Ring programming language version 1.9 book - Part 56 of 210
 
WebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All RevolutionaryWebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All Revolutionary
 
Un monde où 1 ms vaut 100 M€ - Devoxx France 2015
Un monde où 1 ms vaut 100 M€ - Devoxx France 2015Un monde où 1 ms vaut 100 M€ - Devoxx France 2015
Un monde où 1 ms vaut 100 M€ - Devoxx France 2015
 
Seaborn graphing present
Seaborn graphing presentSeaborn graphing present
Seaborn graphing present
 
JavaScript Code Kata Workshop – JavaScript Conference 2012 – OPITZ CONSULTIN...
JavaScript Code Kata Workshop –  JavaScript Conference 2012 – OPITZ CONSULTIN...JavaScript Code Kata Workshop –  JavaScript Conference 2012 – OPITZ CONSULTIN...
JavaScript Code Kata Workshop – JavaScript Conference 2012 – OPITZ CONSULTIN...
 

More from Yusuke Kita

Integrating libSyntax into the compiler pipeline
Integrating libSyntax into the compiler pipelineIntegrating libSyntax into the compiler pipeline
Integrating libSyntax into the compiler pipeline
Yusuke Kita
 
Making your own tool using SwiftSyntax
Making your own tool using SwiftSyntaxMaking your own tool using SwiftSyntax
Making your own tool using SwiftSyntax
Yusuke Kita
 
[Deprecated] Integrating libSyntax into the compiler pipeline
[Deprecated] Integrating libSyntax into the compiler pipeline[Deprecated] Integrating libSyntax into the compiler pipeline
[Deprecated] Integrating libSyntax into the compiler pipeline
Yusuke Kita
 
Creating your own Bitrise step
Creating your own Bitrise stepCreating your own Bitrise step
Creating your own Bitrise step
Yusuke Kita
 
Introducing swift-format
Introducing swift-formatIntroducing swift-format
Introducing swift-format
Yusuke Kita
 
Unidirectional Data Flow Through SwiftUI
Unidirectional Data Flow Through SwiftUIUnidirectional Data Flow Through SwiftUI
Unidirectional Data Flow Through SwiftUI
Yusuke Kita
 
Contributing to Swift Compiler
Contributing to Swift CompilerContributing to Swift Compiler
Contributing to Swift Compiler
Yusuke Kita
 
Writing a compiler in go
Writing a compiler in goWriting a compiler in go
Writing a compiler in go
Yusuke Kita
 
Writing an interpreter in swift
Writing an interpreter in swiftWriting an interpreter in swift
Writing an interpreter in swift
Yusuke Kita
 
var, let in SIL
var, let in SILvar, let in SIL
var, let in SIL
Yusuke Kita
 
How to try! Swift
How to try! SwiftHow to try! Swift
How to try! Swift
Yusuke Kita
 
Type-safe Web APIs with Protocol Buffers in Swift at AltConf
Type-safe Web APIs with Protocol Buffers in Swift at AltConfType-safe Web APIs with Protocol Buffers in Swift at AltConf
Type-safe Web APIs with Protocol Buffers in Swift at AltConf
Yusuke Kita
 
Type-safe Web APIs with Protocol Buffers in Swift at iOSCon
Type-safe Web APIs with Protocol Buffers in Swift at iOSConType-safe Web APIs with Protocol Buffers in Swift at iOSCon
Type-safe Web APIs with Protocol Buffers in Swift at iOSCon
Yusuke Kita
 
Swift core
Swift coreSwift core
Swift core
Yusuke Kita
 
SwiftCoreとFoundationを読んでみた
SwiftCoreとFoundationを読んでみたSwiftCoreとFoundationを読んでみた
SwiftCoreとFoundationを読んでみた
Yusuke Kita
 
Search APIs & Universal Links
Search APIs & Universal LinksSearch APIs & Universal Links
Search APIs & Universal Links
Yusuke Kita
 
Introducing Cardio
Introducing CardioIntroducing Cardio
Introducing Cardio
Yusuke Kita
 
Command Line Tool in swift
Command Line Tool in swiftCommand Line Tool in swift
Command Line Tool in swift
Yusuke Kita
 
WWDCのチケット外れてもSFに行った方が良い理由
WWDCのチケット外れてもSFに行った方が良い理由WWDCのチケット外れてもSFに行った方が良い理由
WWDCのチケット外れてもSFに行った方が良い理由
Yusuke Kita
 
Search APIs in Spotlight and Safari
Search APIs in Spotlight and SafariSearch APIs in Spotlight and Safari
Search APIs in Spotlight and Safari
Yusuke Kita
 

More from Yusuke Kita (20)

Integrating libSyntax into the compiler pipeline
Integrating libSyntax into the compiler pipelineIntegrating libSyntax into the compiler pipeline
Integrating libSyntax into the compiler pipeline
 
Making your own tool using SwiftSyntax
Making your own tool using SwiftSyntaxMaking your own tool using SwiftSyntax
Making your own tool using SwiftSyntax
 
[Deprecated] Integrating libSyntax into the compiler pipeline
[Deprecated] Integrating libSyntax into the compiler pipeline[Deprecated] Integrating libSyntax into the compiler pipeline
[Deprecated] Integrating libSyntax into the compiler pipeline
 
Creating your own Bitrise step
Creating your own Bitrise stepCreating your own Bitrise step
Creating your own Bitrise step
 
Introducing swift-format
Introducing swift-formatIntroducing swift-format
Introducing swift-format
 
Unidirectional Data Flow Through SwiftUI
Unidirectional Data Flow Through SwiftUIUnidirectional Data Flow Through SwiftUI
Unidirectional Data Flow Through SwiftUI
 
Contributing to Swift Compiler
Contributing to Swift CompilerContributing to Swift Compiler
Contributing to Swift Compiler
 
Writing a compiler in go
Writing a compiler in goWriting a compiler in go
Writing a compiler in go
 
Writing an interpreter in swift
Writing an interpreter in swiftWriting an interpreter in swift
Writing an interpreter in swift
 
var, let in SIL
var, let in SILvar, let in SIL
var, let in SIL
 
How to try! Swift
How to try! SwiftHow to try! Swift
How to try! Swift
 
Type-safe Web APIs with Protocol Buffers in Swift at AltConf
Type-safe Web APIs with Protocol Buffers in Swift at AltConfType-safe Web APIs with Protocol Buffers in Swift at AltConf
Type-safe Web APIs with Protocol Buffers in Swift at AltConf
 
Type-safe Web APIs with Protocol Buffers in Swift at iOSCon
Type-safe Web APIs with Protocol Buffers in Swift at iOSConType-safe Web APIs with Protocol Buffers in Swift at iOSCon
Type-safe Web APIs with Protocol Buffers in Swift at iOSCon
 
Swift core
Swift coreSwift core
Swift core
 
SwiftCoreとFoundationを読んでみた
SwiftCoreとFoundationを読んでみたSwiftCoreとFoundationを読んでみた
SwiftCoreとFoundationを読んでみた
 
Search APIs & Universal Links
Search APIs & Universal LinksSearch APIs & Universal Links
Search APIs & Universal Links
 
Introducing Cardio
Introducing CardioIntroducing Cardio
Introducing Cardio
 
Command Line Tool in swift
Command Line Tool in swiftCommand Line Tool in swift
Command Line Tool in swift
 
WWDCのチケット外れてもSFに行った方が良い理由
WWDCのチケット外れてもSFに行った方が良い理由WWDCのチケット外れてもSFに行った方が良い理由
WWDCのチケット外れてもSFに行った方が良い理由
 
Search APIs in Spotlight and Safari
Search APIs in Spotlight and SafariSearch APIs in Spotlight and Safari
Search APIs in Spotlight and Safari
 

Recently uploaded

Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 

Recently uploaded (20)

Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 

SIL for First Time Learners

  • 1.
  • 2. Hi, I'm Yusuke @kitasuke SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 3. Why SIL?  SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 4. Why SIL? SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 5. Why SIL? → Better idea of Swift type system ! SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 6. Why SIL? → Better idea of Swift type system ! → Optimizations magic "✨ SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 7. Why SIL? → Better idea of Swift type system ! → Optimizations magic "✨ → For fun and profit $ SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 8. SIL   SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 9. Swift Intermediate LanguageSIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 10. SIL is a language specific Intermediate Representation SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 11. Swift  SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 12. Swift Compiler SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 13. Swift Compiler SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 14. Swift Compiler SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 15. raw SIL SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 16. canonical SIL SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 17. Objective-C  SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 18. Clang    SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 19. Clang SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 20. SIL   SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 21. How SIL works? SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 22. sample.swift func number() -> Int { let x: Int x = 1 return x } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 23. Emit SIL $swiftc -emit-sil sample.swift > sample.sil SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 24. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 25. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 26. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 27. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 28. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 29. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 30. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 31. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 32. sample.sil sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 33. Emit SIL with optimizations $swiftc -emit-sil -O sample.swift > sample.sil SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 34. sample.sil with optimizations sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = integer_literal $Builtin.Int64, 1 %1 = struct $Int (%0 : $Builtin.Int64) return %1 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 35. sample.sil with optimizations sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = integer_literal $Builtin.Int64, 1 %1 = struct $Int (%0 : $Builtin.Int64) return %1 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 36. sample.sil with optimizations sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = integer_literal $Builtin.Int64, 1 %1 = struct $Int (%0 : $Builtin.Int64) return %1 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 37. sample.sil with optimizations sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = integer_literal $Builtin.Int64, 1 %1 = struct $Int (%0 : $Builtin.Int64) return %1 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 38. sample.sil with optimizations sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = integer_literal $Builtin.Int64, 1 %1 = struct $Int (%0 : $Builtin.Int64) return %1 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 39. sample.sil with optimizations sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = integer_literal $Builtin.Int64, 1 %1 = struct $Int (%0 : $Builtin.Int64) return %1 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 40. Diff sil hidden @_T06sample6numberSiyF : $@convention(thin) () -> Int { bb0: %0 = alloc_stack $Int, let, name "x" %1 = integer_literal $Builtin.Int64, 1 %2 = struct $Int (%1 : $Builtin.Int64) store %2 to %0 : $*Int dealloc_stack %0 : $*Int return %2 : $Int } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 41. sample.swift func number() -> Int { let x: Int x = 1 return x } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 42. sample.swift with optimizations func number() -> Int { return 1 } SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 43. Mem2Reg SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 44. Register Promotion of Stack Allocations SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 45. Optimizations !✨ SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 46. Optimization flags SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 47. Optimization flags → -Onone SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 48. Optimization flags → -Onone → -O SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 49. Optimization flags → -Onone → -O → -Ounchecked SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 50. Optimization flags → -Onone → -O → -Ounchecked → -Osize SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 51. Tips for debug → -Xllvm -sil-print-all → -Xllvm -sil-print-only-functions → -Xllvm -sil-print-before/after/around SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 52. Summary SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 53. Summary → Optimize, optimize and optimize ! SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 54. Summary → Optimize, optimize and optimize ! → Better idea of how Swift Compiler works " SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 55. Summary → Optimize, optimize and optimize ! → Better idea of how Swift Compiler works " → Definitely worth learning # SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 56. References → Swift type in SIL → swift/docs/SIL.rst → Debugging the Swift Compiler → Swift's High-Level IR: A Case Study of Complementing LLVM IR with Language-Specific Optimization SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018
  • 57. Thank you! SIL for First Time Learners, Yusuke Kita (@kitasuke), /dev/world/2018