diff options
author | Tim Northover <tnorthover@apple.com> | 2016-07-05 21:23:04 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-07-05 21:23:04 +0000 |
commit | e6ae6767d9e0f0e2083e4b4e3d731fbedc00a8ed (patch) | |
tree | 9f1928ad7ad9e10905c5d09f6cae9affd00d8c89 /llvm/utils/TableGen/TableGen.cpp | |
parent | 88403d7a840f09395e45bb1e0a757cf8362beb5a (diff) | |
download | llvm-e6ae6767d9e0f0e2083e4b4e3d731fbedc00a8ed.zip llvm-e6ae6767d9e0f0e2083e4b4e3d731fbedc00a8ed.tar.gz llvm-e6ae6767d9e0f0e2083e4b4e3d731fbedc00a8ed.tar.bz2 |
AArch64: TableGenerate system instruction operands.
The way the named arguments for various system instructions are handled at the
moment has a few problems:
- Large-scale duplication between AArch64BaseInfo.h and AArch64BaseInfo.cpp
- That weird Mapping class that I have no idea what I was on when I thought
it was a good idea.
- Searches are performed linearly through the entire list.
- We print absolutely all registers in upper-case, even though some are
canonically mixed case (SPSel for example).
- The ARM ARM specifies sysregs in terms of 5 fields, but those are relegated
to comments in our implementation, with a slightly opaque hex value
indicating the canonical encoding LLVM will use.
This adds a new TableGen backend to produce efficiently searchable tables, and
switches AArch64 over to using that infrastructure.
llvm-svn: 274576
Diffstat (limited to 'llvm/utils/TableGen/TableGen.cpp')
-rw-r--r-- | llvm/utils/TableGen/TableGen.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/TableGen.cpp b/llvm/utils/TableGen/TableGen.cpp index cf75123..24dbe5d 100644 --- a/llvm/utils/TableGen/TableGen.cpp +++ b/llvm/utils/TableGen/TableGen.cpp @@ -43,7 +43,8 @@ enum ActionType { PrintSets, GenOptParserDefs, GenCTags, - GenAttributes + GenAttributes, + GenSearchableTables, }; namespace { @@ -89,6 +90,8 @@ namespace { "Generate ctags-compatible index"), clEnumValN(GenAttributes, "gen-attrs", "Generate attributes"), + clEnumValN(GenSearchableTables, "gen-searchable-tables", + "Generate generic binary-searchable table"), clEnumValEnd)); cl::opt<std::string> @@ -172,6 +175,9 @@ bool LLVMTableGenMain(raw_ostream &OS, RecordKeeper &Records) { case GenAttributes: EmitAttributes(Records, OS); break; + case GenSearchableTables: + EmitSearchableTables(Records, OS); + break; } return false; |