3 ms·
It says 'LLVM style intermediate code'; why not actual LLVM intermediate code? What would be the reason for an alternative? If it would be actual LLVM code it w
by tluyben2 13y ago
It says 'LLVM style intermediate code'; why not actual LLVM intermediate code? What would be the reason for an alternative? If it would be actual LLVM code it would be easier to compile from programming languages and to different backends, right?
- lucian1900 13y agoLLVM bitcode is quite large and not really suited to being a transport format. The bytecode they did come up with is probably a LLVM frontend.
- drp4929 13y agoAny reference to support your claim that LLVM bit code is quite large ?
- lucian1900 13y agoIt's quite obvious if you look at the spec. It retains very large amounts of information that is simply not needed merely for executing programs, but is quite useful for compiler backends and tools. It's quite smart to write a LLVM backend and frontend for a custom (compact) bytecode.
- flohofwoe 13y ago"Finalized" and gzipped PNaCl code is about the same size as gzipped x86 or gzipped emscripten-generated JS code. PNaCl code seems to have a static overhead of about 400kByte, probably statically linked code which is either handled through Web APIs in emscripten, or dynamically linked CRT in native executables.
- mccr8 13y agoIt is based on LLVM, but presumably they have to modify it for their particular needs. The PNaCl bitcode reference manual goes into more detail: https://developers.google.com/native-client/dev/reference/pnacl-bitcode-abi https://developers.google.com/native-client/dev/reference/pn...
- eliben 13y agoMore details on the design process are available here: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi http://www.chromium.org/nativeclient/pnacl/stability-of-the-... (there's a link to a nicely formatted PDF in the bottom). TL;DR: a lot of thought went into it :)
- deleted 13y ago[deleted]
- kenferry 13y ago"The PNaCl bitcode is a restricted subset of LLVM IR." https://groups.google.com/forum/#!msg/llvm-dev/lk6dZzwW0ls/JhNM5XPRH6UJ https://groups.google.com/forum/#!msg/llvm-dev/lk6dZzwW0ls/J...