aboutsummaryrefslogtreecommitdiffstats
path: root/support/tools/TableGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-06 04:47:56 +0000
committerChris Lattner <sabre@nondot.org>2003-08-06 04:47:56 +0000
commit3f781341f97da31bfee55bc221ff58b76e7a60df (patch)
tree9d87f3209f1d00b38fbb40e4ba1dff671396398d /support/tools/TableGen
parent0e5e49e6888c354ff95fc9e56d0881af78cb4269 (diff)
downloadexternal_llvm-3f781341f97da31bfee55bc221ff58b76e7a60df.zip
external_llvm-3f781341f97da31bfee55bc221ff58b76e7a60df.tar.gz
external_llvm-3f781341f97da31bfee55bc221ff58b76e7a60df.tar.bz2
Add an instruction selector emitter skeleton
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'support/tools/TableGen')
-rw-r--r--support/tools/TableGen/TableGen.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/support/tools/TableGen/TableGen.cpp b/support/tools/TableGen/TableGen.cpp
index 8a22c54..8c9f550 100644
--- a/support/tools/TableGen/TableGen.cpp
+++ b/support/tools/TableGen/TableGen.cpp
@@ -15,6 +15,7 @@
#include "CodeEmitterGen.h"
#include "RegisterInfoEmitter.h"
#include "InstrInfoEmitter.h"
+#include "InstrSelectorEmitter.h"
#include <algorithm>
#include <fstream>
@@ -22,7 +23,7 @@ enum ActionType {
PrintRecords,
GenEmitter,
GenRegisterEnums, GenRegister, GenRegisterHeader,
- GenInstrEnums, GenInstrs,
+ GenInstrEnums, GenInstrs, GenInstrSelector,
PrintEnums,
Parse,
};
@@ -44,6 +45,8 @@ namespace {
"Generate enum values for instructions"),
clEnumValN(GenInstrs, "gen-instr-desc",
"Generate instruction descriptions"),
+ clEnumValN(GenInstrSelector, "gen-instr-selector",
+ "Generate an instruction selector"),
clEnumValN(PrintEnums, "print-enums",
"Print enum values for a class"),
clEnumValN(Parse, "parse",
@@ -440,7 +443,9 @@ int main(int argc, char **argv) {
case GenInstrs:
InstrInfoEmitter(Records).run(*Out);
break;
-
+ case GenInstrSelector:
+ InstrSelectorEmitter(Records).run(*Out);
+ break;
case PrintEnums:
std::vector<Record*> Recs = Records.getAllDerivedDefinitions(Class);
for (unsigned i = 0, e = Recs.size(); i != e; ++i)