[PATCH] D48585: [X86] Use a std::vector for the memory unfolding vector.
David Greene via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 28 14:26:19 PDT 2018
greened added a comment.
LGTM.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:5424
+ MemOp2RegOpTable.end() &&
+ "MemOp2RegOpTable is not unique!");
assert(std::is_sorted(std::begin(MemoryFoldTable2Addr),
----------------
One thing I have wanted with the previous assert is to dump the duplicate entry so I know what to look for. That's probably a separate change, but a useful one, I think. I've been bitten by this before and it's a pain to figure out what happened. Since this is under NDEBUG it seems like we can do a little more work here to inform about what's going on.
================
Comment at: lib/Target/X86/X86InstrInfo.h:175
+ uint16_t Flags;
+
+ bool operator<(const MemOp2RegOpTableTypeEntry &RHS) const {
----------------
Wonderful!
Repository:
rL LLVM
https://reviews.llvm.org/D48585
More information about the llvm-commits
mailing list