[PassInstrumentation] Use DenseMap to store class->pass map (NFC)

It's okay to store the StringRef for the class name without
creating a separate copy inside the map, so use DenseMap instead
of StringMap.
This commit is contained in:
Nikita Popov 2024-06-21 11:38:17 +02:00
parent 57c083ecfb
commit 53a059ca76

View File

@ -52,7 +52,7 @@
#include "llvm/ADT/Any.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/IR/PassManager.h"
#include <type_traits>
#include <vector>
@ -185,7 +185,7 @@ private:
SmallVector<llvm::unique_function<AnalysesClearedFunc>, 4>
AnalysesClearedCallbacks;
StringMap<std::string> ClassToPassName;
DenseMap<StringRef, std::string> ClassToPassName;
};
/// This class provides instrumentation entry points for the Pass Manager,