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

Method CreateEntryBlockAlloca

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

Source from the content-addressed store, hash-verified

659}
660
661llvm::AllocaInst* LlvmCodeGen::CreateEntryBlockAlloca(
662 llvm::Function* f, const NamedVariable& var) {
663 llvm::IRBuilder<> tmp(&f->getEntryBlock(), f->getEntryBlock().begin());
664 llvm::AllocaInst* alloca = tmp.CreateAlloca(var.type, NULL, var.name.c_str());
665 if (var.type == GetNamedType(CodegenAnyVal::LLVM_DECIMALVAL_NAME)) {
666 // Generated functions may manipulate DecimalVal arguments via SIMD instructions such
667 // as 'movaps' that require 16-byte memory alignment. LLVM uses 8-byte alignment by
668 // default, so explicitly set the alignment for DecimalVals.
669 alloca->setAlignment(16);
670 }
671 return alloca;
672}
673
674llvm::AllocaInst* LlvmCodeGen::CreateEntryBlockAlloca(
675 const LlvmBuilder& builder, llvm::Type* type, const char* name) {

Calls 3

NamedVariableClass · 0.85
getParentMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected