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

Method ReplaceCallSitesWithValue

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

Source from the content-addressed store, hash-verified

1010}
1011
1012int LlvmCodeGen::ReplaceCallSitesWithValue(
1013 llvm::Function* caller, llvm::Value* replacement, const string& target_name) {
1014 DCHECK(!is_compiled_);
1015 DCHECK(caller != NULL);
1016 DCHECK(caller->getParent() == module_);
1017 DCHECK(replacement != NULL);
1018
1019 vector<llvm::CallInst*> call_sites;
1020 FindCallSites(caller, target_name, &call_sites);
1021 int replaced = 0;
1022 for (llvm::CallInst* call_instr : call_sites) {
1023 call_instr->replaceAllUsesWith(replacement);
1024 ++replaced;
1025 }
1026 return replaced;
1027}
1028
1029int LlvmCodeGen::ReplaceCallSitesWithBoolConst(llvm::Function* caller, bool constant,
1030 const string& target_name) {

Callers 6

CodegenMethod · 0.80
CodegenInitTupleMethod · 0.80
CodegenDecodeAvroDataMethod · 0.80
CodegenMethod · 0.80
CodegenMethod · 0.80

Calls 1

getParentMethod · 0.80

Tested by

no test coverage detected