[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-18 Thread Johannes Doerfert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL351629: Emit !callback metadata and introduce the callback attribute (authored by jdoerfert, committed by ). Changed prior to commit: https://reviews.llvm.org/D55483?vs=181631=182665#toc Repository:

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 181622. jdoerfert marked 2 inline comments as done. jdoerfert added a comment. Small fixes, allow "this" inside "callbacks" Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files:

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 181631. jdoerfert added a comment. Generalize the treatment of "kw_this" as "kw_ident" Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files: include/clang/AST/ASTContext.h

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: include/clang/Basic/Builtins.def:942 LIBBUILTIN(alloca, "v*z", "f", "stdlib.h", ALL_GNU_LANGUAGES) +LIBBUILTIN(qsort_r, "", "fC<3,-1,-1,4>", "stdlib.h",

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added a comment. In D55483#1326029 , @aaron.ballman wrote: > This is missing all of the Sema and SemaCXX tests. Should have tests for > member functions, variadic functions, incorrect arguments,

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Thanks for the feedback. Once we decided on the style of the annotation, I will implement that and change the tests/documentation accordingly. Comment at: include/clang/Basic/Attr.td:1204 + VariadicUnsignedArgument<"PayloadIndices">];

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 11. jdoerfert marked 11 inline comments as done. jdoerfert added a comment. Fix and improve documentation Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files:

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 177662. jdoerfert added a comment. Update according to initial feedback Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files: include/clang/AST/ASTContext.h

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 180710. jdoerfert marked 3 inline comments as done. jdoerfert added a comment. Update encoding, rebase to HEAD Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files:

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 180714. jdoerfert added a comment. Fix tests Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files: include/clang/AST/ASTContext.h include/clang/Basic/Attr.td

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 180971. jdoerfert added a comment. Allow to use names in the callback metadata Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/ https://reviews.llvm.org/D55483 Files: include/clang/AST/ASTContext.h

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 3 inline comments as done. jdoerfert added inline comments. Comment at: include/clang/Basic/Attr.td:1204 + VariadicUnsignedArgument<"PayloadIndices">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [Undocumented];

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 181420. jdoerfert marked 21 inline comments as done. jdoerfert added a comment. Style changes, clang-format, documentation improvements Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55483/new/

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2019-01-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Updated according to your comments. Comment at: lib/Sema/SemaDeclAttr.cpp:3481 + llvm::StringMap NameIdxMapping; + NameIdxMapping["__"] = -1; + aaron.ballman wrote: > This doesn't match the documentation -- I assume you switched

[PATCH] D52118: [Loopinfo] Remove one latch case in getLoopID. NFC.

2018-09-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. > save an iteration over the loop's basic blocks (which is what getLoopLatch > does) I'm not sure this is true. getLoopLatch() in LoopInfoImpl.h only traverses the children of the

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-08 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: hfinkel, reames, fhahn, ABataev. Herald added subscribers: jfb, bollu. With commit rX (currently https://reviews.llvm.org/D54498), LLVM gained the ability to apply existing optimizations on indirections through callbacks. This

[PATCH] D59328: [OpenMP][Offloading][2/3] Codegen for target regions (TRegions)

2019-03-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 191988. jdoerfert added a comment. Syncronize interface types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59328/new/ https://reviews.llvm.org/D59328 Files: clang/lib/CodeGen/CGOpenMPRuntimeTRegion.cpp

[PATCH] D59421: [OpenMP][Offloading] Allow to build the TRegion interface functions

2019-03-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 191987. jdoerfert added a comment. Actually syncronize interface types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59421/new/ https://reviews.llvm.org/D59421 Files:

[PATCH] D59421: [OpenMP][Offloading] Allow to build the TRegion interface functions

2019-03-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 191986. jdoerfert added a comment. Synchronize interface types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59421/new/ https://reviews.llvm.org/D59421 Files: clang/lib/CodeGen/CGOpenMPRuntimeTarget.cpp

[PATCH] D59418: [OpenMP][Offloading] Extract common functionality

2019-03-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 191985. jdoerfert added a comment. Minor update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59418/new/ https://reviews.llvm.org/D59418 Files: clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-22 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 191984. jdoerfert added a comment. Introduce a ternary mode for parallel regions, fix minor mistakes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files:

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-03-29 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 192916. jdoerfert added a comment. Minor updates Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files: clang/test/CodeGenOpenCL/as_type.cl

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-03-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 192962. jdoerfert added a comment. Closed a side-channel through "integers" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59922/new/ https://reviews.llvm.org/D59922 Files: clang/test/CodeGenObjC/os_log.m

[PATCH] D59980: [Attributor] Deduce memory behavior argument attributes

2019-03-29 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 192961. jdoerfert added a comment. Minor update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59980/new/ https://reviews.llvm.org/D59980 Files: clang/test/CodeGen/arm-vfp16-arguments.c

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-03-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames. Herald added subscribers: cfe-commits, bollu, hiraditya. Herald added projects: clang, LLVM. Add the no-capture argument attribute deduction to the Attributor

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-03-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: llvm/test/Transforms/FunctionAttrs/arg_nocapture.ll:103 -; FIXME: returned missing for %a ; FIXME: We should *not* derive any attributes for the return value not present on the argument!

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-03-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 192738. jdoerfert added a comment. Fix the last bug exposed by llvm-test-suite & SPEC2006 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files:

[PATCH] D59980: [Attributor] Deduce memory behavior argument attributes

2019-03-29 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames. Herald added subscribers: cfe-commits, bollu, aheejin, hiraditya, eraman, sbc100, javed.absar, nhaehnle, jvesely. Herald added projects: clang, LLVM. jdoerfert

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-03-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames. Herald added subscribers: cfe-commits, bollu, hiraditya. Herald added projects: clang, LLVM. Deduce the "returned" argument attribute by collecting all

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:394 + +indicateFixpoint(/* Optimistic */ true); +return; xbolva00 wrote: > Maybe enum here ? > So you could call

[PATCH] D60076: [Attributor] Deduce memory behavior function attributes

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: homerdin, hfinkel, fedor.sergeev, sanjoy, spatel, nlopes, nicholas, reames. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. jdoerfert added a parent revision: D59980: [Attributor] Deduce memory behavior

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193115. jdoerfert added a comment. Minor changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files: clang/test/CodeGenOpenCL/as_type.cl

[PATCH] D59980: [Attributor] Deduce memory behavior argument attributes

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193107. jdoerfert added a comment. Minor adjustments wrt later patches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59980/new/ https://reviews.llvm.org/D59980 Files:

[PATCH] D59980: [Attributor] Deduce memory behavior argument attributes

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193123. jdoerfert added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59980/new/ https://reviews.llvm.org/D59980 Files: clang/test/CodeGen/arm-vfp16-arguments.c

[PATCH] D59922: [Attributor] Deduce "no-capture" argument attribute

2019-04-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 193122. jdoerfert added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59922/new/ https://reviews.llvm.org/D59922 Files: clang/test/CodeGenObjC/os_log.m

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I did address the comments but I will wait until I hear back on the "warning vs warning + note question". In D58091#1397586 , @jyknight wrote: > I think this warning (-Wbuiltin-requires-header) doesn't really make sense as >

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-25 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 188238. jdoerfert marked 3 inline comments as done. jdoerfert added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58091/new/ https://reviews.llvm.org/D58091 Files:

[PATCH] D57460: [WIP] Prototype a generic kernel offloading interface

2019-02-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 188458. jdoerfert added a comment. Herald added projects: clang, OpenMP, LLVM. Herald added subscribers: llvm-commits, openmp-commits, cfe-commits. Cleaned up clang part and interface. LLVM part still needs work Repository: rG LLVM Github Monorepo

[PATCH] D57460: [WIP] Prototype a generic kernel offloading interface

2019-02-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 188460. jdoerfert added a comment. Remove leftover debug msgs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57460/new/ https://reviews.llvm.org/D57460 Files: clang/lib/CodeGen/CGOpenMPRuntime.h

[PATCH] D57460: [WIP] Prototype a generic kernel offloading interface

2019-02-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I updated the patch with one that has a clean clang and runtime integration. It passes all but one OpenMP V test suite test (developed as part of ECP by U Del and others). The LLVM optimization gives us 30% speedup on the rodinia3.1/nw (Needleman Wunsch) benchmark

[PATCH] D57460: [WIP] Prototype a generic kernel offloading interface

2019-02-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 188461. jdoerfert added a comment. Remove unneeded changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57460/new/ https://reviews.llvm.org/D57460 Files: clang/lib/CodeGen/CGOpenMPRuntimeTRegion.cpp

[PATCH] D57460: [WIP] Prototype a generic kernel offloading interface

2019-02-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 188462. jdoerfert added a comment. Remove more unneeded changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57460/new/ https://reviews.llvm.org/D57460 Files: clang/lib/CodeGen/CGOpenMPRuntimeTRegion.cpp

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-26 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 188411. jdoerfert marked an inline comment as done. jdoerfert added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58091/new/ https://reviews.llvm.org/D58091 Files:

[PATCH] D59420: [NFC][OpenMP] Move runtime function generation to the target codegen

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. jdoerfert added projects: OpenMP, clang. jdoerfert added a parent revision: D59418: [OpenMP][Offloading] Extract common functionality. This commit simply moves the runtime function

[PATCH] D59421: [OpenMP][Offloading] Allow to build the TRegion interface functions

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. jdoerfert added projects: OpenMP, clang. This patch adds the TRegion interface functions to the ones we can build through the common OpenMP target offloading class. This is a

[PATCH] D59328: [OpenMP][Offloading][2/3] Codegen for target regions (TRegions)

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190840. jdoerfert added a comment. Remove code extracted into separate commits, see D59418 , D59420 , and D59421 . Repository: rG LLVM Github Monorepo

[PATCH] D59418: [OpenMP][Offloading] Extract common functionality

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. jdoerfert added a project: OpenMP. Herald added a project: clang. This patch introduces the CGOpenMPRuntimeTarget class to collect helpers and functionality common to all target

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// ABataev wrote: > jdoerfert wrote: > > ABataev wrote: > > > All exported functions are declared in the

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190710. jdoerfert marked 6 inline comments as done. jdoerfert added a comment. Change char* to void* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files:

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190717. jdoerfert marked 4 inline comments as done. jdoerfert added a comment. Replace more char* with void* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files:

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// ABataev wrote: > jdoerfert wrote: > > ABataev wrote: > > >

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. Herald added a project: OpenMP. This patch introduces an alternative OpenMP GPU kernel offloading interface called target kernel region (or TRegion). The commit includes the runtime

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190484. jdoerfert added a comment. Simplify the commmit further Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files:

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added a comment. > What is this buffer used for? [...] I'll copy your comment and respond in this review D59424 . Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:104 +///

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:104 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(ident_t *Ident, bool UseSPMDMode, +

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:73 +/// Note: Only the team master is allowed to call non-const functions! +struct shared_bytes_buffer { + ABataev

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. jdoerfert added a project: OpenMP. This commit implements the existing void** buffer used to share arguments between threads in a team with a byte-wise buffer. For now, the void** buffer

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190868. jdoerfert added a comment. Fix a typo (use of wrong variable) and improve comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files:

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190861. jdoerfert marked an inline comment as done. jdoerfert added a comment. Rebase onto D59424 and fix errors caused by the wrong use of ident_t Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:73 +/// Note: Only the team master is allowed to call non-const functions! +struct shared_bytes_buffer { + ABataev

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:104 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(ident_t *Ident, bool UseSPMDMode, +

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as not done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:73 +/// Note: Only the team master is allowed to call non-const functions! +struct shared_bytes_buffer { + >

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190866. jdoerfert marked an inline comment as done. jdoerfert added a comment. Fix the set/release use case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59424/new/ https://reviews.llvm.org/D59424 Files:

[PATCH] D59424: [OpenMP][NVPTX] Replace void** buffer by byte-wise buffer

2019-03-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h:73 +/// Note: Only the team master is allowed to call non-const functions! +struct shared_bytes_buffer { + ABataev

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:100 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(bool UseSPMDMode, + bool RequiresOMPRuntime, jdoerfert

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190767. jdoerfert marked 4 inline comments as done. jdoerfert added a comment. Add ident_t* to the interface functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 3 inline comments as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:100 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(bool UseSPMDMode, + bool

[PATCH] D59328: [OpenMP][Offloading][2/3] Codegen for target regions (TRegions)

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added a project: OpenMP. jdoerfert added reviewers: ABataev, arpith-jacob, guraypp, gtbercea, hfinkel. Herald added a project: clang. The commit includes the Clang code generation for OpenMP target constructs based on the interface target region

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 5 inline comments as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// ABataev wrote: > All exported functions are declared in

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D58091#1396382 , @aaron.ballman wrote: > If I'm following along properly, it sounds like we want to disable this > warning largely because it can appear in header files attempting to declare > the functions in question.

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D58091#1396393 , @bcain wrote: > I reported PR40692. I just tried this patch on our local build where we saw > the failure on an RTOS implementing pthreads. Unfortunately with this patch > I encountered an (unrelated)

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D58091#1396437 , @aaron.ballman wrote: > In D58091#1396397 , @jdoerfert wrote: > > > In D58091#1396382 , @aaron.ballman > > wrote: > > > > >

[PATCH] D58091: Customize warnings for missing built-in type

2019-02-11 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: jyknight, lebedev.ri, aaron.ballman, bcain. Herald added subscribers: jfb, bollu, krytarowski, emaste. Herald added a project: clang. If we detect a built-in declaration for which we cannot derive a type matching the pattern in the

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:495 + virtual size_t getNumReturnValues() const override { +return isValidState() ? ReturnedValues.size() : -1; + } This should

[PATCH] D57460: [OpenMP][Offloading] A generic and simple OpenMP target kernel interface

2019-03-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. Patch was split, new revisions can be found here: OpenMP: https://reviews.llvm.org/D59319 Clang: https://reviews.llvm.org/D59328 LLVM: https://reviews.llvm.org/D59331 Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D61949: [OpenMP][bugfix] Fix issues with C++ 17 compilation when handling math functions

2019-05-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Missing `defined(__cplusplus)` to avoid warnings and we have to resolve the two new includes. Otherwise, this looks good. So, if you "fix" both go ahead and commit, if not, lets discuss. Comment at: lib/Headers/__clang_cuda_device_functions.h:1477

[PATCH] D61949: [OpenMP][bugfix] Fix issues with C++ 17 compilation when handling math functions

2019-05-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert requested changes to this revision. jdoerfert added inline comments. This revision now requires changes to proceed. Comment at: lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h:24 + #include + #include #endif jdoerfert wrote: > I ask

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: lib/Headers/__clang_cuda_cmath.h:55-56 +#if defined(_OPENMP) && defined(__cplusplus) +__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); } +__DEVICE__ const double abs(const double __x) { return

[PATCH] D62046: [OpenMP][bugfix] Add missing math functions variants for log and abs.

2019-05-17 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This LGTM me, @tra or @efriedma any objections? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62046/new/ https://reviews.llvm.org/D62046 ___ cfe-commits mailing list

[PATCH] D60583: [AArch64] Implement Vector Funtion ABI name mangling.

2019-06-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert reopened this revision. jdoerfert added a comment. This revision is now accepted and ready to land. Why/Where did we decide to clobber the attribute list with "non-existent function names"? This seems to me like an ad-hoc implementation of the RFC that is currently discussed but

[PATCH] D60583: [AArch64] Implement Vector Funtion ABI name mangling.

2019-06-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D60583#1529882 , @ABataev wrote: > In D60583#1529878 , @jdoerfert wrote: > > > Why/Where did we decide to clobber the attribute list with "non-existent > > function names"? > > > >

[PATCH] D60583: [AArch64] Implement Vector Funtion ABI name mangling.

2019-06-04 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D60583#1529937 , @fpetrogalli wrote: > In D60583#1529878 , @jdoerfert wrote: > > > Why/Where did we decide to clobber the attribute list with "non-existent > > function names"? > > >

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 203973. jdoerfert added a comment. Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files: clang/test/CodeGenOpenCL/as_type.cl

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D59919#1535643 , @nicholas wrote: > > CHANGED: build-libcalls NumNoUnwind > > 4526 -> 3382 ( -25.276%) > > Why did the number of nounwinds drop? I rerun the experiment with

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 203742. jdoerfert added a comment. Cleanup leftover arguments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files: clang/test/CodeGenOpenCL/as_type.cl

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 203741. jdoerfert added a comment. Update to new Attributor design and more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files:

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added a comment. Thanks for looking at this. I'll update the patch asap In D59919#1535643 , @nicholas wrote: > CHANGED: build-libcalls NumNoUnwind > 4526 ->

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 204626. jdoerfert added a comment. Simplify the interface Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files: clang/test/CodeGenOpenCL/as_type.cl

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 203819. jdoerfert marked 2 inline comments as done. jdoerfert added a comment. Fix Typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files:

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-06-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 203818. jdoerfert added a comment. Use worklist instead of recursion, add tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files:

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. What about `abs` tests? Comment at: lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h:17 + #include + #include +#endif Why do we need the stdlib includes again? Comment at:

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h:17 + #include + #include +#endif gtbercea wrote: > jdoerfert wrote: > > Why do we need the stdlib includes again? > They are both prone to abs inclusion.

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. This always includes the declare file but not the define file, correct? Could we have 4 tests that are compiled in target mode with: // with and without math.h/cmath (clang/clang++) #include long abs(long __i) { return (__i < 0 ? -i : i); } Repository:

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Last issue I have (in addition to the check @tra suggested) is the order in which we include math.h and cstdlib. can you flip it in one of the test cases? Comment at: lib/Headers/__clang_cuda_math_forward_declares.h:30-38 +#ifndef _OPENMP

[PATCH] D59919: [Attributor] Deduce "returned" argument attribute

2019-05-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 199114. jdoerfert added a comment. Rebase on newest Attributor design Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59919/new/ https://reviews.llvm.org/D59919 Files: clang/test/CodeGenOpenCL/as_type.cl

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D61765#1500351 , @gtbercea wrote: > - Exclude clock functions. Reverse inclusion order. LGTM from my side. I don't have strong feelings about testing libc++ now, though it is probably a good idea to have such a testbed. I

[PATCH] D61765: [OpenMP][Clang][BugFix] Split declares and math functions inclusion.

2019-05-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Two small changes and then it is fine with me. @tra ? 1. we need to use ifdef to not define clock 2. Can you switch the include order in `test/Headers/nvptx_device_math_functions.cpp`? P.S. I'm currently at the OpenMP standard meeting to get the OpenMP variants

[PATCH] D60907: [OpenMP] Add math functions support in OpenMP offloading

2019-04-30 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D60907#1484529 , @hfinkel wrote: > In D60907#1483660 , @jdoerfert wrote: > > > In D60907#1483615 , @hfinkel wrote: > > > > > In D60907#1479370

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. For the record, this is an implementation of the scheme proposed in https://reviews.llvm.org/D60907#1484756. There are drawbacks, see the TODO, but it will give most people a short term solution until we get OpenMP 5.0 variants. Finally, there is a remote chance this

[PATCH] D61399: [OpenMP][Clang] Support for target math functions

2019-05-01 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: lib/Headers/openmp_wrappers/__clang_openmp_math.h:29 + +#define __forceinline__ __attribute__((always_inline)) + I think this is a leftover we forgot to remove. Repository: rC Clang CHANGES SINCE LAST ACTION

  1   2   >