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

Method CodegenDebugTrace

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

Source from the content-addressed store, hash-verified

1604}
1605
1606void LlvmCodeGen::CodegenDebugTrace(
1607 LlvmBuilder* builder, const char* str, llvm::Value* v1) {
1608 LOG(ERROR) << "Remove IR codegen debug traces before checking in.";
1609
1610 // Call printf by embedding the string into the module and getting a pointer to it.
1611 llvm::Value* const llvm_str =
1612 GetStringConstant(builder, Substitute("LLVM Trace: $0", str));
1613
1614 llvm::Function* printf = module_->getFunction("printf");
1615 DCHECK(printf != nullptr);
1616
1617 vector<llvm::Value*> calling_args;
1618 calling_args.push_back(llvm_str);
1619 if (v1 != NULL) calling_args.push_back(v1);
1620 builder->CreateCall(printf, calling_args);
1621}
1622
1623Status LlvmCodeGen::GetSymbols(const string& file, const string& module_id,
1624 unordered_set<string>* symbols) {

Callers 1

CodegenInnerLoopFunction · 0.80

Calls 4

SubstituteFunction · 0.85
push_backMethod · 0.80
CreateCallMethod · 0.80
getFunctionMethod · 0.65

Tested by 1

CodegenInnerLoopFunction · 0.64