[PATCH] D48527: [X86] Sort the static memory folding tables by reg opcode. Remove the reg->mem DenseMaps in favor of binary search.
David Greene via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 25 12:20:56 PDT 2018
greened added inline comments.
================
Comment at: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp:123
+
+static const X86MemoryFoldTableEntry MemoryFoldTable2Addr[] = {
+ { X86::ADC16ri, X86::ADC16mi, 0 },
----------------
Whoa. So developers are expected to keep these tables sorted, with no comment to that effect and no convenient numeric indication of the opcode values? This seems like a recipe for mistakes to me. Instead of asserting that the tables are sorted below, why not just sort them? Is it too expensive?
Repository:
rL LLVM
https://reviews.llvm.org/D48527
More information about the llvm-commits
mailing list