[llvm] [TLI] Remove leftover assert in TargetLibraryInfoImpl initialize (PR #79056)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 22 12:55:02 PST 2024


https://github.com/tltao created https://github.com/llvm/llvm-project/pull/79056

Remove unnecessary assert for a sorted StandardNames after implementation of getLibFunc is changed from binary search to a DenseMap Lookup in commit 7d950f040e3da66ec83f91b58d8c2220483d6335.

>From e8e3b88924546072e3cbd4e3a51acd4ab19c6630 Mon Sep 17 00:00:00 2001
From: Tony Tao <tonytao at ca.ibm.com>
Date: Mon, 22 Jan 2024 15:39:44 -0500
Subject: [PATCH] Remove leftover assert after binary search implementation of
 getLibFunc is replaced with DenseMap Lookup.

Original PR: https://reviews.llvm.org/D157951
---
 llvm/lib/Analysis/TargetLibraryInfo.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index 58749e559040a74..25951d2a7fe63c5 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -163,12 +163,6 @@ bool TargetLibraryInfoImpl::isCallingConvCCompatible(Function *F) {
 /// triple gets a sane set of defaults.
 static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
                        ArrayRef<StringLiteral> StandardNames) {
-  // Verify that the StandardNames array is in alphabetical order.
-  assert(
-      llvm::is_sorted(StandardNames,
-                      [](StringRef LHS, StringRef RHS) { return LHS < RHS; }) &&
-      "TargetLibraryInfoImpl function names must be sorted");
-
   // Set IO unlocked variants as unavailable
   // Set them as available per system below
   TLI.setUnavailable(LibFunc_getc_unlocked);



More information about the llvm-commits mailing list