[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
Thu Jun 28 23:05:40 PDT 2018


craig.topper added a comment.

@greened, did you forget to Accept when you wrote LGTM or should I wait for another reviewer?



================
Comment at: lib/Target/X86/X86InstrInfo.cpp:5424
+           MemOp2RegOpTable.end() &&
+           "MemOp2RegOpTable is not unique!");
     assert(std::is_sorted(std::begin(MemoryFoldTable2Addr),
----------------
greened wrote:
> 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.
What would that look like? Do you just want to print the enum values from the failing row or do you want to try to turn that back into a string that a human could read?


Repository:
  rL LLVM

https://reviews.llvm.org/D48585





More information about the llvm-commits mailing list