[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
@@ -3143,7 +3143,10 @@ as follows: specified, the default index size is equal to the pointer size. All sizes are in bits. The address space, ``n``, is optional, and if not specified, denotes the default address space 0. The value of ``n`` must be -in the range [

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From 015964e72ebc223bcd191ceb306de8fdbca360f3 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 17 Mar 2025 13:52:06 -0400 Subject: [PATCH] [DataLayout] Introduce sentinel pointer value MIME-Version: 1.0 C

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From efda127ecd06ea966df89425d10bd837c0cafe4e Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Mon, 17 Mar 2025 13:45:09 +0900 Subject: [PATCH] [DataLayout] Introduce sentinel pointer value MIME-Version: 1.

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From 053949d4dd8f28a2daa57a6143f0267c0bd3af6c Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Mon, 17 Mar 2025 13:45:09 +0900 Subject: [PATCH 1/2] [LoopVectorize] Add test for follow-up metadata for loops

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From 4b8a0c7dc3b9229f43643b2f2937e0607bc0a9c8 Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Mon, 17 Mar 2025 13:45:09 +0900 Subject: [PATCH 1/2] [LoopVectorize] Add test for follow-up metadata for loops

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
@@ -552,6 +553,11 @@ class DataLayout { /// /// This includes an explicitly requested alignment (if the global has one). Align getPreferredAlign(const GlobalVariable *GV) const; + + /// Returns the sentinel pointer value for a given address space. If the + /// address s

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
@@ -3143,7 +3143,10 @@ as follows: specified, the default index size is equal to the pointer size. All sizes are in bits. The address space, ``n``, is optional, and if not specified, denotes the default address space 0. The value of ``n`` must be -in the range [

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From bb54cbae9ce77de810736bfb1502e99fccf5a24a Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 16 Mar 2025 23:51:02 -0400 Subject: [PATCH 1/2] [DataLayout] Introduce sentinel pointer value MIME-Version: 1

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -13045,9 +13048,9 @@ This instruction requires several arguments: - Caller and callee both have the calling convention ``fastcc`` or ``tailcc``. - The call is in tail position (ret immediately follows call and ret uses value of call or is void). - - Option

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: This needs an RFC. For reference a previous attempt was at #83109 https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
@@ -32,9 +32,9 @@ static const char *const DataLayoutStringR600 = "-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"; static const char *const DataLayoutStringAMDGCN = -"e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32" -"-p7:160:25

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
shiltian wrote: > This needs an RFC. For reference a previous attempt was at #83109 The RFC was posted, as mentioned in a previous comment. https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -3143,7 +3143,10 @@ as follows: specified, the default index size is equal to the pointer size. All sizes are in bits. The address space, ``n``, is optional, and if not specified, denotes the default address space 0. The value of ``n`` must be -in the range [

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
@@ -552,6 +553,11 @@ class DataLayout { /// /// This includes an explicitly requested alignment (if the global has one). Align getPreferredAlign(const GlobalVariable *GV) const; + + /// Returns the sentinel pointer value for a given address space. If the + /// address s

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/131557 The value of a null pointer is not always `0`. For example, on AMDGPU, the null pointer in address spaces 3 and 5 is `0x`. Currently, there is no target-independent way to get this information, making it

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/131557 >From 86cd48c8f43b34d9fee97137db8abe6454d76268 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Sun, 16 Mar 2025 23:51:02 -0400 Subject: [PATCH] [DataLayout] Introduce sentinel pointer value MIME-Version: 1.0 C

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-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 4fde8c341f9166e6ec6dff6e7704be175e382f5b c966236e1ec99fbd45063e0363873c8d8abe4c50 --e

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
shiltian wrote: The RFC is posted https://discourse.llvm.org/t/rfc-introduce-sentinel-pointer-value-to-datalayout/85265. https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-ir Author: Shilei Tian (shiltian) Changes The value of a null pointer is not always `0`. For example, on AMDGPU, the null pointer in address spaces 3 and 5 is `0x`. Currently, there is no target-independent way to

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-16 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#131557** https://app.graphite.dev/github/pr/llvm/llvm-project/131557?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/131