[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia requested changes to this revision. Anastasia added a comment. This revision now requires changes to proceed. I feel that to progress further on this change, it would be good to get details about the use cases and the limitations first. However, if there is sufficient evidence of the n

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-18 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D124382#3496417 , @jchlanda wrote: > In D124382#3480600 , @Anastasia > wrote: > >> > > > >> And I think we could add this feature in a very light way for example by >> reserving th

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. My concerns have been addressed. I'll defer the final LGTM to @Anastasia. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124382/new/ https://reviews.llvm.org/D124382 ___ cfe-commits m

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-17 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added inline comments. Comment at: clang/include/clang/AST/Type.h:486 + bool IsSYCLOrOpenCL = false) { +if (ASMap) { + bool IsATargetAS = false; jchlanda wrote: > tra wrote: > > If A and B are both target AS

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-17 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda updated this revision to Diff 429956. jchlanda edited the summary of this revision. jchlanda added a reviewer: Anastasia. jchlanda added a comment. Herald added a subscriber: kosarev. Use helper functions when handling address space values. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-06 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/AST/Type.h:508 + static_cast(LangAS::FirstTargetAddressSpace)); +// When dealing with target AS return true if: +// * A is equal to B, or jchlanda wrote: > tra wrote: > > Is t

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added inline comments. Comment at: clang/include/clang/AST/Type.h:486 + bool IsSYCLOrOpenCL = false) { +if (ASMap) { + bool IsATargetAS = false; tra wrote: > If A and B are both target AS, we fall through to

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. In D124382#3480600 , @Anastasia wrote: > > And I think we could add this feature in a very light way for example by > reserving the numbers from the clang `LangAS` enum to be used with the > language address spaces in the p

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. @Anastasia @tra apologies for a late reply, I'm catching up with the thread after holidays. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124382/new/ https://reviews.llvm.org/D124382 _

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D124382#3479773 , @jchlanda wrote: > In D124382#3472888 , @Anastasia > wrote: > >> > > > >> Can you provide an example of where it could be useful? Note that I feel that >> such fun

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-28 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. In D124382#3472888 , @Anastasia wrote: > > Can you provide an example of where it could be useful? Note that I feel that > such functionality could be implemented on top of full implementation of > target specific address spa

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. You should be able to provide an address space of the pointer using the number, see details in: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/Builtins.def#L65 However if language address spaces are needed I wonder if the best approach is jus

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/AST/Type.h:486 + bool IsSYCLOrOpenCL = false) { +if (ASMap) { + bool IsATargetAS = false; If A and B are both target AS, we fall through to the code which is

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. @tra @Naghasan @t4c1 you might find it interesting, a follow up from the discussion here: https://reviews.llvm.org/D112718 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124382/new/ https://reviews.llvm.org/D124382 __

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda created this revision. Herald added subscribers: kerbowa, Anastasia, jvesely. Herald added a project: All. jchlanda requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use target's address space map to handle cases when both language a