MCPcopy Create free account
hub / github.com/apache/arrow / AddFunctions

Method AddFunctions

cpp/src/gandiva/decimal_ir.cc:472–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472Status DecimalIR::AddFunctions(Engine* engine) {
473 auto decimal_ir = std::make_shared<DecimalIR>(engine);
474
475 // Populate global variables used by decimal operations.
476 decimal_ir->AddGlobals(engine);
477
478 // Lookup intrinsic functions
479 decimal_ir->InitializeIntrinsics();
480
481 ARROW_RETURN_NOT_OK(decimal_ir->BuildAdd());
482 ARROW_RETURN_NOT_OK(decimal_ir->BuildSubtract());
483 ARROW_RETURN_NOT_OK(decimal_ir->BuildCompare(kEQFunction, llvm::ICmpInst::ICMP_EQ));
484 ARROW_RETURN_NOT_OK(decimal_ir->BuildCompare(kNEFunction, llvm::ICmpInst::ICMP_NE));
485 ARROW_RETURN_NOT_OK(decimal_ir->BuildCompare(kLTFunction, llvm::ICmpInst::ICMP_SLT));
486 ARROW_RETURN_NOT_OK(decimal_ir->BuildCompare(kLEFunction, llvm::ICmpInst::ICMP_SLE));
487 ARROW_RETURN_NOT_OK(decimal_ir->BuildCompare(kGTFunction, llvm::ICmpInst::ICMP_SGT));
488 ARROW_RETURN_NOT_OK(decimal_ir->BuildCompare(kGEFunction, llvm::ICmpInst::ICMP_SGE));
489 return Status::OK();
490}
491
492// Do an bitwise-or of all the overflow bits.
493llvm::Value* DecimalIR::GetCombinedOverflow(

Callers

nothing calls this directly

Calls 6

AddGlobalsMethod · 0.80
InitializeIntrinsicsMethod · 0.80
BuildAddMethod · 0.80
BuildSubtractMethod · 0.80
BuildCompareMethod · 0.80
OKFunction · 0.50

Tested by

no test coverage detected