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

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 02:09:47 PST 2024


Author: tltao
Date: 2024-01-23T11:09:43+01:00
New Revision: fd9b33754198972b835f05ce58d8bb9f0ac8ff7e

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

LOG: [TLI] Remove leftover assert in TargetLibraryInfoImpl initialize (#79056)

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

The original getLibFunc binary search implementation is in commit
c740e3f0d1ca9690100160ed2708d97d3c6562f0.

Co-authored-by: Tony Tao <tonytao at ca.ibm.com>

Added: 
    

Modified: 
    llvm/lib/Analysis/TargetLibraryInfo.cpp

Removed: 
    


################################################################################
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