[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-17 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557733. AlexVlx added a comment. Simplify test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGStmt.cpp

[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-17 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155850#4654146 , @hnrklssn wrote: > `clang/test/CodeGenHipStdPar/unannotated-functions-get-emitted.cpp` is > failing: > https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/38041/testReport/junit/Clang/Code

[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-17 Thread Alex Voicu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdd5d65adb641: [HIP][Clang][CodeGen] Add CodeGen support for `hipstdpar` (authored by AlexVlx). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ htt

[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-15 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557712. AlexVlx edited the summary of this revision. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuilti

[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557673. AlexVlx added a comment. Use unmangled names in test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGe

[PATCH] D155850: [HIP][Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-10-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557672. AlexVlx removed reviewers: tra, jlebar. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-04 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155775#4652851 , @ro wrote: > In D155775#4652785 , @AlexVlx wrote: > >> In D155775#4652780 , @dyung wrote: >> >>> > > > >>> At this point, wo

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-03 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155775#4652780 , @dyung wrote: > In D155775#4652773 , @AlexVlx wrote: > >> In D155775#4652767 , @dyung wrote: >> >>> Hi @AlexVlx, the test you

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-03 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155775#4652767 , @dyung wrote: > Hi @AlexVlx, the test you added is failing on an linux bot, can you take a > look and revert if you need time to investigate? It appears it has been > failing for over 6 hours. > > https://la

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-03 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. https://reviews.llvm.org/rG0701ee69f7ac should fix it, once again apologies for the noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 ___

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-03 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155775#4652683 , @thakis wrote: > This seems to break tests on Mac and windows, see eg > http://45.33.8.238/macm1/70415/step_7.txt > > Please take a look and revert for now if it takes a while to fix. Whoops, thank you for f

[PATCH] D155833: [HIP][Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-10-03 Thread Alex Voicu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4d680f56475c: [HIP][Clang][Sema] Add Sema support for `hipstdpar` (authored by AlexVlx). Changed prior to commit: https://reviews.llvm.org/D155833

[PATCH] D155826: [HIP][Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload

2023-10-03 Thread Alex Voicu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc0f8748d448b: [HIP][Clang][Preprocessor] Add Preprocessor support for `hipstdpar` (authored by AlexVlx). Changed prior to commit: https://reviews.

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-03 Thread Alex Voicu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a408588d1b8: [HIP][Clang][Driver] Add Driver support for `hipstdpar` (authored by AlexVlx). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-29 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:340 + HasRocThrustLibrary = !HIPRocThrustPathArg.empty() && +D.getVFS().exists(HIPRocThrustPathArg + "/thrust"); + HIPRocPrimPathArg = MaskRay wrote: > Pre

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-29 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557492. AlexVlx marked 2 inline comments as done. AlexVlx added a comment. Remove noise, add missing stub folders needed by the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 Files: clang/include/

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-28 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. @MaskRay do you think there's anything else that needs adjusting? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-26 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557368. AlexVlx added a comment. Use double dash flags exclusively. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/HIPSupport.rst clang/docs/ReleaseNotes.rst Index: clang/docs/Relea

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-25 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557328. AlexVlx added a comment. Use double dash compiler flags only. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Basic

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-25 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/docs/HIPSupport.rst:266 + +- ``-hipstdpar`` / ``--hipstdpar`` enables algorithm offload, which depending on + phase, has the following effects: MaskRay wrote: > Newer long options that don't use the common prefix

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557071. AlexVlx added a comment. Use correct flag naming. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Basic/LangOptions

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 557057. AlexVlx marked an inline comment as done. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/HIPSupport.rst clang/docs/ReleaseNotes.rst Index: c

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-12 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx marked an inline comment as done. AlexVlx added inline comments. Comment at: clang/docs/HIPSupport.rst:216 + +Given the following C++ code, which assumes the ``std`` namespace is included: + keryell wrote: > Since this does not sounds like an official wor

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-12 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 556618. AlexVlx added a comment. Address review feedback around explicit use of `std::`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/HIPSupport.rst clang/docs/ReleaseNotes.rst In

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 556369. AlexVlx added a comment. Fix some wording to further clarify this is an HIP + AMDGPU exclusive extension. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/HIPSupport.rst clang/

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-09-01 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 555450. AlexVlx added a reviewer: JonChesterfield. AlexVlx added a comment. Correctly reflect AMDGPU-only nature of the extension. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/HIPSup

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-28 Thread Alex Voicu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9c760ca8ecfd: [Clang][CodeGen] `typeid` needs special care when `type_info` is not in theā€¦ (authored by AlexVlx). Repository: rG LLVM Github Monor

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 553800. AlexVlx added a comment. Add back clarification about RDC. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/HIPSupport.rst clang/docs/ReleaseNotes.rst Index: clang/docs/Releas

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 553799. AlexVlx edited reviewers, added: jhuber6; removed: tra, jdoerfert. AlexVlx added a comment. Herald added a reviewer: jdoerfert. Fix typo, add release notes reflecting the HIP-only nature. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/n

[PATCH] D155826: [HIP][Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload

2023-08-23 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552952. AlexVlx added a comment. Define the interpose macro iff in interpose mode. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155826/new/ https://reviews.llvm.org/D155826 Files: clang/lib/Frontend/InitPreprocessor.cpp clang/test/Preprocessor

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-23 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157452/new/ https://reviews.llvm.org/D157452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-23 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552763. AlexVlx added a comment. Remove noise. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/HIPSupport.rst Index: clang/docs/HIPSupport.rst =

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-23 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552754. AlexVlx added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a reviewer: kiranchandramohan. Herald added a project: LLVM. Update per review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-08-23 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552738. AlexVlx added a comment. Use `--hipstdpar` instead of `-hipstdpar` in the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/i

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-22 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552575. AlexVlx edited the summary of this revision. AlexVlx added a comment. Updating to reflect the outcome of the RFC, which is that this will be added as a HIP extension exclusively. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ htt

[PATCH] D155833: [HIP][Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-08-22 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552568. AlexVlx retitled this revision from "[Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload" to "[HIP][Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload". AlexVlx added a comment. Updating this to reflect the outco

[PATCH] D155826: [HIP][Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload

2023-08-22 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552561. AlexVlx retitled this revision from "[Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload" to "[HIP][Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload". AlexVlx added a comment. U

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-08-22 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552556. AlexVlx retitled this revision from "[Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload" to "[HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload". AlexVlx added a comment. Updating this to reflect t

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-22 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 552550. AlexVlx marked an inline comment as done. AlexVlx retitled this revision from "[Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload" to "[HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload". AlexVlx removed

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-15 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 550516. AlexVlx added a comment. Remove unneeded cast, the dynamic case already emitted a generic pointer to `typeinfo` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157452/new/ https://reviews.llvm.org/D157452 Files: clang/lib/CodeGen/CGExprCXX

[PATCH] D155833: [Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-08-15 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 550391. AlexVlx added a comment. Update test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155833/new/ https://reviews.llvm.org/D155833 Files: clang/lib/Sema/SemaCUDA.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaStmtAsm.cpp clang/tes

[PATCH] D157917: clang/HIP: Use abs builtins instead of implementing them

2023-08-15 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx accepted this revision. AlexVlx added a comment. This revision is now accepted and ready to land. LGTM, thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157917/new/ https://reviews.llvm.org/D157917 ___ cfe-commits mailing list cf

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-15 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:5237-5238 + + if (VTy->isPointerTy() && + VTy->getPointerAddressSpace() != IRTy->getPointerAddressSpace()) { +// In the case of targets that use a non-default address space

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-15 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D157452#4586554 , @rjmccall wrote: > The path of least resistance here is that IRGen should just insert > conversions from the global AS to the default AS as part of evaluating > `typeid`. I haven't looked at it closely, but

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-15 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 550311. AlexVlx added a comment. Rework the patch as the proposed approach was unsound; keep `typeid` generic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157452/new/ https://reviews.llvm.org/D157452 Files: clang/lib/CodeGen/CGExprCXX.cpp cla

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 549159. AlexVlx added a comment. Switch to `__ASM` prefix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/C

[PATCH] D155833: [Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-08-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 549117. AlexVlx added a comment. Fix typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155833/new/ https://reviews.llvm.org/D155833 Files: clang/lib/Sema/SemaCUDA.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaStmtAsm.cpp clang/test/S

[PATCH] D155833: [Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-08-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 549113. AlexVlx removed a reviewer: jdoerfert. AlexVlx added a comment. Remove noise / unintended file. Add support for dealing with unsupported ASM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155833/new/ https://reviews.llvm.org/D155833 Files:

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 549101. AlexVlx added a comment. Fix typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGStmt.cpp clan

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-10 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 549097. AlexVlx added a comment. Add support for handling certain cases of unambiguously accelerator unsupported ASM i.e. cases where constraints are clearly mismatched. When that happens, we instead emit an `ASM__stdpar_unsupported` stub which takes as its

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-09 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D157452#4573076 , @yaxunl wrote: > It is a little concerning how far the global address will spread further. > Compared to handling user-defined global variables, we keep the global > address to its definition in the IR and a

[PATCH] D157452: [RFC][Clang][Codegen] `std::type_info` needs special care with explicit address spaces

2023-08-08 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: rjmccall, efriedma, yaxunl, arsenm. AlexVlx added a project: clang. Herald added a project: All. AlexVlx requested review of this revision. Herald added subscribers: cfe-commits, wdng. After https://reviews.llvm.org/D153092, for targets that

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-08 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155850#4570336 , @efriedma wrote: > LGTM (but please don't merge until we reach consensus on the overall feature) Of course, and thank you for the review. Please, do stick around if you don't mind, because this'll still get

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-07 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 548022. AlexVlx added a comment. Extend handling of unsupported builtins to include dealing with the `target` attribute. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendU

[PATCH] D155769: [Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-06 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx marked an inline comment as done. AlexVlx added inline comments. Comment at: clang/docs/StdParSupport.rst:366-367 + + Note that this is a temporary, unsafe workaround for a deficiency in the C++ + Standard. + keryell wrote: > Another way could be to h

[PATCH] D155769: [Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-06 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 547572. AlexVlx added a comment. Remove confusing guidance around mGPU. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155769/new/ https://reviews.llvm.org/D155769 Files: clang/docs/StdParSupport.rst clang/docs/index.rst Index: clang/docs/index

[PATCH] D155775: [Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-08-06 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 547570. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Basic/LangOptions.def clang/include/clang/Driver/Options.td clang

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-03 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 547024. AlexVlx added a comment. Remove noise, correct style. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155850/new/ https://reviews.llvm.org/D155850 Files: clang/lib/CodeGen/BackendUtil.cpp clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGe

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-08-03 Thread Alex Voicu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7240008c0afa: [Clang][CodeGen] `__dynamic_cast` should care about `type_info`'s address space (authored by AlexVlx). Repository: rG LLVM Github Mo

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-08-03 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 546911. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155870/new/ https://reviews.llvm.org/D155870 Files: clang/lib/CodeGen/ItaniumCXXABI.cpp clang/test/CodeGenCXX/dynamic-cast-address-space.cpp Index: clang/t

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-08-02 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5315 + !GV->isThreadLocal() && + !(getLangOpts().HIPStdPar && getLangOpts().CUDAIsDevice)) { if (D->getTLSKind() == VarDecl::TLS_Dynamic) efriedma wrote: > You can't jus

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-08-01 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155870/new/ https://reviews.llvm.org/D155870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-08-01 Thread Alex Voicu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. AlexVlx marked an inline comment as done. Closed by commit rG51a014cb2d9c: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces (authored by AlexVlx).

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-31 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx marked an inline comment as done. AlexVlx added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3542 +LangAS AAS = getASTAllocaAddressSpace(); +LangAS EAS = E->getType().getAddressSpace(); +if (AAS != EAS) { rjmccall wrote: > `E->

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-31 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 545882. AlexVlx added a comment. Use pointee's address space for the check. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156539/new/ https://reviews.llvm.org/D156539 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/dynamic-alloca-with

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-31 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 545860. AlexVlx added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156539/new/ https://reviews.llvm.org/D156539 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/dynamic-alloca-with-address-space.c

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-31 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D156539#4547814 , @rjmccall wrote: > In D156539#4546834 , @AlexVlx wrote: > >> In D156539#4542836 , @rjmccall >> wrote: >> >>> We should proba

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-31 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/test/CodeGen/dynamic-alloca-with-address-space.c:1 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -emit-llvm %s -o - | FileCheck %s + arsenm wrote: > Can you add an opencl 1.2 and 2.0 run line too This is not valid

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-31 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 545679. AlexVlx added a reviewer: arsenm. AlexVlx added a comment. Herald added a subscriber: wdng. Incorporated review feedback. Updated test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156539/new/ https://reviews.llvm.org/D156539 Files: clan

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-31 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D156539#4542836 , @rjmccall wrote: > We should probably write this code to work properly in case we add a target > that makes `__builtin_alloca` return a pointer in the private address space. > Could you recover the target A

[PATCH] D156539: [Clang][CodeGen] `__builtin_alloca`s should care about address spaces too

2023-07-28 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: rjmccall, yaxunl. AlexVlx added a project: clang. Herald added a subscriber: arichardson. Herald added a project: All. AlexVlx requested review of this revision. Herald added a subscriber: cfe-commits. `alloca` instructions always return poin

[PATCH] D155775: [Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-07-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 544974. AlexVlx added a comment. Exploit the fact that ROCm/AMDGPU does LTCG at the moment and for the foreseeable future by moving the accelerator code selection pass to later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://revi

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 544954. AlexVlx removed a reviewer: eli.friedman. AlexVlx added a comment. This adds more ecumenical handling of unsupported builtins, as per the review discussion (a suffixed equivalent stub is emitted instead); it's paired with an associated change in acce

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Ping @rjmccall or @efriedma for a non AMD perspective, if possible. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155870/new/ https://reviews.llvm.org/D155870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-26 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D155870#4535425 , @yaxunl wrote: > `__dynamic_cast` is part of standard C++ library. If we ever implement it for > GPU, chances are we will use libc++abi with the same signature as other > targets, i.e., the 2nd and 3rd argum

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-26 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Gentle ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155870/new/ https://reviews.llvm.org/D155870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-26 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 544324. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155870/new/ https://reviews.llvm.org/D155870 Files: clang/lib/CodeGen/ItaniumCXXABI.cpp clang/test/CodeGenCXX/dynamic-cast-address-space.cpp Index: clang/t

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-21 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. @yaxunl interesting point - are you worried about cases where due to missing inlining / const prop an indirect call site that can be replaced with a direct one would remain indirect? I think the problem in that case would actually be different, in that possibly reachabl

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-21 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5542 + if (!getLangOpts().HIPStdPar) +ErrorUnsupported(E, "builtin function"); efriedma wrote: > AlexVlx wrote: > > efriedma wrote: > > > This doesn't make sense; we can't just igno

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5542 + if (!getLangOpts().HIPStdPar) +ErrorUnsupported(E, "builtin function"); efriedma wrote: > This doesn't make sense; we can't just ignore bits of the source code. I > guess t

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: rjmccall, efriedma, yaxunl. AlexVlx added a project: clang. Herald added a subscriber: arichardson. Herald added a project: All. AlexVlx requested review of this revision. Herald added a subscriber: cfe-commits. Turns out that in https://rev

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: yaxunl, rjmccall, eli.friedman, arsenm, tra, jlebar. AlexVlx added a project: clang. Herald added a subscriber: ormris. Herald added a project: All. AlexVlx requested review of this revision. Herald added subscribers: cfe-commits, wdng. This

[PATCH] D155833: [Clang][Sema][RFC] Add Sema support for C++ Parallel Algorithm Offload

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: yaxunl, jlebar, tra. AlexVlx added a project: clang. Herald added subscribers: ChuanqiXu, s.egerton, simoncook, asb, dschuff. Herald added a project: All. AlexVlx requested review of this revision. Herald added subscribers: cfe-commits, wangpc

[PATCH] D155826: [Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload

2023-07-20 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: yaxunl, arsenm. AlexVlx added a project: clang. Herald added a project: All. AlexVlx requested review of this revision. Herald added subscribers: cfe-commits, wdng. This patch adds the Driver changes needed by the standard algorithm offload

[PATCH] D155775: [Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 542287. AlexVlx added a comment. Removed some accidental noise. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/include/clang/Basic/LangO

[PATCH] D155775: [Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: jansvoboda11, arsenm, yaxunl, MaskRay. AlexVlx added a project: clang. Herald added subscribers: cmtice, kerbowa, ormris, hiraditya, tpr, jvesely. Herald added a reviewer: jhenderson. Herald added a project: All. AlexVlx requested review of th

[PATCH] D155769: [Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: rjmccall, yaxunl, aaron.ballman. AlexVlx added a project: clang. Herald added a subscriber: arphaman. Herald added a project: All. AlexVlx requested review of this revision. Herald added a subscriber: cfe-commits. This patch adds the document

[PATCH] D155759: [Clang][CodeGen] Follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf385abf131e0: [Clang][CodeGen] Follow-up for `vtable`, `typeinfo` et al. are globals (authored by AlexVlx). Repository: rG LLVM Github Monorepo C

[PATCH] D155759: [Clang][CodeGen] Follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx created this revision. AlexVlx added reviewers: yaxunl, efriedma, rjmccall. Herald added a project: All. AlexVlx requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Unfortunately, https://reviews.llvm.org/rG8acdcf4016876d122733991561be

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added inline comments. Comment at: clang/lib/CodeGen/CGVTables.cpp:836 +fnPtr = +llvm::ConstantExpr::getAddrSpaceCast(fnPtr, CGM.GlobalsInt8PtrTy); + return builder.add(fnPtr); efriedma wrote: > If I follow correctly, the fnPtr is

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8acdcf401687: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals (authored by AlexVlx). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-07-19 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 542086. AlexVlx added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 Files: clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGen/CGVTables.cpp clang/lib/CodeGen/CodeGenModule.cpp clang

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-07-13 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-07-09 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 538437. AlexVlx added a comment. Herald added a subscriber: wangpc. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 Files: clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGen/CGVTables.cpp clang/li

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-06-30 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. Thank you @yaxunl. @rjmccall / @efriedma any input on this? I'd like to try landing it next week to unblock some additional work. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 __

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-06-27 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D153092#4452070 , @yaxunl wrote: > This could be a good chance to switch VT to constant address space instead of > global address space. AFAIK if a target has global addr space they usually > also has constant addr space sinc

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-06-26 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx added a comment. In D153092#4448514 , @yaxunl wrote: > In D153092#4447445 , @AlexVlx wrote: > >> Fixed issue found via internal testing (thanks @yaxunl). > > Can we add a test to cover the regression found

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-06-26 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 534670. AlexVlx added a comment. Add missing test for `vtable` initializers on the `__device__` side. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 Files: clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGe

[PATCH] D153092: [Clang][CodeGen]`vtable`, `typeinfo` et al. are globals

2023-06-25 Thread Alex Voicu via Phabricator via cfe-commits
AlexVlx updated this revision to Diff 534380. AlexVlx added a comment. Fixed issue found via internal testing (thanks @yaxunl). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153092/new/ https://reviews.llvm.org/D153092 Files: clang/lib/CodeGen/CGVTT.cpp clang/lib/CodeGen/CGVTables.

  1   2   >