[PATCH] D58787: [ProfileData] Sort ProfilingData by hash

Jonas Hahnfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 08:40:03 PST 2019


Hahnfeld created this revision.
Hahnfeld added reviewers: lebedev.ri, dblaikie, vsk, davidxl.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is expected by instr-remap.test and currently fails when building
LLVM with reverse-iteration: Use std::map instead of SmallDenseMap
which has no guarantees about ordering.


Repository:
  rL LLVM

https://reviews.llvm.org/D58787

Files:
  llvm/include/llvm/ProfileData/InstrProfWriter.h


Index: llvm/include/llvm/ProfileData/InstrProfWriter.h
===================================================================
--- llvm/include/llvm/ProfileData/InstrProfWriter.h
+++ llvm/include/llvm/ProfileData/InstrProfWriter.h
@@ -21,6 +21,7 @@
 #include "llvm/Support/Error.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include <cstdint>
+#include <map>
 #include <memory>
 
 namespace llvm {
@@ -32,7 +33,7 @@
 
 class InstrProfWriter {
 public:
-  using ProfilingData = SmallDenseMap<uint64_t, InstrProfRecord>;
+  using ProfilingData = std::map<uint64_t, InstrProfRecord>;
   enum ProfKind { PF_Unknown = 0, PF_FE, PF_IRLevel };
 
 private:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58787.188745.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190228/67cb9aff/attachment.bin>


More information about the llvm-commits mailing list