[llvm] [TableGen] Rework error reporting for duplicate Feature/Processor. (PR #102257)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 10:05:26 PDT 2024


================
@@ -289,20 +286,12 @@ unsigned SubtargetEmitter::FeatureKeyValues(
     printFeatureMask(OS, ImpliesList, FeatureMap);
 
     OS << " },\n";
-    ++NumFeatures;
-
-    auto [It, Inserted] = UniqueFeatures.insert({CommandLineName, Feature});
----------------
jurahul wrote:

Note the sort was always there. So this is still asymptotically O(n * log(n)) in both cases. The advantage is now this code is in a common function and can be shared.

https://github.com/llvm/llvm-project/pull/102257


More information about the llvm-commits mailing list