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

Method GetCodegendComputeFnImpl

be/src/exprs/tuple-is-null-predicate.cc:70–89  ·  view source on GitHub ↗

For sample IR, see 'FillCodegendComputeFnConstantFalse' and 'FillCodegendComputeFnNonConstant'. If there is at least one non-nullable tuple, we codegen a function that returns a constant false BooleanValue.

Source from the content-addressed store, hash-verified

68/// If there is at least one non-nullable tuple, we codegen a function that returns a
69/// constant false BooleanValue.
70Status TupleIsNullPredicate::GetCodegendComputeFnImpl(LlvmCodeGen* codegen,
71 llvm::Function** fn) {
72 DCHECK_EQ(0, GetNumChildren());
73
74 llvm::Value* args[2];
75 llvm::Function* function = CreateIrFunctionPrototype(
76 "TupleIsNullPredicate", codegen, &args);
77
78 if (tuple_idxs_.size() < tuple_ids_.size()) {
79 FillCodegendComputeFnConstantFalse(codegen, function);
80 } else {
81 FillCodegendComputeFnNonConstant(codegen, function, args);
82 }
83
84 *fn = codegen->FinalizeFunction(function);
85 if (UNLIKELY(*fn == nullptr)) {
86 return Status(TErrorCode::IR_VERIFY_FAILED, "TupleIsNullPredicate");
87 }
88 return Status::OK();
89}
90
91/// Sample IR:
92/// define i16 @TupleIsNullPredicate(%"class.impala::ScalarExprEvaluator"* %eval,

Callers

nothing calls this directly

Calls 4

OKFunction · 0.85
FinalizeFunctionMethod · 0.80
StatusClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected