Gandiva LLVM- Generation of IR

Can some one please help me understand how is Gandiva invoked from Dremio? Is it invoked via JNI from Java?
Also where is the LLVM IR(intermediate Representation) created? Is it created in Java and passed to Gandiva or it is created in Gandiva (both LLVM frontend and Backend) ?