[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-09 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360342: [OpenCL] Make global ctor init function a kernel (authored by stulova, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D61488#1496154 , @kpet wrote: > The comments could use a bit more polishing but nothing that justifies making > another iteration IMHO. LGTM! Sure, feel free to put up a patch if you like. :) Thanks! CHANGES SINCE LAST

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-09 Thread Kévin Petit via Phabricator via cfe-commits
kpet accepted this revision. kpet added a comment. This revision is now accepted and ready to land. The comments could use a bit more polishing but nothing that justifies making another iteration IMHO. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61488/new/

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 198678. Anastasia added a comment. - Improved comments - Switched to SPIR kernel CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61488/new/ https://reviews.llvm.org/D61488 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeGen/CodeGenFunction.cpp

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Kévin Petit via Phabricator via cfe-commits
kpet added inline comments. Comment at: lib/CodeGen/CGDeclCXX.cpp:583 + // In OpenCL global init function should be converted to the kernel to be + // able to initiate its execution from the host side. functions should be -> must be? to the kernel -> to a

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:1231 + assert(((FD && CGF) || (!FD && !CGF)) && + "Incorrect use - FD and CFG should either be both null or not!"); + // Create MDNodes that represent

[PATCH] D61488: [OpenCL] Make global ctor init function a kernel

2019-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: kpet, rjmccall. Herald added subscribers: ebevhan, yaxunl. We need to be able to enqueue internal function that initializes global constructors on the host side. Therefore it has to be converted to a kernel. Note, supporting