Conventionally, LLVM handles mismatches between platform capabilities by using the compiler-rt library. This provides the basic level of platform support expected by LLVM IR. This effort will effectively require an implementation of this functionality, but the exact form of this support library is to be determined.
The primary task here is to determine how we want to make these polyfills available to the compiled code (#24), and also how the polyfills should be structured in a uniform fashion. It also needs to work out how we plan to compile the polyfills into the same (FlatLowered?) representation as the compiled LLVM IR.
We want to make the system heavily modular so that new polyfills can be added without having to change the polyfill system or the way the polyfills are emitted.
Description
Conventionally, LLVM handles mismatches between platform capabilities by using the
compiler-rt
library. This provides the basic level of platform support expected by LLVM IR. This effort will effectively require an implementation of this functionality, but the exact form of this support library is to be determined.The primary task here is to determine how we want to make these polyfills available to the compiled code (#24), and also how the polyfills should be structured in a uniform fashion. It also needs to work out how we plan to compile the polyfills into the same (
FlatLowered
?) representation as the compiled LLVM IR.We want to make the system heavily modular so that new polyfills can be added without having to change the polyfill system or the way the polyfills are emitted.