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

Function GetLenOptimizedHashFn

be/src/codegen/llvm-codegen.cc:1964–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1962}
1963
1964static llvm::Function* GetLenOptimizedHashFn(
1965 LlvmCodeGen* codegen, IRFunction::Type f, int len) {
1966 llvm::Function* fn = codegen->GetFunction(f, false);
1967 DCHECK(fn != NULL);
1968 if (len != -1) {
1969 // Clone this function since we're going to modify it by replacing the
1970 // length with num_bytes.
1971 fn = codegen->CloneFunction(fn);
1972 llvm::Value* len_arg = codegen->GetArgument(fn, 1);
1973 len_arg->replaceAllUsesWith(codegen->GetI32Constant(len));
1974 }
1975 return codegen->FinalizeFunction(fn);
1976}
1977
1978llvm::Function* LlvmCodeGen::GetMurmurHashFunction(int len) {
1979 return GetLenOptimizedHashFn(this, IRFunction::HASH_MURMUR, len);

Callers 1

GetMurmurHashFunctionMethod · 0.85

Calls 5

CloneFunctionMethod · 0.80
GetArgumentMethod · 0.80
GetI32ConstantMethod · 0.80
FinalizeFunctionMethod · 0.80
GetFunctionMethod · 0.45

Tested by

no test coverage detected