tkonolige commented on code in PR #12200:
URL: https://github.com/apache/tvm/pull/12200#discussion_r947045978
##########
src/target/llvm/codegen_cpu.cc:
##########
@@ -642,7 +642,16 @@ CodeGenLLVM::TypedPointer
CodeGenCPU::PackClosureData(const Array<Var>& vfields,
}
llvm::StructType* ctype = struct_name.size() ?
llvm::StructType::create(fields, struct_name)
:
llvm::StructType::create(fields);
- llvm::Value* cvalue = builder_->CreateAlloca(ctype, ConstInt32(1));
+ // create ctype alloca at function entry
Review Comment:
Can you add an explanation of why we allocate at the function entry.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]