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

Method AddFunctions

cpp/src/gandiva/decimal_ir.cc:478–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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