This revision was automatically updated to reflect the committed changes.
Closed by commit rC348752: [OpenCL][CodeGen] Fix replacing memcpy with
addrspacecast (authored by asavonic, committed by ).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54947/new/
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54947/new/
https://reviews.llvm.org/D54947
___
cfe-commits mailing
sidorovd updated this revision to Diff 176085.
sidorovd marked an inline comment as done.
sidorovd added a comment.
Removed redundant lines in a comment
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54947/new/
https://reviews.llvm.org/D54947
Files:
lib/CodeGen/CGCall.cpp
sidorovd added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:3972
+ // we don't want to perform address space cast for it, since that
+ // leads to casting __private * (default addr space in OpenCL) to
+ // __global * which is not valid. Create
Anastasia added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:3972
+ // we don't want to perform address space cast for it, since that
+ // leads to casting __private * (default addr space in OpenCL) to
+ // __global * which is not valid. Create
sidorovd updated this revision to Diff 175722.
sidorovd marked 4 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54947/new/
https://reviews.llvm.org/D54947
Files:
lib/CodeGen/CGCall.cpp
test/CodeGenOpenCL/addr-space-struct-arg.cl
Index:
sidorovd added a comment.
@yaxunl, since I'm partially reverting your change
https://reviews.llvm.org/D34367 can you give a feedback on this?
Comment at: lib/CodeGen/CGCall.cpp:3972
+ // we don't want to perform address space cast for it, since that
+ //
Anastasia added inline comments.
Comment at: lib/CodeGen/CGCall.cpp:3972
+ // we don't want to perform address space cast for it, since that
+ // leads to casting __private * (default addr space in OpenCL) to
+ // __global * which is not valid. Create
sidorovd created this revision.
sidorovd added reviewers: yaxunl, Anastasia.
Herald added a subscriber: cfe-commits.
If a function argument is byval and RV is located in default or alloca address
space
an optimization of creating addrspacecast instead of memcpy is performed. That
is
not correct