PUBLIC
Paul Bowen-Huggett paul.huggett@sony.com
“Demo of a repository for statically compiled programs” 2016 US LLVM Developers’ Meeting
PROGRAMMING
TO Y PROGRAMMING Demo of a repository for statically compiled - - PowerPoint PPT Presentation
PUBLIC Sony Interactive Entertainment TO Y PROGRAMMING Demo of a repository for statically compiled programs 2016 US LLVM Developers Meeting Paul Bowen-Huggett paul.huggett@sony.com Agenda Background RFC Is the idea generally
PUBLIC
Paul Bowen-Huggett paul.huggett@sony.com
“Demo of a repository for statically compiled programs” 2016 US LLVM Developers’ Meeting
PROGRAMMING
Agenda
Background
RFC
compilation database, ThinLTO, etc.) Views from respective owners?
Front-/Back-end time ratio 0% 20% 40% 60% 80% 100% Source files
Median Time Front-end Back-end Release 19% 81% Debug
40% 60%
Chromium Browser Build Ratios
Back-end Front-end (Release) Front-end (Debug)
Size (bytes) 10 100 1,000 10,000 Number of instances 100 200 300 400 500
Chromium Browser COMDAT Groups
Number of instances Generated Discarded 577,397 576,233 99.8%
Toy Tools
Role Name Compiler toycc Linker toyld Debugger toydb Runtime toyvm Role Name Garbage Collector toygc Strip toystrip Merge toymerge
toycc main.x toycc a.toy b.toy b.o a.o 🐜 toydb toyvm 🔘 toyld toygc
Limitations
C++:
defined types, no vague linkage…
Demo
e n t r y p
n t
e n t r y p
n t
d(f4) … d(f3) … d(f2) d(f1) Value Key 01 7a 52 00 01 78 10 01 .eh_frame [] .text 55 48 89 e5 48 83 [] type external fixups internal fixups binary .text+0-x2f .text+0x19 “fact3”+0 “sieve”+0 .text 55 48 89 e5 48 83 [] type external fixups internal fixups binary “factorial”+0 d(f5) .text 66 4e 89 e5 48 83 [] type external fixups internal fixups binary “factorial”+0Should the repository be a network resource?
Distributed Builds
Distributed Build
strip merge Agent 1 S1 T1 S2 T2 compile T1 S2 compile T2 S1 Agent 2 S3 T3 S4 T4 compile T3 S4 compile T4 S3 🔘 link binary
Challenges?
Conclusion
times by ~60% (“speed-of-light” based on Chrome Debug)
most
redundancy at source: minimize link-time processing and copying
mapped hash tables)