[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-21 Thread via cfe-commits

https://github.com/heiher milestoned 
https://github.com/llvm/llvm-project/pull/78664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-21 Thread via cfe-commits

https://github.com/heiher updated 
https://github.com/llvm/llvm-project/pull/78664

>From 6518459e4d9ae558762947ca0ae6510b5b3d928e Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 19 Jan 2024 11:13:39 +0800
Subject: [PATCH 1/3] [docs] Add llvm and clang release notes for the
 global-var code model attribute

---
 clang/docs/ReleaseNotes.rst | 8 
 llvm/docs/ReleaseNotes.rst  | 4 
 2 files changed, 12 insertions(+)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 8bb26fcae18d6b..a2f1fee02804bb 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1156,6 +1156,14 @@ Windows Support
 
 LoongArch Support
 ^
+- Added a code model attribute for the global variable. The following values
+  are supported: ``normal``, ``medium`` and ``extreme``.
+
+  *Example Code*:
+
+  .. code-block:: c
+
+ int var __attribute((model("extreme")));
 
 RISC-V Support
 ^^
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 82cf130ffd1866..ae4dc8638c67ae 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -70,6 +70,8 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
+* Added a code model attribute for the global variable.
+
 Changes to LLVM infrastructure
 --
 
@@ -130,6 +132,8 @@ Changes to the Hexagon Backend
 
 Changes to the LoongArch Backend
 
+* Respect the code model attribute of global variables when different from
+  their default values.
 
 Changes to the MIPS Backend
 ---

>From 71dde1d83c19683b353d874482051d8d1877b97b Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 19 Jan 2024 13:56:46 +0800
Subject: [PATCH 2/3] Address  arsenm's comments

---
 llvm/docs/ReleaseNotes.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index ae4dc8638c67ae..ecf270b07f3630 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -70,7 +70,7 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
-* Added a code model attribute for the global variable.
+* Added a code model attribute for the `global variable 
`_.
 
 Changes to LLVM infrastructure
 --

>From fc7d5b4b277df7abe3e73a02f6ac10e5868b8e1e Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 19 Jan 2024 22:56:57 +0800
Subject: [PATCH 3/3] Address xen0n's comments

---
 clang/docs/ReleaseNotes.rst | 5 +++--
 llvm/docs/ReleaseNotes.rst  | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index a2f1fee02804bb..d938e4a4bda233 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1156,8 +1156,9 @@ Windows Support
 
 LoongArch Support
 ^
-- Added a code model attribute for the global variable. The following values
-  are supported: ``normal``, ``medium`` and ``extreme``.
+- The ``model`` attribute is now supported for overriding the default code
+  model used to access global variables. The following values are supported:
+  ``normal``, ``medium`` and ``extreme``.
 
   *Example Code*:
 
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index ecf270b07f3630..c17c834c8081b8 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -70,7 +70,7 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
-* Added a code model attribute for the `global variable 
`_.
+* Added a ``code_model`` attribute for the `global variable 
`_.
 
 Changes to LLVM infrastructure
 --
@@ -132,8 +132,8 @@ Changes to the Hexagon Backend
 
 Changes to the LoongArch Backend
 
-* Respect the code model attribute of global variables when different from
-  their default values.
+* The code model of global variables can now be overridden by means of
+  the newly added LLVM IR attribute, ``code_model``.
 
 Changes to the MIPS Backend
 ---

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-19 Thread WÁNG Xuěruì via cfe-commits


@@ -1119,6 +1119,14 @@ Windows Support
 
 LoongArch Support
 ^
+- Added a code model attribute for the global variable. The following values

xen0n wrote:

"The `model` attribute is now supported for overriding the default code model 
used to access global variables." or something like that?

https://github.com/llvm/llvm-project/pull/78664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-18 Thread via cfe-commits


@@ -70,6 +70,8 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
+* Added a code model attribute for the global variable.

heiher wrote:

Thanks

https://github.com/llvm/llvm-project/pull/78664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-18 Thread via cfe-commits

https://github.com/heiher updated 
https://github.com/llvm/llvm-project/pull/78664

>From ccb95a2f40e94ab773dd8897dd287dba7a38 Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 19 Jan 2024 11:13:39 +0800
Subject: [PATCH 1/2] [docs] Add llvm and clang release notes for the
 global-var code model attribute

---
 clang/docs/ReleaseNotes.rst | 8 
 llvm/docs/ReleaseNotes.rst  | 4 
 2 files changed, 12 insertions(+)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index b400d75095421c..25f9f9577834b3 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1119,6 +1119,14 @@ Windows Support
 
 LoongArch Support
 ^
+- Added a code model attribute for the global variable. The following values
+  are supported: ``normal``, ``medium`` and ``extreme``.
+
+  *Example Code*:
+
+  .. code-block:: c
+
+ int var __attribute((model("extreme")));
 
 RISC-V Support
 ^^
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 4345d01021f17d..e45744ffb02f6d 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -70,6 +70,8 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
+* Added a code model attribute for the global variable.
+
 Changes to LLVM infrastructure
 --
 
@@ -130,6 +132,8 @@ Changes to the Hexagon Backend
 
 Changes to the LoongArch Backend
 
+* Respect the code model attribute of global variables when different from
+  their default values.
 
 Changes to the MIPS Backend
 ---

>From 0be24bbb1959261d9ea40373bd947e5802532ede Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 19 Jan 2024 13:56:46 +0800
Subject: [PATCH 2/2] Address  arsenm's comments

---
 llvm/docs/ReleaseNotes.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index e45744ffb02f6d..9cf951e9079765 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -70,7 +70,7 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
-* Added a code model attribute for the global variable.
+* Added a code model attribute for the `global variable 
`_.
 
 Changes to LLVM infrastructure
 --

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-18 Thread Matt Arsenault via cfe-commits


@@ -70,6 +70,8 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
+* Added a code model attribute for the global variable.

arsenm wrote:

Helpful to include link to the LangRef reference 

https://github.com/llvm/llvm-project/pull/78664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-18 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: hev (heiher)


Changes



---
Full diff: https://github.com/llvm/llvm-project/pull/78664.diff


2 Files Affected:

- (modified) clang/docs/ReleaseNotes.rst (+8) 
- (modified) llvm/docs/ReleaseNotes.rst (+4) 


``diff
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index b400d75095421c..25f9f9577834b3 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1119,6 +1119,14 @@ Windows Support
 
 LoongArch Support
 ^
+- Added a code model attribute for the global variable. The following values
+  are supported: ``normal``, ``medium`` and ``extreme``.
+
+  *Example Code*:
+
+  .. code-block:: c
+
+ int var __attribute((model("extreme")));
 
 RISC-V Support
 ^^
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 4345d01021f17d..e45744ffb02f6d 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -70,6 +70,8 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
+* Added a code model attribute for the global variable.
+
 Changes to LLVM infrastructure
 --
 
@@ -130,6 +132,8 @@ Changes to the Hexagon Backend
 
 Changes to the LoongArch Backend
 
+* Respect the code model attribute of global variables when different from
+  their default values.
 
 Changes to the MIPS Backend
 ---

``




https://github.com/llvm/llvm-project/pull/78664
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [docs] Add llvm and clang release notes for the global-var code model attribute (PR #78664)

2024-01-18 Thread via cfe-commits

https://github.com/heiher created 
https://github.com/llvm/llvm-project/pull/78664

None

>From ccb95a2f40e94ab773dd8897dd287dba7a38 Mon Sep 17 00:00:00 2001
From: WANG Rui 
Date: Fri, 19 Jan 2024 11:13:39 +0800
Subject: [PATCH] [docs] Add llvm and clang release notes for the global-var
 code model attribute

---
 clang/docs/ReleaseNotes.rst | 8 
 llvm/docs/ReleaseNotes.rst  | 4 
 2 files changed, 12 insertions(+)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index b400d75095421c7..25f9f9577834b3f 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1119,6 +1119,14 @@ Windows Support
 
 LoongArch Support
 ^
+- Added a code model attribute for the global variable. The following values
+  are supported: ``normal``, ``medium`` and ``extreme``.
+
+  *Example Code*:
+
+  .. code-block:: c
+
+ int var __attribute((model("extreme")));
 
 RISC-V Support
 ^^
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 4345d01021f17da..e45744ffb02f6d4 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -70,6 +70,8 @@ Changes to the LLVM IR
 
 * Added `llvm.exp10` intrinsic.
 
+* Added a code model attribute for the global variable.
+
 Changes to LLVM infrastructure
 --
 
@@ -130,6 +132,8 @@ Changes to the Hexagon Backend
 
 Changes to the LoongArch Backend
 
+* Respect the code model attribute of global variables when different from
+  their default values.
 
 Changes to the MIPS Backend
 ---

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits