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.
That assumes that the operation can be translated to LLVM? This isn't clearly said here.
What about a SPIRV target?