From 3022ad0c876251a55a5408a5c7c56042d96a68d1 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 21 Aug 2019 21:17:34 +0000 Subject: [PATCH] Use C++14 heteregenous lookup for a couple of std::map These call find with a StringRef, heterogenous lookup saves a temporary std::string there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369581 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Attributes.h | 2 +- include/llvm/ProfileData/SampleProf.h | 2 +- include/llvm/TableGen/Record.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index 4efa3a9821c..719b9992cce 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -705,7 +705,7 @@ template <> struct DenseMapInfo { /// equality, presence of attributes, etc. class AttrBuilder { std::bitset Attrs; - std::map TargetDepAttrs; + std::map> TargetDepAttrs; MaybeAlign Alignment; MaybeAlign StackAlignment; uint64_t DerefBytes = 0; diff --git a/include/llvm/ProfileData/SampleProf.h b/include/llvm/ProfileData/SampleProf.h index 453e1a08bd0..37cdb5cf2ba 100644 --- a/include/llvm/ProfileData/SampleProf.h +++ b/include/llvm/ProfileData/SampleProf.h @@ -228,7 +228,7 @@ class FunctionSamples; using BodySampleMap = std::map; // NOTE: Using a StringMap here makes parsed profiles consume around 17% more // memory, which is *very* significant for large profiles. -using FunctionSamplesMap = std::map; +using FunctionSamplesMap = std::map>; using CallsiteSampleMap = std::map; /// Representation of the samples collected for a function. diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index 6a3e2a9169e..606ab1c901b 100644 --- a/include/llvm/TableGen/Record.h +++ b/include/llvm/TableGen/Record.h @@ -1687,10 +1687,10 @@ raw_ostream &operator<<(raw_ostream &OS, const Record &R); class RecordKeeper { friend class RecordRecTy; - using RecordMap = std::map>; + using RecordMap = std::map, std::less<>>; RecordMap Classes, Defs; FoldingSet RecordTypePool; - std::map ExtraGlobals; + std::map> ExtraGlobals; unsigned AnonCounter = 0; public: -- 2.40.0