[llvm-commits] [PATCH] Clean up RegOp2MemOp tables in X86InstrInfo.cpp

David Meyer pdox at google.com
Mon Sep 5 21:40:17 PDT 2011


Hello!

This patch:

* Combines Alignment, AuxInfo, and TB_NOT_REVERSABLE flag into a
single field (Flags), which is a bitwise OR of items from the TB_*
enum. This makes it easier to add new information in the future.

* Gives every static array an equivalent layout: { RegOp, MemOp, Flags }

* Adds a helper function, AddTableEntry, to avoid duplication of the
insertion code.

* Renames TB_NOT_REVERSABLE to TB_NO_REVERSE.

* Adds TB_NO_FORWARD, which is analogous to TB_NO_REVERSE, except that
it prevents addition of the Reg->Mem entry. (This is going to be used
by Native Client, in the next CL).

Unfortunately, this patch looks like a lot bigger than it is, because
the spacing adjustments confuse diff. Here is a visual diff which are
slightly easier to follow:

http://codereview.chromium.org/7834034  (click View)

(Reminder: I do not have commit access; if you approve, please commit!)

- pdox
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reg2mem.patch
Type: application/octet-stream
Size: 69339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110905/32fb99c4/attachment.obj>


More information about the llvm-commits mailing list