25 #ifndef UDF_COMPILER_H
26 #define UDF_COMPILER_H
28 #include <clang/Driver/Compilation.h>
29 #include <clang/Driver/Driver.h>
30 #include <clang/Frontend/CompilerInstance.h>
44 llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs>
diag_id;
54 const std::string& clang_path =
"");
57 const std::string& clang_path,
58 const std::vector<std::string> clang_options);
63 void init(
const std::string& clang_path);
71 void replaceExtn(std::string& s,
const std::string& new_ext);
clang::driver::Driver * getClangDriver()
std::string genCpuIrFilename(const char *udf_file_name)
int compileToCpuByteCode(const char *udf_file_name)
void readCompiledModules()
std::vector< std::string > clang_options_
UdfCompiler(const std::string &udf_file_name, CudaMgr_Namespace::NvidiaDeviceArch target_arch, const std::string &clang_path="")
const std::string & getAstFileName() const
void readCpuCompiledModule()
std::string genGpuIrFilename(const char *udf_file_name)
std::string removeFileExtension(const std::string &path)
llvm::IntrusiveRefCntPtr< clang::DiagnosticIDs > diag_id
int compileToGpuByteCode(const char *udf_file_name, bool cpu_mode)
std::string udf_ast_file_name_
UdfClangDriver(const std::string &)
int parseToAst(const char *file_name)
CudaMgr_Namespace::NvidiaDeviceArch target_arch_
void init(const std::string &clang_path)
std::string udf_file_name_
void replaceExtn(std::string &s, const std::string &new_ext)
std::unique_ptr< clang::DiagnosticConsumer > diag_client_owner
void readGpuCompiledModule()
std::string getFileExt(std::string &s)
clang::driver::Driver the_driver
clang::DiagnosticsEngine diags
llvm::IntrusiveRefCntPtr< clang::DiagnosticOptions > diag_options
clang::DiagnosticConsumer * diag_client
int compileFromCommandLine(const std::vector< std::string > &command_line)