[PATCH] D28058: [OpenCL] Correct ndrange_t implementation
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 23 05:50:07 PST 2016
Anastasia added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:2491
+ llvm::Value *Range = NDRangeL.getAddress().getPointer();
+ llvm::Type *RangeTy = NDRangeL.getAddress().getType();
----------------
I think following standard Clang CodeGen convention we should add byval attribute for structs.
However, I am not sure if the best approach would be to use classifyType(...) of ABIInfo and then check what type of argument passing ABIArgInfo returns (direct/indirect/byval). Based on this we could add an attr llvm::Attribute::ByVal to the argument. Perhaps, this should be done with all arguments then. Or I am wondering if better approach would be to just use GetOrCreateLLVMFunction() helper from CodeGen!
Does anyone have any suggestion here?
https://reviews.llvm.org/D28058
More information about the cfe-commits
mailing list