From 3138659646f3d60a7ee70d49cc03067e3f27a3dc Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 3 Oct 2012 06:26:11 +0000 Subject: Remove unused function that used to get itineraries from SubTargetFeatures. This is done from MCSubTargetInfo these days. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165092 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/SubtargetFeature.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'lib/MC/SubtargetFeature.cpp') diff --git a/lib/MC/SubtargetFeature.cpp b/lib/MC/SubtargetFeature.cpp index 153757994f..8a52284f29 100644 --- a/lib/MC/SubtargetFeature.cpp +++ b/lib/MC/SubtargetFeature.cpp @@ -336,30 +336,6 @@ uint64_t SubtargetFeatures::getFeatureBits(const StringRef CPU, return Bits; } -/// Get scheduling itinerary of a CPU. -const void *SubtargetFeatures::getItinerary(const StringRef CPU, - const SubtargetInfoKV *Table, - size_t TableSize) { - assert(Table && "missing table"); -#ifndef NDEBUG - for (size_t i = 1; i < TableSize; i++) { - assert(strcmp(Table[i - 1].Key, Table[i].Key) < 0 && "Table is not sorted"); - } -#endif - - // Find entry - const SubtargetInfoKV *Entry = Find(CPU, Table, TableSize); - - if (Entry) { - return Entry->Value; - } else { - errs() << "'" << CPU - << "' is not a recognized processor for this target" - << " (ignoring processor)\n"; - return NULL; - } -} - /// print - Print feature string. /// void SubtargetFeatures::print(raw_ostream &OS) const { -- cgit v1.2.3-18-g5258 From 266eff8539116261b3cc0775205a34663afecb52 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 4 Oct 2012 05:18:31 +0000 Subject: Remove template from function that is only used with one type after r165092. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165203 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/SubtargetFeature.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/MC/SubtargetFeature.cpp') diff --git a/lib/MC/SubtargetFeature.cpp b/lib/MC/SubtargetFeature.cpp index 8a52284f29..378c4184a8 100644 --- a/lib/MC/SubtargetFeature.cpp +++ b/lib/MC/SubtargetFeature.cpp @@ -119,14 +119,15 @@ void SubtargetFeatures::AddFeature(const StringRef String, } /// Find KV in array using binary search. -template const T *Find(const StringRef S, const T *A, size_t L) { +const SubtargetFeatureKV *Find(const StringRef S, const SubtargetFeatureKV *A, + size_t L) { // Make the lower bound element we're looking for - T KV; + SubtargetFeatureKV KV; KV.Key = S.data(); // Determine the end of the array - const T *Hi = A + L; + const SubtargetFeatureKV *Hi = A + L; // Binary search the array - const T *F = std::lower_bound(A, Hi, KV); + const SubtargetFeatureKV *F = std::lower_bound(A, Hi, KV); // If not found then return NULL if (F == Hi || StringRef(F->Key) != S) return NULL; // Return the found array item -- cgit v1.2.3-18-g5258