[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fixes (|multi)_set spaceship operator. (#127326) (PR #127342)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/127342

Backport 248716f814d1d1fef88911d01a0b551d53c87c7a

Requested by: @mordante

>From 286f33ed20e4e7964dfa7d2988dd6234ad63dd7e Mon Sep 17 00:00:00 2001
From: Mark de Wever 
Date: Sat, 15 Feb 2025 20:15:32 +0100
Subject: [PATCH] [libc++] Fixes (|multi)_set spaceship operator. (#127326)

The operators did not have a _Compare template arguement. The fix
updates the generic container test to use allocators for all types used.
No other issues were found.

Fixes: #127095
(cherry picked from commit 248716f814d1d1fef88911d01a0b551d53c87c7a)
---
 libcxx/include/set|   8 +-
 .../test/support/test_container_comparisons.h | 266 +++---
 2 files changed, 168 insertions(+), 106 deletions(-)

diff --git a/libcxx/include/set b/libcxx/include/set
index 2784e82760d7e..3c6ea360bd06c 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -1003,9 +1003,9 @@ operator<=(const set<_Key, _Compare, _Allocator>& __x, 
const set<_Key, _Compare,
 
 #  else // _LIBCPP_STD_VER <= 17
 
-template 
+template 
 _LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Key>
-operator<=>(const set<_Key, _Allocator>& __x, const set<_Key, _Allocator>& 
__y) {
+operator<=>(const set<_Key, _Compare, _Allocator>& __x, const set<_Key, 
_Compare, _Allocator>& __y) {
   return std::lexicographical_compare_three_way(__x.begin(), __x.end(), 
__y.begin(), __y.end(), std::__synth_three_way);
 }
 
@@ -1470,9 +1470,9 @@ operator<=(const multiset<_Key, _Compare, _Allocator>& 
__x, const multiset<_Key,
 
 #  else // _LIBCPP_STD_VER <= 17
 
-template 
+template 
 _LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Key>
-operator<=>(const multiset<_Key, _Allocator>& __x, const multiset<_Key, 
_Allocator>& __y) {
+operator<=>(const multiset<_Key, _Compare, _Allocator>& __x, const 
multiset<_Key, _Compare, _Allocator>& __y) {
   return std::lexicographical_compare_three_way(__x.begin(), __x.end(), 
__y.begin(), __y.end(), __synth_three_way);
 }
 
diff --git a/libcxx/test/support/test_container_comparisons.h 
b/libcxx/test/support/test_container_comparisons.h
index 543c5899922d0..f7bf78e48a1f8 100644
--- a/libcxx/test/support/test_container_comparisons.h
+++ b/libcxx/test/support/test_container_comparisons.h
@@ -13,51 +13,52 @@
 #include 
 #include 
 
+#include "test_allocator.h"
 #include "test_comparisons.h"
 
 // Implementation detail of `test_sequence_container_spaceship`
-template  typename Container, typename Elem, typename 
Order>
+template  typename Container, typename Elem, typename 
Allocator, typename Order>
 constexpr void test_sequence_container_spaceship_with_type() {
   // Empty containers
   {
-Container l1;
-Container l2;
+Container l1;
+Container l2;
 assert(testOrder(l1, l2, Order::equivalent));
   }
   // Identical contents
   {
-Container l1{1, 1};
-Container l2{1, 1};
+Container l1{1, 1};
+Container l2{1, 1};
 assert(testOrder(l1, l2, Order::equivalent));
   }
   // Less, due to contained values
   {
-Container l1{1, 1};
-Container l2{1, 2};
+Container l1{1, 1};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::less));
   }
   // Greater, due to contained values
   {
-Container l1{1, 3};
-Container l2{1, 2};
+Container l1{1, 3};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::greater));
   }
   // Shorter list
   {
-Container l1{1};
-Container l2{1, 2};
+Container l1{1};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::less));
   }
   // Longer list
   {
-Container l1{1, 2};
-Container l2{1};
+Container l1{1, 2};
+Container l2{1};
 assert(testOrder(l1, l2, Order::greater));
   }
   // Unordered
   if constexpr (std::is_same_v) {
-Container l1{1, std::numeric_limits::min()};
-Container l2{1, 2};
+Container l1{1, std::numeric_limits::min()};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::unordered));
   }
 }
@@ -69,13 +70,22 @@ constexpr bool test_sequence_container_spaceship() {
   static_assert(std::three_way_comparable>);
 
   // Test different comparison categories
-  test_sequence_container_spaceship_with_type();
-  test_sequence_container_spaceship_with_type();
-  test_sequence_container_spaceship_with_type();
-  test_sequence_container_spaceship_with_type();
+  test_sequence_container_spaceship_with_type, std::strong_ordering>();
+  test_sequence_container_spaceship_with_type,
+  std::strong_ordering>();
+  test_sequence_container_spaceship_with_type, std::weak_ordering>();
+  test_sequence_container_spaceship_with_type,
+  std::partial_ordering>();
 
   // `LessAndEqComp` does not have `operator<=>`. Ordering is synthesized 
based on `operator<`
-  test_sequence_container_spaceship_with_type();
+  test_sequence_container_spaceship_with_type,
+ 

[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fixes (|multi)_set spaceship operator. (#127326) (PR #127342)

2025-02-15 Thread via llvm-branch-commits

llvmbot wrote:

@frederick-vs-ja What do you think about merging this PR to the release branch?

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


[llvm-branch-commits] [llvm] release/20.x: [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly (#125186) (PR #125210)

2025-02-15 Thread Nikita Popov via llvm-branch-commits

https://github.com/nikic approved this pull request.


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


[llvm-branch-commits] [llvm] release/20.x: [NFC] [clang] fixed unused variable warning (PR #126831)

2025-02-15 Thread via llvm-branch-commits

github-actions[bot] wrote:

@lhames (or anyone else). If you would like to add a note about this fix in the 
release notes (completely optional). Please reply to this comment with a one or 
two sentence description of the fix.  When you are done, please add the 
release:note label to this PR. 

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


[llvm-branch-commits] [llvm] release/20.x: [ORC] Switch to singleton pattern for UnwindInfoManager. (#126691) (PR #126825)

2025-02-15 Thread Lang Hames via llvm-branch-commits

lhames wrote:

@tstellar Apologies -- this was superseded by 
https://github.com/llvm/llvm-project/pull/126831. I thought that that one had 
been merged already, but it has not been. Are you able to take a look?

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


[llvm-branch-commits] [llvm] release/20.x: [ORC] Switch to singleton pattern for UnwindInfoManager. (#126691) (PR #126825)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

tstellar wrote:

> @tstellar Apologies -- this was superseded by #126831. I thought that that 
> one had been merged already, but it has not been. Are you able to take a look?

Sure.

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


[llvm-branch-commits] [llvm] 4fa5987 - [ORC] Switch to singleton pattern for UnwindInfoManager. (#126691)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

Author: Lang Hames
Date: 2025-02-15T18:22:13-08:00
New Revision: 4fa59872f61b2c01abeac85e49a4a46e828fae9c

URL: 
https://github.com/llvm/llvm-project/commit/4fa59872f61b2c01abeac85e49a4a46e828fae9c
DIFF: 
https://github.com/llvm/llvm-project/commit/4fa59872f61b2c01abeac85e49a4a46e828fae9c.diff

LOG: [ORC] Switch to singleton pattern for UnwindInfoManager. (#126691)

The find-dynamic-unwind-info callback registration APIs in libunwind
limit the number of callbacks that can be registered. If we use multiple
UnwindInfoManager instances, each with their own own callback function
(as was the case prior to this patch) we can quickly exceed this limit
(see https://github.com/llvm/llvm-project/issues/126611).

This patch updates the UnwindInfoManager class to use a singleton
pattern, with the single instance shared between all LLVM JITs in the
process.

This change does _not_ apply to compact unwind info registered through
the ORC runtime (which currently installs its own callbacks).

As a bonus this change eliminates the need to load an IR "bouncer"
module to supply the unique callback for each instance, so support for
compact-unwind can be extended to the llvm-jitlink tools (which does not
support adding IR).

(cherry picked from commit 84fe1f63b02414085bf7a8434caaf4a358be86da)

Added: 


Modified: 
llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
llvm/include/llvm/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.h
llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
llvm/lib/ExecutionEngine/Orc/Shared/OrcRTBridge.cpp
llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
llvm/lib/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.cpp
llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp

Removed: 




diff  --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h 
b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
index db5ff135a7164..0f59edd429332 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
@@ -90,10 +90,6 @@ using SPSRunAsIntFunctionSignature = 
int32_t(shared::SPSExecutorAddr, int32_t);
 } // end namespace rt
 
 namespace rt_alt {
-extern const char *UnwindInfoManagerInstanceName;
-extern const char *UnwindInfoManagerFindSectionsHelperName;
-extern const char *UnwindInfoManagerEnableWrapperName;
-extern const char *UnwindInfoManagerDisableWrapperName;
 extern const char *UnwindInfoManagerRegisterActionName;
 extern const char *UnwindInfoManagerDeregisterActionName;
 } // end namespace rt_alt

diff  --git 
a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h 
b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
index fc7719f282122..847c340eff17d 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
@@ -15,14 +15,13 @@
 #define LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_UNWINDINFOMANAGER_H
 
 #include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
-#include "llvm/ExecutionEngine/Orc/TargetProcess/ExecutorBootstrapService.h"
 #include "llvm/Support/Error.h"
 #include 
 #include 
 
 namespace llvm::orc {
 
-class UnwindInfoManager : public ExecutorBootstrapService {
+class UnwindInfoManager {
 public:
   // This struct's layout should match the unw_dynamic_unwind_sections struct
   // from libunwind/src/libunwid_ext.h.
@@ -34,43 +33,40 @@ class UnwindInfoManager : public ExecutorBootstrapService {
 size_t compact_unwind_section_length;
   };
 
+  UnwindInfoManager(UnwindInfoManager &&) = delete;
+  UnwindInfoManager &operator=(UnwindInfoManager &&) = delete;
+  ~UnwindInfoManager();
+
   /// If the libunwind find-dynamic-unwind-info callback registration APIs are
-  /// available then this method will return an UnwindInfoManager instance,
-  /// otherwise it will return nullptr.
-  static std::unique_ptr TryCreate();
+  /// available then this method will instantiate a global UnwindInfoManager
+  /// instance suitable for the process and return true. Otherwise it will
+  /// return false.
+  static bool TryEnable();
 
-  Error shutdown() override;
-  void addBootstrapSymbols(StringMap &M) override;
+  static void addBootstrapSymbols(StringMap &M);
 
-  Error enable(void *FindDynamicUnwindSections);
-  Error disable(void);
+  static Error registerSections(ArrayRef CodeRanges,
+orc::ExecutorAddr DSOBase,
+orc::ExecutorAddrRange DWARFEHFrame,
+orc::ExecutorAddrRange CompactUnwind);
 
-  Error registerSections(ArrayRef CodeRanges,
-

[llvm-branch-commits] [llvm] d135ed0 - [NFC] [clang] fixed unused variable warning

2025-02-15 Thread Tom Stellard via llvm-branch-commits

Author: Florian Mayer
Date: 2025-02-15T18:22:13-08:00
New Revision: d135ed0e3166ea306fefcd52d9bf0e2517d06521

URL: 
https://github.com/llvm/llvm-project/commit/d135ed0e3166ea306fefcd52d9bf0e2517d06521
DIFF: 
https://github.com/llvm/llvm-project/commit/d135ed0e3166ea306fefcd52d9bf0e2517d06521.diff

LOG: [NFC] [clang] fixed unused variable warning

(cherry picked from commit 9f61a60c777465c8a1bb67f80560a9e3b4d0f05b)

Added: 


Modified: 
llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp

Removed: 




diff  --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp 
b/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
index d67cbb807f2cd..c0807115c8398 100644
--- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
@@ -51,7 +51,7 @@ llvm_orc_rt_alt_UnwindInfoManager_deregister(const char 
*Data, uint64_t Size) {
 namespace llvm::orc {
 
 static const char *AddFnName = "__unw_add_find_dynamic_unwind_sections";
-static const char *RemoveFnName = "__unw_remove_find_dynamic_unwind_sections";
+[[maybe_unused]] static const char *RemoveFnName = 
"__unw_remove_find_dynamic_unwind_sections";
 static std::unique_ptr Instance;
 static int (*RemoveFindDynamicUnwindSections)(void *) = nullptr;
 



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


[llvm-branch-commits] [llvm] release/20.x: [NFC] [clang] fixed unused variable warning (PR #126831)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot updated 
https://github.com/llvm/llvm-project/pull/126831

>From 4fa59872f61b2c01abeac85e49a4a46e828fae9c Mon Sep 17 00:00:00 2001
From: Lang Hames 
Date: Wed, 12 Feb 2025 10:00:10 +1100
Subject: [PATCH 1/2] [ORC] Switch to singleton pattern for UnwindInfoManager.
 (#126691)

The find-dynamic-unwind-info callback registration APIs in libunwind
limit the number of callbacks that can be registered. If we use multiple
UnwindInfoManager instances, each with their own own callback function
(as was the case prior to this patch) we can quickly exceed this limit
(see https://github.com/llvm/llvm-project/issues/126611).

This patch updates the UnwindInfoManager class to use a singleton
pattern, with the single instance shared between all LLVM JITs in the
process.

This change does _not_ apply to compact unwind info registered through
the ORC runtime (which currently installs its own callbacks).

As a bonus this change eliminates the need to load an IR "bouncer"
module to supply the unique callback for each instance, so support for
compact-unwind can be extended to the llvm-jitlink tools (which does not
support adding IR).

(cherry picked from commit 84fe1f63b02414085bf7a8434caaf4a358be86da)
---
 .../ExecutionEngine/Orc/Shared/OrcRTBridge.h  |   4 -
 .../Orc/TargetProcess/UnwindInfoManager.h |  52 +++--
 .../Orc/UnwindInfoRegistrationPlugin.h|  25 +--
 .../Orc/ExecutorProcessControl.cpp|   5 +-
 llvm/lib/ExecutionEngine/Orc/LLJIT.cpp|   4 +-
 .../Orc/Shared/OrcRTBridge.cpp|   8 -
 .../Orc/TargetProcess/UnwindInfoManager.cpp   | 181 --
 .../Orc/UnwindInfoRegistrationPlugin.cpp  | 138 ++---
 .../llvm-jitlink-executor.cpp |   5 +
 llvm/tools/llvm-jitlink/llvm-jitlink.cpp  |  14 ++
 10 files changed, 146 insertions(+), 290 deletions(-)

diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h 
b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
index db5ff135a7164..0f59edd429332 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
@@ -90,10 +90,6 @@ using SPSRunAsIntFunctionSignature = 
int32_t(shared::SPSExecutorAddr, int32_t);
 } // end namespace rt
 
 namespace rt_alt {
-extern const char *UnwindInfoManagerInstanceName;
-extern const char *UnwindInfoManagerFindSectionsHelperName;
-extern const char *UnwindInfoManagerEnableWrapperName;
-extern const char *UnwindInfoManagerDisableWrapperName;
 extern const char *UnwindInfoManagerRegisterActionName;
 extern const char *UnwindInfoManagerDeregisterActionName;
 } // end namespace rt_alt
diff --git 
a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h 
b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
index fc7719f282122..847c340eff17d 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
@@ -15,14 +15,13 @@
 #define LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_UNWINDINFOMANAGER_H
 
 #include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
-#include "llvm/ExecutionEngine/Orc/TargetProcess/ExecutorBootstrapService.h"
 #include "llvm/Support/Error.h"
 #include 
 #include 
 
 namespace llvm::orc {
 
-class UnwindInfoManager : public ExecutorBootstrapService {
+class UnwindInfoManager {
 public:
   // This struct's layout should match the unw_dynamic_unwind_sections struct
   // from libunwind/src/libunwid_ext.h.
@@ -34,43 +33,40 @@ class UnwindInfoManager : public ExecutorBootstrapService {
 size_t compact_unwind_section_length;
   };
 
+  UnwindInfoManager(UnwindInfoManager &&) = delete;
+  UnwindInfoManager &operator=(UnwindInfoManager &&) = delete;
+  ~UnwindInfoManager();
+
   /// If the libunwind find-dynamic-unwind-info callback registration APIs are
-  /// available then this method will return an UnwindInfoManager instance,
-  /// otherwise it will return nullptr.
-  static std::unique_ptr TryCreate();
+  /// available then this method will instantiate a global UnwindInfoManager
+  /// instance suitable for the process and return true. Otherwise it will
+  /// return false.
+  static bool TryEnable();
 
-  Error shutdown() override;
-  void addBootstrapSymbols(StringMap &M) override;
+  static void addBootstrapSymbols(StringMap &M);
 
-  Error enable(void *FindDynamicUnwindSections);
-  Error disable(void);
+  static Error registerSections(ArrayRef CodeRanges,
+orc::ExecutorAddr DSOBase,
+orc::ExecutorAddrRange DWARFEHFrame,
+orc::ExecutorAddrRange CompactUnwind);
 
-  Error registerSections(ArrayRef CodeRanges,
- orc::ExecutorAddr DSOBase,
- orc::ExecutorAddrRange DWARFEHFrame,
- orc::ExecutorAddrRange CompactUnwind);
+  s

[llvm-branch-commits] [llvm] release/20.x: [NFC] [clang] fixed unused variable warning (PR #126831)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

https://github.com/tstellar closed 
https://github.com/llvm/llvm-project/pull/126831
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [NFC] [clang] fixed unused variable warning (PR #126831)

2025-02-15 Thread Lang Hames via llvm-branch-commits

https://github.com/lhames approved this pull request.


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


[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/127350

Backport 256145b4b0058ae22a1040cd4b7ea44fc49a4ece

Requested by: @topperc

>From 04f2b87650eaa990521e07869cdaa78ceeb99243 Mon Sep 17 00:00:00 2001
From: Craig Topper 
Date: Sat, 15 Feb 2025 14:13:32 -0800
Subject: [PATCH] [PowerPC] Use getSignedTargetConstant in
 SelectOptimalAddrMode. (#127305)

Fixes #127298.

(cherry picked from commit 256145b4b0058ae22a1040cd4b7ea44fc49a4ece)
---
 llvm/lib/Target/PowerPC/PPCISelLowering.cpp |  4 ++--
 llvm/test/CodeGen/PowerPC/pr127298.ll   | 13 +
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 llvm/test/CodeGen/PowerPC/pr127298.ll

diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp 
b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 4ca328bd9a9ba..21ff6f050817a 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -19050,8 +19050,8 @@ PPC::AddrMode 
PPCTargetLowering::SelectOptimalAddrMode(const SDNode *Parent,
 int32_t Addr = (int32_t)CNImm;
 // Otherwise, break this down into LIS + Disp.
 Disp = DAG.getSignedTargetConstant((int16_t)Addr, DL, MVT::i32);
-Base =
-DAG.getTargetConstant((Addr - (int16_t)Addr) >> 16, DL, MVT::i32);
+Base = DAG.getSignedTargetConstant((Addr - (int16_t)Addr) >> 16, DL,
+   MVT::i32);
 uint32_t LIS = CNType == MVT::i32 ? PPC::LIS : PPC::LIS8;
 Base = SDValue(DAG.getMachineNode(LIS, DL, CNType, Base), 0);
 break;
diff --git a/llvm/test/CodeGen/PowerPC/pr127298.ll 
b/llvm/test/CodeGen/PowerPC/pr127298.ll
new file mode 100644
index 0..f7560216ef7d8
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/pr127298.ll
@@ -0,0 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 
UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=powerpc | FileCheck %s
+
+define void @foo() {
+; CHECK-LABEL: foo:
+; CHECK:   # %bb.0: # %Entry
+; CHECK-NEXT:lis 3, -8530
+; CHECK-NEXT:lbz 3, -16657(3)
+; CHECK-NEXT:blr
+Entry:
+  %0 = load volatile i8, ptr inttoptr (i32 -559038737 to ptr), align 1
+  ret void
+}

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


[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-backend-powerpc

Author: None (llvmbot)


Changes

Backport 256145b4b0058ae22a1040cd4b7ea44fc49a4ece

Requested by: @topperc

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


2 Files Affected:

- (modified) llvm/lib/Target/PowerPC/PPCISelLowering.cpp (+2-2) 
- (added) llvm/test/CodeGen/PowerPC/pr127298.ll (+13) 


``diff
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp 
b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 4ca328bd9a9ba..21ff6f050817a 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -19050,8 +19050,8 @@ PPC::AddrMode 
PPCTargetLowering::SelectOptimalAddrMode(const SDNode *Parent,
 int32_t Addr = (int32_t)CNImm;
 // Otherwise, break this down into LIS + Disp.
 Disp = DAG.getSignedTargetConstant((int16_t)Addr, DL, MVT::i32);
-Base =
-DAG.getTargetConstant((Addr - (int16_t)Addr) >> 16, DL, MVT::i32);
+Base = DAG.getSignedTargetConstant((Addr - (int16_t)Addr) >> 16, DL,
+   MVT::i32);
 uint32_t LIS = CNType == MVT::i32 ? PPC::LIS : PPC::LIS8;
 Base = SDValue(DAG.getMachineNode(LIS, DL, CNType, Base), 0);
 break;
diff --git a/llvm/test/CodeGen/PowerPC/pr127298.ll 
b/llvm/test/CodeGen/PowerPC/pr127298.ll
new file mode 100644
index 0..f7560216ef7d8
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/pr127298.ll
@@ -0,0 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 
UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=powerpc | FileCheck %s
+
+define void @foo() {
+; CHECK-LABEL: foo:
+; CHECK:   # %bb.0: # %Entry
+; CHECK-NEXT:lis 3, -8530
+; CHECK-NEXT:lbz 3, -16657(3)
+; CHECK-NEXT:blr
+Entry:
+  %0 = load volatile i8, ptr inttoptr (i32 -559038737 to ptr), align 1
+  ret void
+}

``




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


[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread via llvm-branch-commits

llvmbot wrote:

@topperc What do you think about merging this PR to the release branch?

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


[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot milestoned 
https://github.com/llvm/llvm-project/pull/127350
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread Nikita Popov via llvm-branch-commits

https://github.com/nikic approved this pull request.


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


[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-15 Thread Fangrui Song via llvm-branch-commits


@@ -0,0 +1,115 @@
+# REQUIRES: loongarch
+
+# RUN: llvm-mc --filetype=obj --triple=loongarch32 -mattr=+relax --defsym 
ELF32=1 %s -o %t.32.o
+# RUN: llvm-mc --filetype=obj --triple=loongarch64 -mattr=+relax %s -o %t.64.o
+
+# RUN: ld.lld %t.32.o -o %t.32
+# RUN: llvm-objdump -d --no-show-raw-insn %t.32 | FileCheck 
--check-prefixes=RELAX32 %s
+
+# RUN: ld.lld %t.64.o -o %t.64
+# RUN: llvm-objdump -d --no-show-raw-insn %t.64 | FileCheck 
--check-prefixes=RELAX64 %s
+
+# RELAX32-LABEL: <_start>:
+## .LANCHOR0@tprel = 8
+# RELAX32-NEXT:addi.w  $a0, $tp, 8 
+# RELAX32-NEXT:ld.w$a1, $a0, 0
+# RELAX32-NEXT:ld.w$a2, $tp, 8
+## .a@tprel - 4 = 0x7fc
+# RELAX32-NEXT:addi.w  $a1, $zero, 1
+# RELAX32-NEXT:addi.w $a1, $a1, 2
+# RELAX32-NEXT:st.w   $a1, $tp, 2044
+## .a@tprel = 0x800
+# RELAX32-NEXT:lu12i.w $a0, 1
+# RELAX32-NEXT:add.w   $a0, $a0, $tp
+# RELAX32-NEXT:addi.w  $a0, $a0, -2048
+
+# RELAX64-LABEL: <_start>:
+## .LANCHOR0@tprel = 8
+# RELAX64-NEXT:addi.d  $a0, $tp, 8 
+# RELAX64-NEXT:ld.d$a1, $a0, 0
+# RELAX64-NEXT:ld.d$a2, $tp, 8
+## .a@tprel - 4 = 0x7fc
+# RELAX64-NEXT:addi.d  $a1, $zero, 1
+# RELAX64-NEXT:addi.d $a1, $a1, 2
+# RELAX64-NEXT:st.d   $a1, $tp, 2044
+## .a@tprel = 0x800
+# RELAX64-NEXT:lu12i.w $a0, 1
+# RELAX64-NEXT:add.d   $a0, $a0, $tp
+# RELAX64-NEXT:addi.d  $a0, $a0, -2048
+
+.macro add dst, src1, src2, src3
+.ifdef ELF32
+add.w \dst, \src1, \src2, \src3
+.else
+add.d \dst, \src1, \src2, \src3
+.endif
+.endm
+.macro inst op dst, src1, src2
+.ifdef ELF32
+  .ifc  \op, addi
+addi.w  \dst, \src1, \src2
+  .else;.ifc   \op, ld
+ld.w\dst, \src1, \src2
+  .else;.ifc   \op, st
+st.w\dst, \src1, \src2
+  .else;.ifc   \op, ldptr
+ldptr.w \dst, \src1, \src2
+  .else
+.error "Unknown op in ELF32 mode"
+  .endif; .endif; .endif; .endif
+.else
+  .ifc  \op, addi
+addi.d  \dst, \src1, \src2
+  .else;.ifc   \op, ld
+ld.d\dst, \src1, \src2
+  .else;.ifc   \op, st
+st.d\dst, \src1, \src2
+  .else;.ifc   \op, ldptr
+ldptr.d \dst, \src1, \src2
+  .else
+.error "Unknown op in ELF64 mode"
+  .endif; .endif; .endif; .endif
+.endif
+.endm
+
+.macro addi dst, src1, src2
+inst addi \dst, \src1, \src2
+.endm
+.macro ld dst, src1, src2
+inst ld \dst, \src1, \src2
+.endm
+.macro st dst, src1, src2
+inst st \dst, \src1, \src2
+.endm
+.macro ldptr dst, src1, src2
+inst ldptr \dst, \src1, \src2
+.endm
+
+_start:
+## Test instructions not in pairs.
+lu12i.w $a0, %le_hi20_r(.LANCHOR0)

MaskRay wrote:

indent instructions while keeping labels unindented

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


[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-15 Thread Fangrui Song via llvm-branch-commits

https://github.com/MaskRay commented:

@xen0n May I ask you to double check the code? It seems good and appears to be 
LGTMed by a colleague of the author.

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


[llvm-branch-commits] [lld] [lld][LoongArch] Relax TLS LE/GD/LD (PR #123600)

2025-02-15 Thread Fangrui Song via llvm-branch-commits

https://github.com/MaskRay edited 
https://github.com/llvm/llvm-project/pull/123600
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] [AMDGPU] Change SGPR layout to striped caller/callee saved (PR #127353)

2025-02-15 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-backend-amdgpu

Author: Shilei Tian (shiltian)


Changes

This PR updates the SGPR layout to a striped caller/callee-saved design, similar
to the VGPR layout. The stripe width is set to 8.

Fixes #113782.

---

Patch is 2.57 MiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/127353.diff


60 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td (+5-1) 
- (modified) llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow-codegen.ll 
(+145-145) 
- (modified) llvm/test/CodeGen/AMDGPU/bf16.ll (+90-245) 
- (modified) 
llvm/test/CodeGen/AMDGPU/blender-no-live-segment-at-def-implicit-def.ll 
(+21-21) 
- (modified) llvm/test/CodeGen/AMDGPU/branch-folding-implicit-def-subreg.ll 
(+203-201) 
- (modified) llvm/test/CodeGen/AMDGPU/branch-relax-spill.ll (+73-140) 
- (modified) 
llvm/test/CodeGen/AMDGPU/call-args-inreg-no-sgpr-for-csrspill-xfail.ll (+2-2) 
- (modified) llvm/test/CodeGen/AMDGPU/call-args-inreg.ll (+6-6) 
- (modified) llvm/test/CodeGen/AMDGPU/call-argument-types.ll (+1256-1256) 
- (modified) llvm/test/CodeGen/AMDGPU/call-preserved-registers.ll (+20-14) 
- (modified) llvm/test/CodeGen/AMDGPU/callee-frame-setup.ll (+788-1549) 
- (modified) llvm/test/CodeGen/AMDGPU/csr-sgpr-spill-live-ins.mir (+4-6) 
- (modified) llvm/test/CodeGen/AMDGPU/ds_read2.ll (+18-18) 
- (modified) llvm/test/CodeGen/AMDGPU/dwarf-multi-register-use-crash.ll 
(+36-36) 
- (modified) llvm/test/CodeGen/AMDGPU/eliminate-frame-index-s-mov-b32.mir 
(+26-27) 
- (modified) llvm/test/CodeGen/AMDGPU/function-args-inreg.ll (+2-2) 
- (modified) llvm/test/CodeGen/AMDGPU/function-resource-usage.ll (+5-5) 
- (modified) llvm/test/CodeGen/AMDGPU/gfx-call-non-gfx-func.ll (+66-2) 
- (modified) llvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll (+80-208) 
- (modified) llvm/test/CodeGen/AMDGPU/global_atomics_scan_fadd.ll (+1834-1834) 
- (modified) llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmax.ll (+1554-1554) 
- (modified) llvm/test/CodeGen/AMDGPU/global_atomics_scan_fmin.ll (+1554-1554) 
- (modified) llvm/test/CodeGen/AMDGPU/global_atomics_scan_fsub.ll (+1834-1834) 
- (modified) llvm/test/CodeGen/AMDGPU/greedy-alloc-fail-sgpr1024-spill.mir 
(+64-62) 
- (modified) llvm/test/CodeGen/AMDGPU/identical-subrange-spill-infloop.ll 
(+55-91) 
- (modified) llvm/test/CodeGen/AMDGPU/indirect-call.ll (+492-748) 
- (modified) llvm/test/CodeGen/AMDGPU/issue48473.mir (+1-1) 
- (modified) llvm/test/CodeGen/AMDGPU/llvm.amdgcn.pops.exiting.wave.id.ll 
(+24-24) 
- (modified) llvm/test/CodeGen/AMDGPU/llvm.maximum.f32.ll (+6-39) 
- (modified) llvm/test/CodeGen/AMDGPU/llvm.maximum.f64.ll (+18-63) 
- (modified) llvm/test/CodeGen/AMDGPU/llvm.minimum.f32.ll (+6-39) 
- (modified) llvm/test/CodeGen/AMDGPU/llvm.minimum.f64.ll (+18-63) 
- (modified) llvm/test/CodeGen/AMDGPU/lower-work-group-id-intrinsics-hsa.ll 
(+32-32) 
- (modified) 
llvm/test/CodeGen/AMDGPU/machine-sink-temporal-divergence-swdev407790.ll 
(+160-160) 
- (modified) llvm/test/CodeGen/AMDGPU/materialize-frame-index-sgpr.gfx10.ll 
(+68-774) 
- (modified) llvm/test/CodeGen/AMDGPU/materialize-frame-index-sgpr.ll 
(+416-1095) 
- (modified) 
llvm/test/CodeGen/AMDGPU/mcexpr-knownbits-assign-crash-gh-issue-110930.ll 
(+13-13) 
- (modified) llvm/test/CodeGen/AMDGPU/pei-scavenge-sgpr-carry-out.mir (+28-58) 
- (modified) llvm/test/CodeGen/AMDGPU/pei-scavenge-sgpr-gfx9.mir (+17-39) 
- (modified) llvm/test/CodeGen/AMDGPU/pei-scavenge-sgpr.mir (+9-21) 
- (modified) llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll (+223-223) 
- (modified) llvm/test/CodeGen/AMDGPU/ran-out-of-sgprs-allocation-failure.mir 
(+120-86) 
- (modified) llvm/test/CodeGen/AMDGPU/schedule-amdgpu-tracker-physreg.ll (+4-4) 
- (modified) llvm/test/CodeGen/AMDGPU/select.f16.ll (+2-13) 
- (modified) llvm/test/CodeGen/AMDGPU/sgpr-spill-update-only-slot-indexes.ll 
(+8-8) 
- (modified) llvm/test/CodeGen/AMDGPU/shufflevector.v2i64.v8i64.ll (+672-1568) 
- (modified) llvm/test/CodeGen/AMDGPU/sibling-call.ll (+120-120) 
- (modified) llvm/test/CodeGen/AMDGPU/snippet-copy-bundle-regression.mir 
(+38-17) 
- (modified) llvm/test/CodeGen/AMDGPU/spill-sgpr-to-virtual-vgpr.mir (+11-27) 
- (modified) llvm/test/CodeGen/AMDGPU/spill-sgpr-used-for-exec-copy.mir (+3-8) 
- (modified) llvm/test/CodeGen/AMDGPU/spill_more_than_wavesize_csr_sgprs.ll 
(+132-264) 
- (modified) llvm/test/CodeGen/AMDGPU/splitkit-copy-bundle.mir (+107-93) 
- (modified) 
llvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll (+11-11) 
- (modified) llvm/test/CodeGen/AMDGPU/stack-realign.ll (+7-13) 
- (modified) llvm/test/CodeGen/AMDGPU/tuple-allocation-failure.ll (+189-144) 
- (modified) llvm/test/CodeGen/AMDGPU/unallocatable-bundle-regression.mir 
(+11-11) 
- (modified) llvm/test/CodeGen/AMDGPU/unstructured-cfg-def-use-issue.ll 
(+106-106) 
- (modified) llvm/test/CodeGen/AMDGPU/use_restore_frame_reg.mir (+25-51) 
- (modified) llvm/test/CodeGen/AMDGPU/vgpr-large-tuple-alloc-error.ll 
(+11

[llvm-branch-commits] [llvm] [AMDGPU] Change SGPR layout to striped caller/callee saved (PR #127353)

2025-02-15 Thread Shilei Tian via llvm-branch-commits

shiltian wrote:

> [!WARNING]
> This pull request is not mergeable via GitHub because a downstack PR is 
> open. Once all requirements are satisfied, merge this PR as a stack  href="https://app.graphite.dev/github/pr/llvm/llvm-project/127353?utm_source=stack-comment-downstack-mergeability-warning";
>  >on Graphite.
> https://graphite.dev/docs/merge-pull-requests";>Learn more

* **#127353** https://app.graphite.dev/github/pr/llvm/llvm-project/127353?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/127353?utm_source=stack-comment-view-in-graphite";
 target="_blank">(View in Graphite)
* **#127352** https://app.graphite.dev/github/pr/llvm/llvm-project/127352?utm_source=stack-comment-icon";
 target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" 
width="10px" height="10px"/>
* `main`




This stack of pull requests is managed by https://graphite.dev?utm-source=stack-comment";>Graphite. Learn 
more about https://stacking.dev/?utm_source=stack-comment";>stacking.


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


[llvm-branch-commits] [llvm] [AMDGPU] Change SGPR layout to striped caller/callee saved (PR #127353)

2025-02-15 Thread Shilei Tian via llvm-branch-commits

https://github.com/shiltian ready_for_review 
https://github.com/llvm/llvm-project/pull/127353
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang-tools-extra] [clangd] Add clangd 20 release notes (PR #127358)

2025-02-15 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-clang-tools-extra

Author: Nathan Ridge (HighCommander4)


Changes



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


1 Files Affected:

- (modified) clang-tools-extra/docs/ReleaseNotes.rst (+53-3) 


``diff
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst 
b/clang-tools-extra/docs/ReleaseNotes.rst
index cc5f64a3f9fa3..35de182ceddf4 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -56,7 +56,8 @@ Improvements to clangd
 Inlay hints
 ^^^
 
-- Added `DefaultArguments` Inlay Hints option.
+- Added support for inlay hints for default arguments, enabled using the
+  `DefaultArguments` config option (#GH95712)
 
 Diagnostics
 ^^^
@@ -67,21 +68,45 @@ Semantic Highlighting
 Compile flags
 ^
 
+- Fixed a bug where clangd would unnecessarily reparse open files whose
+  compile command did not change when receiving a new compile command
+  via an LSP `workspace/configuration` request (#GH115438)
+
 Hover
 ^
 
+- Hovering over a function name now shows the function's documentation
+  comment even if the comment is written above the function's out-of-line
+  definition in a different source file (#GH67802)
+
 Code completion
 ^^^
 
+- Added an `ArgumentLists` config option under `Completion`. This is a more
+  flexible version of the `--function-arg-placeholders` command line flag,
+  allowing users more detailed control of what is inserted in argument list
+  position when clangd completes the name of a function in a function call
+  context. (#GH111322)
+- Clangd now supports configuring which headers should be inserted using 
+  `<>` vs. `""` syntax using the `QuotedHeaders` and `AngledHeaders` config
+  options under `Style` (#GH67749)
 - Added completion for C++20 keywords.
+- Clangd's `HeuristicResolver` component was upstreamed to `libSema` where
+  code completion can take advantage of it, resulting in improved code
+  completion in templated code
+- Code completion proposals for symbols defined in included headers now
+  include documentation comments (#GH120099)
 
 Code actions
 
 
 - Added `Swap operands` tweak for certain binary operators.
-
 - Improved the extract-to-function code action to allow extracting statements
   with overloaded operators like ``<<`` of ``std::ostream``.
+- `Define outline` now handles member functions of class templates, and
+  member function templates.
+- `Extract variable` can now operate on the top-level expression in an
+  expression statement (#GH112525)
 
 Signature help
 ^^
@@ -89,13 +114,38 @@ Signature help
 Cross-references
 
 
+- Clangd now supports the "outgoing calls" direction of call hierarchy
+  (#GH77556)
+- Call hierarchy can now be invoked on fields and namespace-scope
+  variables (#GH113900)
+- Improved heuristics for filtering out generated Protobuf symbol names
+  during indexing (#GH110091)
+- Compiler intrinsics defined in `*intrin.h` system headers are now
+  indexed even if they have reserved names (#GH119735)
+- Various improvements to go-to-definition in templated code
+
 Objective-C
 ^^^
 
+Clang-tidy integration
+^^
+
+- Improved robustness in handling clang-tidy check names (#GH109421)
+
+C++20 Modules Support
+^
+
+- Support code completion for symbols defined in modules (#GH110083)
+- Improve performance when opening files that import modules (#GH106683)
+- Compile commands for modules now respect modifications specified in `.clangd`
+  files (#GH122606)
+
 Miscellaneous
 ^
 
-- The DefineOutline tweak now handles member functions of class templates.
+- Fixed an OOM affecting some versions of libcxx headers compiled in C++20
+  mode (#GH108866)
+- Various other stability improvements, e.g. crash fixes
 
 Improvements to clang-doc
 -

``




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


[llvm-branch-commits] [clang-tools-extra] [clangd] Add clangd 20 release notes (PR #127358)

2025-02-15 Thread Nathan Ridge via llvm-branch-commits

https://github.com/HighCommander4 created 
https://github.com/llvm/llvm-project/pull/127358

None

>From 77080f896293c948d9c87c8ce47df38ca81c2090 Mon Sep 17 00:00:00 2001
From: Nathan Ridge 
Date: Sat, 15 Feb 2025 01:30:48 -0500
Subject: [PATCH] [clangd] Add clangd 20 release notes

---
 clang-tools-extra/docs/ReleaseNotes.rst | 56 +++--
 1 file changed, 53 insertions(+), 3 deletions(-)

diff --git a/clang-tools-extra/docs/ReleaseNotes.rst 
b/clang-tools-extra/docs/ReleaseNotes.rst
index cc5f64a3f9fa3..35de182ceddf4 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -56,7 +56,8 @@ Improvements to clangd
 Inlay hints
 ^^^
 
-- Added `DefaultArguments` Inlay Hints option.
+- Added support for inlay hints for default arguments, enabled using the
+  `DefaultArguments` config option (#GH95712)
 
 Diagnostics
 ^^^
@@ -67,21 +68,45 @@ Semantic Highlighting
 Compile flags
 ^
 
+- Fixed a bug where clangd would unnecessarily reparse open files whose
+  compile command did not change when receiving a new compile command
+  via an LSP `workspace/configuration` request (#GH115438)
+
 Hover
 ^
 
+- Hovering over a function name now shows the function's documentation
+  comment even if the comment is written above the function's out-of-line
+  definition in a different source file (#GH67802)
+
 Code completion
 ^^^
 
+- Added an `ArgumentLists` config option under `Completion`. This is a more
+  flexible version of the `--function-arg-placeholders` command line flag,
+  allowing users more detailed control of what is inserted in argument list
+  position when clangd completes the name of a function in a function call
+  context. (#GH111322)
+- Clangd now supports configuring which headers should be inserted using 
+  `<>` vs. `""` syntax using the `QuotedHeaders` and `AngledHeaders` config
+  options under `Style` (#GH67749)
 - Added completion for C++20 keywords.
+- Clangd's `HeuristicResolver` component was upstreamed to `libSema` where
+  code completion can take advantage of it, resulting in improved code
+  completion in templated code
+- Code completion proposals for symbols defined in included headers now
+  include documentation comments (#GH120099)
 
 Code actions
 
 
 - Added `Swap operands` tweak for certain binary operators.
-
 - Improved the extract-to-function code action to allow extracting statements
   with overloaded operators like ``<<`` of ``std::ostream``.
+- `Define outline` now handles member functions of class templates, and
+  member function templates.
+- `Extract variable` can now operate on the top-level expression in an
+  expression statement (#GH112525)
 
 Signature help
 ^^
@@ -89,13 +114,38 @@ Signature help
 Cross-references
 
 
+- Clangd now supports the "outgoing calls" direction of call hierarchy
+  (#GH77556)
+- Call hierarchy can now be invoked on fields and namespace-scope
+  variables (#GH113900)
+- Improved heuristics for filtering out generated Protobuf symbol names
+  during indexing (#GH110091)
+- Compiler intrinsics defined in `*intrin.h` system headers are now
+  indexed even if they have reserved names (#GH119735)
+- Various improvements to go-to-definition in templated code
+
 Objective-C
 ^^^
 
+Clang-tidy integration
+^^
+
+- Improved robustness in handling clang-tidy check names (#GH109421)
+
+C++20 Modules Support
+^
+
+- Support code completion for symbols defined in modules (#GH110083)
+- Improve performance when opening files that import modules (#GH106683)
+- Compile commands for modules now respect modifications specified in `.clangd`
+  files (#GH122606)
+
 Miscellaneous
 ^
 
-- The DefineOutline tweak now handles member functions of class templates.
+- Fixed an OOM affecting some versions of libcxx headers compiled in C++20
+  mode (#GH108866)
+- Various other stability improvements, e.g. crash fixes
 
 Improvements to clang-doc
 -

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


[llvm-branch-commits] [clang-tools-extra] [clangd] Add clangd 20 release notes (PR #127358)

2025-02-15 Thread Nathan Ridge via llvm-branch-commits


@@ -67,35 +68,84 @@ Semantic Highlighting
 Compile flags
 ^
 
+- Fixed a bug where clangd would unnecessarily reparse open files whose
+  compile command did not change when receiving a new compile command
+  via an LSP `workspace/configuration` request (#GH115438)
+
 Hover
 ^
 
+- Hovering over a function name now shows the function's documentation
+  comment even if the comment is written above the function's out-of-line
+  definition in a different source file (#GH67802)
+
 Code completion
 ^^^
 
+- Added an `ArgumentLists` config option under `Completion`. This is a more
+  flexible version of the `--function-arg-placeholders` command line flag,
+  allowing users more detailed control of what is inserted in argument list
+  position when clangd completes the name of a function in a function call
+  context. (#GH111322)
+- Clangd now supports configuring which headers should be inserted using 
+  `<>` vs. `""` syntax using the `QuotedHeaders` and `AngledHeaders` config
+  options under `Style` (#GH67749)
 - Added completion for C++20 keywords.
+- Clangd's `HeuristicResolver` component was upstreamed to `libSema` where
+  code completion can take advantage of it, resulting in improved code
+  completion in templated code
+- Code completion proposals for symbols defined in included headers now
+  include documentation comments (#GH120099)
 
 Code actions
 
 
 - Added `Swap operands` tweak for certain binary operators.
-
 - Improved the extract-to-function code action to allow extracting statements
   with overloaded operators like ``<<`` of ``std::ostream``.
+- `Define outline` now handles member functions of class templates, and
+  member function templates.
+- `Extract variable` can now operate on the top-level expression in an
+  expression statement (#GH112525)
 
 Signature help
 ^^
 
 Cross-references
 
 
+- Clangd now supports the "outgoing calls" direction of call hierarchy
+  (#GH77556)
+- Call hierarchy can now be invoked on fields and namespace-scope
+  variables (#GH113900)
+- Improved heuristics for filtering out generated Protobuf symbol names
+  during indexing (#GH110091)
+- Compiler intrinsics defined in `*intrin.h` system headers are now
+  indexed even if they have reserved names (#GH119735)
+- Various improvements to go-to-definition in templated code
+
 Objective-C
 ^^^
 
+Clang-tidy integration
+^^
+
+- Improved robustness in handling clang-tidy check names (#GH109421)
+
+C++20 Modules Support

HighCommander4 wrote:

@ChuanqiXu9 I would appreciate if you could look over this section in 
particular. I added entries for the modules-related commits that seemed notable 
to me, but I'm definitely happy to add other entries / add more details / 
adjust wording etc.

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


[llvm-branch-commits] [libcxx] 12ee543 - Revert "[libc++][NFC] Make enable_ifs in consistent (#127184)"

2025-02-15 Thread via llvm-branch-commits

Author: Nikolas Klauser
Date: 2025-02-15T10:39:03+01:00
New Revision: 12ee5438c8e2a646954b6159897fa8198e387751

URL: 
https://github.com/llvm/llvm-project/commit/12ee5438c8e2a646954b6159897fa8198e387751
DIFF: 
https://github.com/llvm/llvm-project/commit/12ee5438c8e2a646954b6159897fa8198e387751.diff

LOG: Revert "[libc++][NFC] Make enable_ifs in  consistent (#127184)"

This reverts commit 4887e41055686eede9c155e6b3296b92fe86c2d5.

Added: 


Modified: 
libcxx/include/optional

Removed: 




diff  --git a/libcxx/include/optional b/libcxx/include/optional
index db236f86e74dd..c325140ee66f2 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -672,41 +672,44 @@ public:
   _LIBCPP_HIDE_FROM_ABI constexpr optional(optional&&)  = default;
   _LIBCPP_HIDE_FROM_ABI constexpr optional(nullopt_t) noexcept {}
 
-  template , 
is_constructible>::value, int> = 0>
+  template <
+  class _InPlaceT,
+  class... _Args,
+  class = enable_if_t< _And< _IsSame<_InPlaceT, in_place_t>, 
is_constructible >::value > >
   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_InPlaceT, _Args&&... 
__args)
   : __base(in_place, std::forward<_Args>(__args)...) {}
 
   template &, 
_Args...>, int> = 0>
+class = enable_if_t< is_constructible_v&, _Args...>> >
   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(in_place_t, 
initializer_list<_Up> __il, _Args&&... __args)
   : __base(in_place, __il, std::forward<_Args>(__args)...) {}
 
-  template ::template 
__enable_implicit<_Up>(), int> = 0>
+  template ::template 
__enable_implicit<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI constexpr optional(_Up&& __v) : __base(in_place, 
std::forward<_Up>(__v)) {}
 
-  template ::template 
__enable_explicit<_Up>(), int> = 0>
+  template ::template 
__enable_explicit<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_Up&& __v) : 
__base(in_place, std::forward<_Up>(__v)) {}
 
   // LWG2756: conditionally explicit conversion from const optional<_Up>&
-  template ::template __enable_implicit<_Up>(), int> = 0>
+  template ::template 
__enable_implicit<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(const 
optional<_Up>& __v) {
 this->__construct_from(__v);
   }
-  template ::template __enable_explicit<_Up>(), int> = 0>
+  template ::template 
__enable_explicit<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional(const 
optional<_Up>& __v) {
 this->__construct_from(__v);
   }
 
   // LWG2756: conditionally explicit conversion from optional<_Up>&&
-  template ::template __enable_implicit<_Up>(), int> = 0>
+  template ::template __enable_implicit<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional(optional<_Up>&& 
__v) {
 this->__construct_from(std::move(__v));
   }
-  template ::template __enable_explicit<_Up>(), int> = 0>
+  template ::template __enable_explicit<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit 
optional(optional<_Up>&& __v) {
 this->__construct_from(std::move(__v));
   }
@@ -715,7 +718,7 @@ public:
   template ::value, int> = 0>
+__enable_if_t<_IsSame<_Tag, 
__optional_construct_from_invoke_tag>::value, int> = 0>
   _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_Tag, _Fp&& __f, 
_Args&&... __args)
   : __base(__optional_construct_from_invoke_tag{}, std::forward<_Fp>(__f), 
std::forward<_Args>(__args)...) {}
 #endif
@@ -729,12 +732,12 @@ public:
   _LIBCPP_HIDE_FROM_ABI constexpr optional& operator=(optional&&)  = 
default;
 
   // LWG2756
-  template , optional>,
- _Or<_IsNotSame<__remove_cvref_t<_Up>, 
value_type>, _Not>>,
- is_constructible,
- is_assignable>::value,
-int> = 0>
+  template <
+  class _Up = value_type,
+  class = enable_if_t< _And< _IsNotSame<__remove_cvref_t<_Up>, 
optional>,
+ _Or< _IsNotSame<__remove_cvref_t<_Up>, 
value_type>, _Not> >,
+ is_constructible,
+ is_assignable >::value> 
>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& 
operator=(_Up&& __v) {
 if (this->has_value())
   this->__get() = std::forward<_Up>(__v);
@@ -744,20 +747,21 @@ public:
   }
 
   // LWG2756
-  template ::template __enable_assign<_Up>(), int> = 0>
+  template ::template 
__enable_assign<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& 
operator=(const optional<_Up>& __v) {
 this->__assign_from(__v);
 return *this;
   }
 
   // LWG2756
-  template ::template __enable_assign<_Up>(), int> = 0>
+  template ::template __enable_assign<_Up>(), int> = 0>
   _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& 
opera

[llvm-branch-commits] [libcxx] release/20.x: [libc++][format] Disables the FTM on older MacOS versions. (#126547) (PR #127232)

2025-02-15 Thread Louis Dionne via llvm-branch-commits

https://github.com/ldionne approved this pull request.


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


[llvm-branch-commits] [libcxx] release/20.x: [libc++] Avoid including on arbitrary platforms (#125587) (PR #127310)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot milestoned 
https://github.com/llvm/llvm-project/pull/127310
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [libcxx] release/20.x: [libc++] Avoid including on arbitrary platforms (#125587) (PR #127310)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/127310

Backport cffc1ac3491c891ef4f80bcbfa685710e477eeac

Requested by: @ldionne

>From 49edc61061abd15b7b6a240463c3a296e4286569 Mon Sep 17 00:00:00 2001
From: Louis Dionne 
Date: Sat, 15 Feb 2025 10:54:00 +0100
Subject: [PATCH] [libc++] Avoid including  on arbitrary platforms
 (#125587)

This partially reverts commit 5f2389d4. That commit started checking
whether  was a valid include unconditionally, however codebases
are free to have such a header on their search path, which breaks compilation.
LLVM libc now provides a more standard way of getting configuration macros
like __LLVM_LIBC__.

After this patch, we only include  when we're on Linux or
when we're compiling for GPUs.

(cherry picked from commit cffc1ac3491c891ef4f80bcbfa685710e477eeac)
---
 libcxx/include/__configuration/platform.h | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/libcxx/include/__configuration/platform.h 
b/libcxx/include/__configuration/platform.h
index 2a92ce209b91f..cff99376ee24b 100644
--- a/libcxx/include/__configuration/platform.h
+++ b/libcxx/include/__configuration/platform.h
@@ -30,12 +30,9 @@
 // ... add new file formats here ...
 #endif
 
-// To detect which libc we're using
-#if __has_include()
+// Need to detect which libc we're using if we're on Linux.
+#if defined(__linux__) || defined(__AMDGPU__) || defined(__NVPTX__)
 #  include 
-#endif
-
-#if defined(__linux__)
 #  if defined(__GLIBC_PREREQ)
 #define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
 #  else

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


[llvm-branch-commits] [libcxx] release/20.x: [libc++] Avoid including on arbitrary platforms (#125587) (PR #127310)

2025-02-15 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-libcxx

Author: None (llvmbot)


Changes

Backport cffc1ac3491c891ef4f80bcbfa685710e477eeac

Requested by: @ldionne

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


1 Files Affected:

- (modified) libcxx/include/__configuration/platform.h (+2-5) 


``diff
diff --git a/libcxx/include/__configuration/platform.h 
b/libcxx/include/__configuration/platform.h
index 2a92ce209b91f..cff99376ee24b 100644
--- a/libcxx/include/__configuration/platform.h
+++ b/libcxx/include/__configuration/platform.h
@@ -30,12 +30,9 @@
 // ... add new file formats here ...
 #endif
 
-// To detect which libc we're using
-#if __has_include()
+// Need to detect which libc we're using if we're on Linux.
+#if defined(__linux__) || defined(__AMDGPU__) || defined(__NVPTX__)
 #  include 
-#endif
-
-#if defined(__linux__)
 #  if defined(__GLIBC_PREREQ)
 #define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
 #  else

``




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


[llvm-branch-commits] [llvm] release/20.x: [SLP] Check for PHI nodes (potentially cycles!) when checking dependencies (PR #127294)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

tstellar wrote:

cc @Zentrik @dyung 

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


[llvm-branch-commits] [clang] release/20.x: [TBAA] Don't emit pointer-tbaa for void pointers. (#122116) (PR #125206)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

tstellar wrote:

@AaronBallman Any thoughts about this one?

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


[llvm-branch-commits] [llvm] release/20.x: [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly (#125186) (PR #125210)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

tstellar wrote:

@nikic Can you take a quick look at this one. 

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


[llvm-branch-commits] [llvm] release/20.x: [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly (#125186) (PR #125210)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot updated 
https://github.com/llvm/llvm-project/pull/125210

>From 73315311bd6a073ba45e938d8728d9b8f389453e Mon Sep 17 00:00:00 2001
From: Brad Smith 
Date: Fri, 31 Jan 2025 05:02:50 -0500
Subject: [PATCH] [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and
 DragonFly (#125186)

(cherry picked from commit 95e19e21c55db7ede8ff7795512bbfc4ca0ca782)
---
 llvm/lib/Support/Unix/Signals.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/lib/Support/Unix/Signals.inc 
b/llvm/lib/Support/Unix/Signals.inc
index 9a12663228a36..2e7b467a14bbe 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -468,7 +468,8 @@ void llvm::sys::AddSignalHandler(sys::SignalHandlerCallback 
FnPtr,
 
 #if ENABLE_BACKTRACES && defined(HAVE_BACKTRACE) &&
\
 (defined(__linux__) || defined(__FreeBSD__) || 
\
- defined(__FreeBSD_kernel__) || defined(__NetBSD__))
+ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || 
\
+ defined(__OpenBSD__) || defined(__DragonFly__))
 struct DlIteratePhdrData {
   void **StackTrace;
   int depth;

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


[llvm-branch-commits] [llvm] 7331531 - [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly (#125186)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

Author: Brad Smith
Date: 2025-02-15T22:08:36-08:00
New Revision: 73315311bd6a073ba45e938d8728d9b8f389453e

URL: 
https://github.com/llvm/llvm-project/commit/73315311bd6a073ba45e938d8728d9b8f389453e
DIFF: 
https://github.com/llvm/llvm-project/commit/73315311bd6a073ba45e938d8728d9b8f389453e.diff

LOG: [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly 
(#125186)

(cherry picked from commit 95e19e21c55db7ede8ff7795512bbfc4ca0ca782)

Added: 


Modified: 
llvm/lib/Support/Unix/Signals.inc

Removed: 




diff  --git a/llvm/lib/Support/Unix/Signals.inc 
b/llvm/lib/Support/Unix/Signals.inc
index 9a12663228a36..2e7b467a14bbe 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -468,7 +468,8 @@ void llvm::sys::AddSignalHandler(sys::SignalHandlerCallback 
FnPtr,
 
 #if ENABLE_BACKTRACES && defined(HAVE_BACKTRACE) &&
\
 (defined(__linux__) || defined(__FreeBSD__) || 
\
- defined(__FreeBSD_kernel__) || defined(__NetBSD__))
+ defined(__FreeBSD_kernel__) || defined(__NetBSD__) || 
\
+ defined(__OpenBSD__) || defined(__DragonFly__))
 struct DlIteratePhdrData {
   void **StackTrace;
   int depth;



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


[llvm-branch-commits] [llvm] release/20.x: [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly (#125186) (PR #125210)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

https://github.com/tstellar closed 
https://github.com/llvm/llvm-project/pull/125210
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [llvm][Support] Enable dl_iterate_phdr support on OpenBSD and DragonFly (#125186) (PR #125210)

2025-02-15 Thread via llvm-branch-commits

github-actions[bot] wrote:

@brad0 (or anyone else). If you would like to add a note about this fix in the 
release notes (completely optional). Please reply to this comment with a one or 
two sentence description of the fix.  When you are done, please add the 
release:note label to this PR. 

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


[llvm-branch-commits] [libcxx] release/20.x: [libc++][format] Disables the FTM on older MacOS versions. (#126547) (PR #127232)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot updated 
https://github.com/llvm/llvm-project/pull/127232

>From 8b73dad2247835d4f97dc0a731d3173ce573d597 Mon Sep 17 00:00:00 2001
From: Mark de Wever 
Date: Fri, 14 Feb 2025 18:27:54 +0100
Subject: [PATCH] [libc++][format] Disables the FTM on older MacOS versions.
 (#126547)

On older MacOS versions where `std::to_chars` for floating-point types
is not available the format library can't be used. Due to some issue
with the availability macro used to disable format on MacOS the issue
triggers regardless of the type being formatted.

The print library has the same issue.

Fixes: #125353
(cherry picked from commit fbd92d098500775501ba917f21e094f4d714f562)
---
 libcxx/include/version|  8 +-
 .../format.version.compile.pass.cpp   | 48 +++
 .../ostream.version.compile.pass.cpp  | 32 +---
 .../print.version.compile.pass.cpp| 32 +---
 .../version.version.compile.pass.cpp  | 80 +--
 .../generate_feature_test_macro_components.py | 10 +++
 6 files changed, 148 insertions(+), 62 deletions(-)

diff --git a/libcxx/include/version b/libcxx/include/version
index 29a71ed574e56..c5966b90c061d 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -417,7 +417,9 @@ __cpp_lib_void_t
201411L 
 # define __cpp_lib_erase_if 202002L
 # undef  __cpp_lib_execution
 // # define __cpp_lib_execution201902L
-# define __cpp_lib_format   202110L
+# if _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   define __cpp_lib_format 202110L
+# endif
 # define __cpp_lib_format_uchar 202311L
 # define __cpp_lib_generic_unordered_lookup 201811L
 # define __cpp_lib_int_pow2 202002L
@@ -499,7 +501,9 @@ __cpp_lib_void_t
201411L 
 # undef  __cpp_lib_optional
 # define __cpp_lib_optional 202110L
 # define __cpp_lib_out_ptr  202106L
-# define __cpp_lib_print202207L
+# if _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   define __cpp_lib_print  202207L
+# endif
 # undef  __cpp_lib_ranges
 # define __cpp_lib_ranges   202406L
 // # define __cpp_lib_ranges_as_const  202207L
diff --git 
a/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
index 7bb2fa399b094..6a96325661346 100644
--- 
a/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
@@ -68,11 +68,17 @@
 
 #elif TEST_STD_VER == 20
 
-# ifndef __cpp_lib_format
-#   error "__cpp_lib_format should be defined in c++20"
-# endif
-# if __cpp_lib_format != 202110L
-#   error "__cpp_lib_format should have the value 202110L in c++20"
+# if !defined(_LIBCPP_VERSION) || 
_LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   ifndef __cpp_lib_format
+# error "__cpp_lib_format should be defined in c++20"
+#   endif
+#   if __cpp_lib_format != 202110L
+# error "__cpp_lib_format should have the value 202110L in c++20"
+#   endif
+# else
+#   ifdef __cpp_lib_format
+# error "__cpp_lib_format should not be defined when the requirement 
'!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' 
is not met!"
+#   endif
 # endif
 
 # ifdef __cpp_lib_format_ranges
@@ -88,11 +94,17 @@
 
 #elif TEST_STD_VER == 23
 
-# ifndef __cpp_lib_format
-#   error "__cpp_lib_format should be defined in c++23"
-# endif
-# if __cpp_lib_format != 202110L
-#   error "__cpp_lib_format should have the value 202110L in c++23"
+# if !defined(_LIBCPP_VERSION) || 
_LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   ifndef __cpp_lib_format
+# error "__cpp_lib_format should be defined in c++23"
+#   endif
+#   if __cpp_lib_format != 202110L
+# error "__cpp_lib_format should have the value 202110L in c++23"
+#   endif
+# else
+#   ifdef __cpp_lib_format
+# error "__cpp_lib_format should not be defined when the requirement 
'!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' 
is not met!"
+#   endif
 # endif
 
 # ifndef __cpp_lib_format_ranges
@@ -111,11 +123,17 @@
 
 #elif TEST_STD_VER > 23
 
-# ifndef __cpp_lib_format
-#   error "__cpp_lib_format should be defined in c++26"
-# endif
-# if __cpp_lib_format != 202110L
-#   error "__cpp_lib_format should have the value 202110L in c++26"
+# if !defined(_LIBCPP_VERSION) || 
_LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   ifndef __cpp_lib_format
+# error "__cpp_l

[llvm-branch-commits] [libcxx] 8b73dad - [libc++][format] Disables the FTM on older MacOS versions. (#126547)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

Author: Mark de Wever
Date: 2025-02-15T22:10:42-08:00
New Revision: 8b73dad2247835d4f97dc0a731d3173ce573d597

URL: 
https://github.com/llvm/llvm-project/commit/8b73dad2247835d4f97dc0a731d3173ce573d597
DIFF: 
https://github.com/llvm/llvm-project/commit/8b73dad2247835d4f97dc0a731d3173ce573d597.diff

LOG: [libc++][format] Disables the FTM on older MacOS versions. (#126547)

On older MacOS versions where `std::to_chars` for floating-point types
is not available the format library can't be used. Due to some issue
with the availability macro used to disable format on MacOS the issue
triggers regardless of the type being formatted.

The print library has the same issue.

Fixes: #125353
(cherry picked from commit fbd92d098500775501ba917f21e094f4d714f562)

Added: 


Modified: 
libcxx/include/version

libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/ostream.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/print.version.compile.pass.cpp

libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
libcxx/utils/generate_feature_test_macro_components.py

Removed: 




diff  --git a/libcxx/include/version b/libcxx/include/version
index 29a71ed574e56..c5966b90c061d 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -417,7 +417,9 @@ __cpp_lib_void_t
201411L 
 # define __cpp_lib_erase_if 202002L
 # undef  __cpp_lib_execution
 // # define __cpp_lib_execution201902L
-# define __cpp_lib_format   202110L
+# if _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   define __cpp_lib_format 202110L
+# endif
 # define __cpp_lib_format_uchar 202311L
 # define __cpp_lib_generic_unordered_lookup 201811L
 # define __cpp_lib_int_pow2 202002L
@@ -499,7 +501,9 @@ __cpp_lib_void_t
201411L 
 # undef  __cpp_lib_optional
 # define __cpp_lib_optional 202110L
 # define __cpp_lib_out_ptr  202106L
-# define __cpp_lib_print202207L
+# if _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   define __cpp_lib_print  202207L
+# endif
 # undef  __cpp_lib_ranges
 # define __cpp_lib_ranges   202406L
 // # define __cpp_lib_ranges_as_const  202207L

diff  --git 
a/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
 
b/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
index 7bb2fa399b094..6a96325661346 100644
--- 
a/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
+++ 
b/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
@@ -68,11 +68,17 @@
 
 #elif TEST_STD_VER == 20
 
-# ifndef __cpp_lib_format
-#   error "__cpp_lib_format should be defined in c++20"
-# endif
-# if __cpp_lib_format != 202110L
-#   error "__cpp_lib_format should have the value 202110L in c++20"
+# if !defined(_LIBCPP_VERSION) || 
_LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   ifndef __cpp_lib_format
+# error "__cpp_lib_format should be defined in c++20"
+#   endif
+#   if __cpp_lib_format != 202110L
+# error "__cpp_lib_format should have the value 202110L in c++20"
+#   endif
+# else
+#   ifdef __cpp_lib_format
+# error "__cpp_lib_format should not be defined when the requirement 
'!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' 
is not met!"
+#   endif
 # endif
 
 # ifdef __cpp_lib_format_ranges
@@ -88,11 +94,17 @@
 
 #elif TEST_STD_VER == 23
 
-# ifndef __cpp_lib_format
-#   error "__cpp_lib_format should be defined in c++23"
-# endif
-# if __cpp_lib_format != 202110L
-#   error "__cpp_lib_format should have the value 202110L in c++23"
+# if !defined(_LIBCPP_VERSION) || 
_LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT
+#   ifndef __cpp_lib_format
+# error "__cpp_lib_format should be defined in c++23"
+#   endif
+#   if __cpp_lib_format != 202110L
+# error "__cpp_lib_format should have the value 202110L in c++23"
+#   endif
+# else
+#   ifdef __cpp_lib_format
+# error "__cpp_lib_format should not be defined when the requirement 
'!defined(_LIBCPP_VERSION) || _LIBCPP_AVAILABILITY_HAS_TO_CHARS_FLOATING_POINT' 
is not met!"
+#   endif
 # endif
 
 # ifndef __cpp_lib_format_ranges
@@ -111,11 +123,17 @@
 
 #elif TEST_STD_VER > 23
 
-# ifndef __cpp_lib_format
-#   error "__c

[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot updated 
https://github.com/llvm/llvm-project/pull/127350

>From 94291653a7414df9d825d6be9d10be345456d30c Mon Sep 17 00:00:00 2001
From: Craig Topper 
Date: Sat, 15 Feb 2025 14:13:32 -0800
Subject: [PATCH] [PowerPC] Use getSignedTargetConstant in
 SelectOptimalAddrMode. (#127305)

Fixes #127298.

(cherry picked from commit 256145b4b0058ae22a1040cd4b7ea44fc49a4ece)
---
 llvm/lib/Target/PowerPC/PPCISelLowering.cpp |  4 ++--
 llvm/test/CodeGen/PowerPC/pr127298.ll   | 13 +
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 llvm/test/CodeGen/PowerPC/pr127298.ll

diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp 
b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 4ca328bd9a9ba..21ff6f050817a 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -19050,8 +19050,8 @@ PPC::AddrMode 
PPCTargetLowering::SelectOptimalAddrMode(const SDNode *Parent,
 int32_t Addr = (int32_t)CNImm;
 // Otherwise, break this down into LIS + Disp.
 Disp = DAG.getSignedTargetConstant((int16_t)Addr, DL, MVT::i32);
-Base =
-DAG.getTargetConstant((Addr - (int16_t)Addr) >> 16, DL, MVT::i32);
+Base = DAG.getSignedTargetConstant((Addr - (int16_t)Addr) >> 16, DL,
+   MVT::i32);
 uint32_t LIS = CNType == MVT::i32 ? PPC::LIS : PPC::LIS8;
 Base = SDValue(DAG.getMachineNode(LIS, DL, CNType, Base), 0);
 break;
diff --git a/llvm/test/CodeGen/PowerPC/pr127298.ll 
b/llvm/test/CodeGen/PowerPC/pr127298.ll
new file mode 100644
index 0..f7560216ef7d8
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/pr127298.ll
@@ -0,0 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 
UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=powerpc | FileCheck %s
+
+define void @foo() {
+; CHECK-LABEL: foo:
+; CHECK:   # %bb.0: # %Entry
+; CHECK-NEXT:lis 3, -8530
+; CHECK-NEXT:lbz 3, -16657(3)
+; CHECK-NEXT:blr
+Entry:
+  %0 = load volatile i8, ptr inttoptr (i32 -559038737 to ptr), align 1
+  ret void
+}

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


[llvm-branch-commits] [llvm] 9429165 - [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

Author: Craig Topper
Date: 2025-02-15T22:12:01-08:00
New Revision: 94291653a7414df9d825d6be9d10be345456d30c

URL: 
https://github.com/llvm/llvm-project/commit/94291653a7414df9d825d6be9d10be345456d30c
DIFF: 
https://github.com/llvm/llvm-project/commit/94291653a7414df9d825d6be9d10be345456d30c.diff

LOG: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305)

Fixes #127298.

(cherry picked from commit 256145b4b0058ae22a1040cd4b7ea44fc49a4ece)

Added: 
llvm/test/CodeGen/PowerPC/pr127298.ll

Modified: 
llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Removed: 




diff  --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp 
b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 4ca328bd9a9ba..21ff6f050817a 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -19050,8 +19050,8 @@ PPC::AddrMode 
PPCTargetLowering::SelectOptimalAddrMode(const SDNode *Parent,
 int32_t Addr = (int32_t)CNImm;
 // Otherwise, break this down into LIS + Disp.
 Disp = DAG.getSignedTargetConstant((int16_t)Addr, DL, MVT::i32);
-Base =
-DAG.getTargetConstant((Addr - (int16_t)Addr) >> 16, DL, MVT::i32);
+Base = DAG.getSignedTargetConstant((Addr - (int16_t)Addr) >> 16, DL,
+   MVT::i32);
 uint32_t LIS = CNType == MVT::i32 ? PPC::LIS : PPC::LIS8;
 Base = SDValue(DAG.getMachineNode(LIS, DL, CNType, Base), 0);
 break;

diff  --git a/llvm/test/CodeGen/PowerPC/pr127298.ll 
b/llvm/test/CodeGen/PowerPC/pr127298.ll
new file mode 100644
index 0..f7560216ef7d8
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/pr127298.ll
@@ -0,0 +1,13 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 
UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=powerpc | FileCheck %s
+
+define void @foo() {
+; CHECK-LABEL: foo:
+; CHECK:   # %bb.0: # %Entry
+; CHECK-NEXT:lis 3, -8530
+; CHECK-NEXT:lbz 3, -16657(3)
+; CHECK-NEXT:blr
+Entry:
+  %0 = load volatile i8, ptr inttoptr (i32 -559038737 to ptr), align 1
+  ret void
+}



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


[llvm-branch-commits] [libcxx] release/20.x: [libc++][format] Disables the FTM on older MacOS versions. (#126547) (PR #127232)

2025-02-15 Thread via llvm-branch-commits

github-actions[bot] wrote:

@mordante (or anyone else). If you would like to add a note about this fix in 
the release notes (completely optional). Please reply to this comment with a 
one or two sentence description of the fix.  When you are done, please add the 
release:note label to this PR. 

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


[llvm-branch-commits] [libcxx] release/20.x: [libc++][format] Disables the FTM on older MacOS versions. (#126547) (PR #127232)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

https://github.com/tstellar closed 
https://github.com/llvm/llvm-project/pull/127232
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread Tom Stellard via llvm-branch-commits

https://github.com/tstellar closed 
https://github.com/llvm/llvm-project/pull/127350
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm] release/20.x: [PowerPC] Use getSignedTargetConstant in SelectOptimalAddrMode. (#127305) (PR #127350)

2025-02-15 Thread via llvm-branch-commits

github-actions[bot] wrote:

@topperc (or anyone else). If you would like to add a note about this fix in 
the release notes (completely optional). Please reply to this comment with a 
one or two sentence description of the fix.  When you are done, please add the 
release:note label to this PR. 

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


[llvm-branch-commits] [clang-tools-extra] [clangd] Add clangd 20 release notes (PR #127358)

2025-02-15 Thread Nathan Ridge via llvm-branch-commits


@@ -67,35 +68,84 @@ Semantic Highlighting
 Compile flags
 ^
 
+- Fixed a bug where clangd would unnecessarily reparse open files whose
+  compile command did not change when receiving a new compile command
+  via an LSP `workspace/configuration` request (#GH115438)
+
 Hover
 ^
 
+- Hovering over a function name now shows the function's documentation
+  comment even if the comment is written above the function's out-of-line
+  definition in a different source file (#GH67802)
+
 Code completion
 ^^^
 
+- Added an `ArgumentLists` config option under `Completion`. This is a more
+  flexible version of the `--function-arg-placeholders` command line flag,
+  allowing users more detailed control of what is inserted in argument list
+  position when clangd completes the name of a function in a function call
+  context. (#GH111322)
+- Clangd now supports configuring which headers should be inserted using 
+  `<>` vs. `""` syntax using the `QuotedHeaders` and `AngledHeaders` config
+  options under `Style` (#GH67749)
 - Added completion for C++20 keywords.
+- Clangd's `HeuristicResolver` component was upstreamed to `libSema` where
+  code completion can take advantage of it, resulting in improved code
+  completion in templated code
+- Code completion proposals for symbols defined in included headers now
+  include documentation comments (#GH120099)
 
 Code actions
 
 
 - Added `Swap operands` tweak for certain binary operators.
-
 - Improved the extract-to-function code action to allow extracting statements
   with overloaded operators like ``<<`` of ``std::ostream``.
+- `Define outline` now handles member functions of class templates, and
+  member function templates.
+- `Extract variable` can now operate on the top-level expression in an
+  expression statement (#GH112525)
 
 Signature help
 ^^
 
 Cross-references
 
 
+- Clangd now supports the "outgoing calls" direction of call hierarchy
+  (#GH77556)
+- Call hierarchy can now be invoked on fields and namespace-scope
+  variables (#GH113900)
+- Improved heuristics for filtering out generated Protobuf symbol names
+  during indexing (#GH110091)
+- Compiler intrinsics defined in `*intrin.h` system headers are now
+  indexed even if they have reserved names (#GH119735)
+- Various improvements to go-to-definition in templated code
+
 Objective-C
 ^^^
 
+Clang-tidy integration
+^^
+
+- Improved robustness in handling clang-tidy check names (#GH109421)
+
+C++20 Modules Support

HighCommander4 wrote:

@ChuanqiXu9 and a follow-up question, do you think we should make any update to 
https://clangd.llvm.org/features#experimental-c20-modules-support for clangd 20?

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


[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fixes (|multi)_set spaceship operator. (#127326) (PR #127342)

2025-02-15 Thread via llvm-branch-commits

llvmbot wrote:




@llvm/pr-subscribers-libcxx

Author: None (llvmbot)


Changes

Backport 248716f814d1d1fef88911d01a0b551d53c87c7a

Requested by: @mordante

---

Patch is 24.88 KiB, truncated to 20.00 KiB below, full version: 
https://github.com/llvm/llvm-project/pull/127342.diff


2 Files Affected:

- (modified) libcxx/include/set (+4-4) 
- (modified) libcxx/test/support/test_container_comparisons.h (+164-102) 


``diff
diff --git a/libcxx/include/set b/libcxx/include/set
index 2784e82760d7e..3c6ea360bd06c 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -1003,9 +1003,9 @@ operator<=(const set<_Key, _Compare, _Allocator>& __x, 
const set<_Key, _Compare,
 
 #  else // _LIBCPP_STD_VER <= 17
 
-template 
+template 
 _LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Key>
-operator<=>(const set<_Key, _Allocator>& __x, const set<_Key, _Allocator>& 
__y) {
+operator<=>(const set<_Key, _Compare, _Allocator>& __x, const set<_Key, 
_Compare, _Allocator>& __y) {
   return std::lexicographical_compare_three_way(__x.begin(), __x.end(), 
__y.begin(), __y.end(), std::__synth_three_way);
 }
 
@@ -1470,9 +1470,9 @@ operator<=(const multiset<_Key, _Compare, _Allocator>& 
__x, const multiset<_Key,
 
 #  else // _LIBCPP_STD_VER <= 17
 
-template 
+template 
 _LIBCPP_HIDE_FROM_ABI __synth_three_way_result<_Key>
-operator<=>(const multiset<_Key, _Allocator>& __x, const multiset<_Key, 
_Allocator>& __y) {
+operator<=>(const multiset<_Key, _Compare, _Allocator>& __x, const 
multiset<_Key, _Compare, _Allocator>& __y) {
   return std::lexicographical_compare_three_way(__x.begin(), __x.end(), 
__y.begin(), __y.end(), __synth_three_way);
 }
 
diff --git a/libcxx/test/support/test_container_comparisons.h 
b/libcxx/test/support/test_container_comparisons.h
index 543c5899922d0..f7bf78e48a1f8 100644
--- a/libcxx/test/support/test_container_comparisons.h
+++ b/libcxx/test/support/test_container_comparisons.h
@@ -13,51 +13,52 @@
 #include 
 #include 
 
+#include "test_allocator.h"
 #include "test_comparisons.h"
 
 // Implementation detail of `test_sequence_container_spaceship`
-template  typename Container, typename Elem, typename 
Order>
+template  typename Container, typename Elem, typename 
Allocator, typename Order>
 constexpr void test_sequence_container_spaceship_with_type() {
   // Empty containers
   {
-Container l1;
-Container l2;
+Container l1;
+Container l2;
 assert(testOrder(l1, l2, Order::equivalent));
   }
   // Identical contents
   {
-Container l1{1, 1};
-Container l2{1, 1};
+Container l1{1, 1};
+Container l2{1, 1};
 assert(testOrder(l1, l2, Order::equivalent));
   }
   // Less, due to contained values
   {
-Container l1{1, 1};
-Container l2{1, 2};
+Container l1{1, 1};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::less));
   }
   // Greater, due to contained values
   {
-Container l1{1, 3};
-Container l2{1, 2};
+Container l1{1, 3};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::greater));
   }
   // Shorter list
   {
-Container l1{1};
-Container l2{1, 2};
+Container l1{1};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::less));
   }
   // Longer list
   {
-Container l1{1, 2};
-Container l2{1};
+Container l1{1, 2};
+Container l2{1};
 assert(testOrder(l1, l2, Order::greater));
   }
   // Unordered
   if constexpr (std::is_same_v) {
-Container l1{1, std::numeric_limits::min()};
-Container l2{1, 2};
+Container l1{1, std::numeric_limits::min()};
+Container l2{1, 2};
 assert(testOrder(l1, l2, Order::unordered));
   }
 }
@@ -69,13 +70,22 @@ constexpr bool test_sequence_container_spaceship() {
   static_assert(std::three_way_comparable>);
 
   // Test different comparison categories
-  test_sequence_container_spaceship_with_type();
-  test_sequence_container_spaceship_with_type();
-  test_sequence_container_spaceship_with_type();
-  test_sequence_container_spaceship_with_type();
+  test_sequence_container_spaceship_with_type, std::strong_ordering>();
+  test_sequence_container_spaceship_with_type,
+  std::strong_ordering>();
+  test_sequence_container_spaceship_with_type, std::weak_ordering>();
+  test_sequence_container_spaceship_with_type,
+  std::partial_ordering>();
 
   // `LessAndEqComp` does not have `operator<=>`. Ordering is synthesized 
based on `operator<`
-  test_sequence_container_spaceship_with_type();
+  test_sequence_container_spaceship_with_type,
+  std::weak_ordering>();
 
   // Thanks to SFINAE, the following is not a compiler error but returns 
`false`
   struct NonComparable {};
@@ -175,109 +185,114 @@ constexpr bool 
test_sequence_container_adaptor_spaceship() {
 }
 
 // Implementation detail of `test_ordered_map_container_spaceship`
-template  typename Container, typename Key, typename 
Val, typename O

[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fixes (|multi)_set spaceship operator. (#127326) (PR #127342)

2025-02-15 Thread via llvm-branch-commits

https://github.com/llvmbot milestoned 
https://github.com/llvm/llvm-project/pull/127342
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2025-02-15 Thread Michael Kruse via llvm-branch-commits

https://github.com/Meinersbur edited 
https://github.com/llvm/llvm-project/pull/110217
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits