diff options
author | Yang, Rong R <rong.r.yang@intel.com> | 2017-06-22 17:38:55 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2017-06-23 16:04:54 +0800 |
commit | 36f6a8b6b956ffed15d100abe677125d4a5aeaed (patch) | |
tree | 17353b2825c6fbb8124746bafca9aa9ee196a8f0 /src/cl_program.c | |
parent | f32e067b2ef32568253cf32fd1bd0eaafe20439c (diff) | |
download | beignet-36f6a8b6b956ffed15d100abe677125d4a5aeaed.tar.gz |
GBE: clean llvm module's clone and release.
There are some changes:
1. Clone the module before call LLVMLinkModules2, remove other
clones for it.
2. Don't delete module in function llvmToGen.
3. Add a function programNewFromLLVMFile so genProgramNewFromLLVM
and buildFromLLVMModule only handle llvm module. Actually,
programNewFromLLVMFile is only used by clCreateProgramWithLLVMIntel,
and I think it is useless, maybe we could delete it at all.
V2: define errDiag beside #if/#endif.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
Diffstat (limited to 'src/cl_program.c')
-rw-r--r-- | src/cl_program.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cl_program.c b/src/cl_program.c index bb96d98f..faa35725 100644 --- a/src/cl_program.c +++ b/src/cl_program.c @@ -458,7 +458,7 @@ cl_program_create_from_llvm(cl_context ctx, goto error; } - program->opaque = compiler_program_new_from_llvm(ctx->devices[0]->device_id, file_name, NULL, NULL, NULL, program->build_log_max_sz, program->build_log, &program->build_log_sz, 1, NULL); + program->opaque = compiler_program_new_from_llvm_file(ctx->devices[0]->device_id, file_name, program->build_log_max_sz, program->build_log, &program->build_log_sz); if (UNLIKELY(program->opaque == NULL)) { err = CL_INVALID_PROGRAM; goto error; |