MCPcopy Create free account
hub / github.com/apache/impala / CreateFromFile

Method CreateFromFile

be/src/codegen/llvm-codegen.cc:250–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250Status LlvmCodeGen::CreateFromFile(FragmentState* state, ObjectPool* pool,
251 MemTracker* parent_mem_tracker, const string& file, const string& id,
252 scoped_ptr<LlvmCodeGen>* codegen) {
253 codegen->reset(new LlvmCodeGen(state, pool, parent_mem_tracker, id));
254 SCOPED_TIMER((*codegen)->profile_->total_time_counter());
255 SCOPED_THREAD_COUNTER_MEASUREMENT((*codegen)->llvm_thread_counters());
256
257 unique_ptr<llvm::Module> loaded_module;
258 Status status = (*codegen)->LoadModuleFromFile(file, &loaded_module);
259 if (!status.ok()) goto error;
260 status = (*codegen)->Init(move(loaded_module));
261 if (!status.ok()) goto error;
262 return Status::OK();
263error:
264 (*codegen)->Close();
265 return status;
266}
267
268Status LlvmCodeGen::CreateFromMemory(FragmentState* state, ObjectPool* pool,
269 MemTracker* parent_mem_tracker, const string& id, scoped_ptr<LlvmCodeGen>* codegen) {

Callers

nothing calls this directly

Calls 9

moveFunction · 0.85
OKFunction · 0.85
total_time_counterMethod · 0.80
llvm_thread_countersMethod · 0.80
LoadModuleFromFileMethod · 0.80
resetMethod · 0.65
okMethod · 0.45
InitMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected