[llvm] [TableGen] Rework error reporting for duplicate Feature/Processor. (PR #102257)
Tomas Matheson via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 7 09:40:54 PDT 2024
================
@@ -289,20 +286,12 @@ unsigned SubtargetEmitter::FeatureKeyValues(
printFeatureMask(OS, ImpliesList, FeatureMap);
OS << " },\n";
- ++NumFeatures;
-
- auto [It, Inserted] = UniqueFeatures.insert({CommandLineName, Feature});
----------------
tmatheson-arm wrote:
It seems we have gone from:
- one O(n) loop over the features at line 272, with an O(1) check of `UniqueFeatures`,
to:
- one complete sort of the features (n*O(log(n)) I think?) plus two O(n) loops over the features (`std::adjacent_find` + line 272),
which looks like a performance regression. Having said that, it probably doesn't really matter for this workload.
https://github.com/llvm/llvm-project/pull/102257
More information about the llvm-commits
mailing list