[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-27 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH 1/3] Add interface for exposing a target's flat address space, if it

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH 1/3] Add interface for exposing a target's flat address space, if it

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/95728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: @jrtc27 @arsenm any additional comments? Are things more palatable in this form? Should this be turned into an RFC? Thanks. https://github.com/llvm/llvm-project/pull/95728 ___ cfe-commits mailing list cfe-commits@

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I mean, this is conceptually fine as far as it goes, but I'm not sure where we actually want to use it. As noted on the other PRs, llvm.used/llvm.global_ctors/llvm.global_dtors don't really want a flat address-space. The "address-space" for llvm.used, and for the "associ

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-28 Thread Matt Arsenault via cfe-commits
arsenm wrote: I still think we should not need this. DefaultIsPrivate is junk that needs to be deleted. Querying for LangAS::Default should always give the answer 0 for AMDGPU, which is what this is working around. This clang notion of address space has nothing to do with your troubles with l

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-07-02 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > I still think we should not need this. DefaultIsPrivate is junk that needs to > be deleted. Querying for LangAS::Default should always give the answer 0 for > AMDGPU, which is what this is working around. > > This clang notion of address space has nothing to do with your trou

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-07-02 Thread Matt Arsenault via cfe-commits
arsenm wrote: > LangAS::Default is not just determined by target. It also depends on > language. For OpenCL 1.2 it is private. I would have hoped this would be implemented by default assuming a hidden private addrspace qualifier https://github.com/llvm/llvm-project/pull/95728 __

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/95728 Often, targets which are not address space agnostic expose a flat/generic address space, which acts as a shared, legal target for address space casts. Whilst today we accidentally (e.g. by using `PointerType::ge

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes Often, targets which are not address space agnostic expose a flat/generic address space, which acts as a shared, legal target for address space casts. Whilst today we accidentally (e.g. by using `PointerType::

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/95728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-16 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 527e7328607ea0a55855e53a59c5030a7d07a554 2b500ad9ef2baf27da29146b5a4123dcb75e --

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH] Add interface for exposing a target's flat address space, if it exi

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Alex Voicu via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH 1/2] Add interface for exposing a target's flat address space, if it

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Matt Arsenault via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Jessica Clarke via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Alex Voicu via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-17 Thread Alex Voicu via cfe-commits
@@ -1764,6 +1764,13 @@ class TargetInfo : public TransferrableTargetInfo, return 0; } + /// \returns Target specific flat ptr address space; a flat ptr is a ptr that + /// can be casted to / from all other target address spaces. If the target + /// exposes no such add

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-19 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH 1/2] Add interface for exposing a target's flat address space, if it

[clang] [clang][CodeGen] Add query for a target's flat address space (PR #95728)

2024-06-19 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/95728 >From 2b500ad9ef2baf27da29146b5a4123dcb75e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 17 Jun 2024 02:15:00 +0100 Subject: [PATCH 1/3] Add interface for exposing a target's flat address space, if it