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

Method InitializeIntrinsics

cpp/src/gandiva/decimal_ir.cc:93–104  ·  view source on GitHub ↗

Lookup intrinsic functions

Source from the content-addressed store, hash-verified

91
92// Lookup intrinsic functions
93void DecimalIR::InitializeIntrinsics() {
94 sadd_with_overflow_fn_ = getOrInsertDeclaration(
95 module(), llvm::Intrinsic::sadd_with_overflow, types()->i128_type());
96 DCHECK_NE(sadd_with_overflow_fn_, nullptr);
97
98 smul_with_overflow_fn_ = getOrInsertDeclaration(
99 module(), llvm::Intrinsic::smul_with_overflow, types()->i128_type());
100 DCHECK_NE(smul_with_overflow_fn_, nullptr);
101
102 i128_with_overflow_struct_type_ =
103 sadd_with_overflow_fn_->getFunctionType()->getReturnType();
104}
105
106// CPP: return kScaleMultipliers[scale]
107llvm::Value* DecimalIR::GetScaleMultiplier(llvm::Value* scale) {

Callers 1

AddFunctionsMethod · 0.80

Calls 3

getOrInsertDeclarationFunction · 0.85
moduleFunction · 0.85
typesFunction · 0.70

Tested by

no test coverage detected