[PATCH] D48585: [X86] Use a std::vector for the memory unfolding vector.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 29 06:14:04 PDT 2018
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM - better error reporting would be great but not mandatory.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:5424
+ MemOp2RegOpTable.end() &&
+ "MemOp2RegOpTable is not unique!");
assert(std::is_sorted(std::begin(MemoryFoldTable2Addr),
----------------
craig.topper wrote:
> 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?
Anything that can be used to debug would be useful - enums are easy enough to work with as you can manually look them up in X86GenInstrInfo.inc - but an actual string would be even better.
Repository:
rL LLVM
https://reviews.llvm.org/D48585
More information about the llvm-commits
mailing list