[PATCH] D38028: [X86][TableGen] Recommitting the X86 memory folding tables TableGen backend while disabling it by default.

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 01:39:53 PDT 2017


aymanmus created this revision.
Herald added a subscriber: mgorny.

After the original commit (rL304088 <https://reviews.llvm.org/rL304088>) was reverted, a discussion in llvm-dev was opened on 'how to accomplish this task'.
In the discussion we concluded that the best way to achieve our goal (which is to automate the folding tables and remove the manually maintained tables) is:

1. Commit the tablegen backend disabled by default.
2. Proceed with an incremental updating of the manual tables - while checking the validity of each added entry.
3. Repeat previous step until we reach a state where the generated and the manual tables are identical. Then we can safely remove the manual tables and include the generated tables instead.
4. Schedule periodical (1 week/2 weeks/1 month) runs of the pass:
  - if changes appear (new entries):
    - make sure the entries are legal
    - If they are not, mark them as illegal to folding
  - Commit the changes (if there are any).

CMake flag added for this purpose is "X86_GEN_FOLD_TABLES". Building with this flags will run the pass and emit the X86GenFoldTables.inc file under build/lib/Target/X86/ directory which is a good reference for any developer who wants to take part in the effort of completing the current folding tables.


https://reviews.llvm.org/D38028

Files:
  lib/Target/X86/CMakeLists.txt
  utils/TableGen/CMakeLists.txt
  utils/TableGen/TableGen.cpp
  utils/TableGen/TableGenBackends.h
  utils/TableGen/X86FoldTablesEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38028.115804.patch
Type: text/x-patch
Size: 29259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170919/a6687126/attachment.bin>


More information about the llvm-commits mailing list