<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Hello,</span><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
[The first paragraph is safe to skip if you already know what PNaCl is.]</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">The Portable Native Client (PNaCl) project is a toolchain for producing portable bitcode from C and C++ code and running in securely and efficiently on the web via Native Client. For more details see this presentation from the last Google I/O: <a href="https://developers.google.com/events/io/sessions/325679543" target="_blank">https://developers.google.com/events/io/sessions/325679543</a>and <a href="http://www.chromium.org/nativeclient/pnacl/building-and-testing-portable-native-client" target="_blank">http://www.chromium.org/nativeclient/pnacl/building-and-testing-portable-native-client</a></div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">PNaCl uses a subset of LLVM IR as its bitcode. Our goal is a single bitcode file that can be "translated" on a target machine to a sandboxed native executable for the target architecture and executed. This presents a number of challenges with architecture independence and backwards compatibility.</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">This is a document we've been using internally to coordinate the effort to simplify LLVM IR to the level where it's suitable to serve as a portable, backwards compatible bitcode. After a general introduction, it presents concrete steps the PNaCl toolchain performs to simplify LLVM IR, with some discussion of their pros/cons. This is based on a few years of observing changes in LLVM IR and their meaning for PNaCl.</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">We've considered the points made by Dan in his "LLVM IR is a compiler IR" post (<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043719.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/043719.html</a>) and have also discussed this with him a couple of times since then. We believe that the changes described by the attached document, together with other PNaCl-specific characteristics, make the chosen subset suitable for the task.</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Any comments and questions are very welcome. Our goal in publishing this is to facilitate an open discussion, as well as serve as a reference point for other projects interested in using LLVM IR for portable and/or stable use cases. Note that the document is a work-in-progress and some details may change. We intend to publish a more structured reference for PNaCl bitcode at some point in the future.</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">The document is available as a PDF here:</div><div><font face="arial, sans-serif"><a href="https://docs.google.com/a/chromium.org/viewer?a=v&pid=sites&srcid=Y2hyb21pdW0ub3JnfGRldnxneDo0OWYwZjVkYWFjOWNjODE1">https://docs.google.com/a/chromium.org/viewer?a=v&pid=sites&srcid=Y2hyb21pdW0ub3JnfGRldnxneDo0OWYwZjVkYWFjOWNjODE1</a></font><br>
</div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">And in text here:</font></div><div><a href="https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi">https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi</a><font face="arial, sans-serif"><br>
</font></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Eli</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div><br></div></div>