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

Method CheckResult

be/src/codegen/llvm-codegen-cache-test.cc:152–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150};
151
152void LlvmCodeGenCacheTest::CheckResult(
153 CodeGenCacheEntry& entry, const string& module_id, bool is_double) {
154 ASSERT_TRUE(!entry.Empty());
155 ASSERT_TRUE(entry.cached_engine_pointer != nullptr);
156 scoped_ptr<LlvmCodeGen> codegen;
157 ASSERT_OK(
158 LlvmCodeGen::CreateImpalaCodegen(fragment_state_, nullptr, "test1", &codegen));
159 if (is_double) {
160 AddLlvmCodegenDouble(codegen.get(), nullptr, false /*doFinalizeModule*/);
161 } else {
162 AddLlvmCodegenEcho(codegen.get(), nullptr, false /*doFinalizeModule*/);
163 }
164 ASSERT_OK(codegen->FinalizeLazyMaterialization());
165 codegen->module_->setModuleIdentifier(module_id);
166 // Use the specific cache for finalizing the module and expect the compiled functions
167 // in the execution engine is from the cache, then verify the correctness.
168 codegen->execution_engine()->setObjectCache(entry.cached_engine_pointer);
169 codegen->execution_engine()->finalizeObject();
170 codegen->DestroyModule();
171 CheckResult(codegen.get(), is_double);
172 codegen->Close();
173}
174
175// The function is to create and return a CodeGenObjectCache which contains a specific
176// compiled codegened function.

Callers

nothing calls this directly

Calls 6

execution_engineMethod · 0.80
DestroyModuleMethod · 0.80
getMethod · 0.65
EmptyMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected