[PATCH] D48585: [X86] Use a std::vector for the memory unfolding vector.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 23:03:42 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.

Previously we used a DenseMap which is costly to setup due to multiple full table rehashes as the size increases and causes the table to be reallocated.

This patch changes the table to a vector of structs. We now walk the reg->mem tables and push new entries in the mem->reg table for each row not marked TB_NO_REVERSE. Once all the table entries have been created, we sort the vector. Then we can use a binary search for lookups.


Repository:
  rL LLVM

https://reviews.llvm.org/D48585

Files:
  lib/Target/X86/X86InstrInfo.cpp
  lib/Target/X86/X86InstrInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48585.152840.patch
Type: text/x-patch
Size: 5917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180626/7c922000/attachment.bin>


More information about the llvm-commits mailing list