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

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 28 10:35:52 PST 2019


mgrang added a comment.

Sorry, I just saw this now. I had a patch to fix this issue (but I didn't get time to follow-up on it). See D57986 <https://reviews.llvm.org/D57986>.

instr-remap.test is failing because FunctionData is iterated in InstrProfWriter to output function counts, etc. But for two functions with the same name the iteration order is not defined if we use a DenseMap. One way to resolve this is to use an ordered container like MapVector.

Another way to resolve this is to sort FunctionData before iteration. In fact, that is what the reviwers of D57986 <https://reviews.llvm.org/D57986> suggested.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58787/new/

https://reviews.llvm.org/D58787





More information about the llvm-commits mailing list