by apocalypses · 6y ago · 0 comments
LLVM supports per-function subtarget attributes, so you can compile individual functions with AVX2 support versus SSE4 support. The clang frontend even has a few different ways of triggering this support, with one method allowing you to specify per-CPU dispatch, and another merely specifying target attributes on a per-function basis.
I don't think any of that would conflict with using bitcode for everything you don't have a hand-optimized machine-specific implementation of.