[PATCH] Added -mlink-init-bitcode-file option to pre-populate new module with IR loaded from specified file.

Artem Belevich tra at google.com
Tue May 12 14:30:58 PDT 2015


Hi echristo, dblaikie, rnk,

- 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.

http://reviews.llvm.org/D9721

Files:
  include/clang/CodeGen/ModuleBuilder.h
  include/clang/Driver/CC1Options.td
  include/clang/Frontend/CodeGenOptions.h
  lib/CodeGen/CodeGenAction.cpp
  lib/CodeGen/ModuleBuilder.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/link-bitcode-file.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9721.25628.patch
Type: text/x-patch
Size: 10323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150512/29b35e06/attachment.bin>


More information about the cfe-commits mailing list