- Added -mlink-init-bitcode-file option to pre-populate new module with IR loaded from specified file.
- Accept IR assembly as well as bitcode.
- Added test case.
The change is needed for upcoming CUDA-related changes that require linking with large device-specific library provided as bitcode. Initializing module with the library IR is faster than linking the library in after compilation. It also allows convenient way to run some cuda-specific passes on the library IR (NVVM reflect and Internalize) alone without affecting IR we generate during compilation.