With the static tables sorted we can binary search them directly for reg->mem lookups. This removes 6 DenseMaps that had to be created when X86InstrInfo is constructed.
We still have one Mem->Reg DenseMap for the reverse direction. This is created just as before by walking the reg->mem arrays to populate it.
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?