For an explanation of these patches see D154153.
Commit message:
This patch adds the utility base class ModuleToObject. This class provides an
interface for compiling module operations into binary strings, by default this
class serialize modules to LLVM bitcode.
Does this only work with gpu.module as the comment says?