#include "RegisterInfoEmitter.h"
#include "InstrInfoEmitter.h"
#include "InstrSelectorEmitter.h"
-#include "SimpleInstrSelEmitter.h"
#include <algorithm>
#include <cstdio>
#include <fstream>
-
-namespace llvm {
+using namespace llvm;
enum ActionType {
PrintRecords,
GenRegisterEnums, GenRegister, GenRegisterHeader,
GenInstrEnums, GenInstrs, GenInstrSelector,
PrintEnums,
- Parse, GenSimpInstrSel,
+ Parse
};
namespace {
"Generate instruction descriptions"),
clEnumValN(GenInstrSelector, "gen-instr-selector",
"Generate an instruction selector"),
- clEnumValN(GenSimpInstrSel, "gen-simp-instr-sel",
- "Generate a simple instruction selector"),
clEnumValN(PrintEnums, "print-enums",
"Print enum values for a class"),
clEnumValN(Parse, "parse",
"Interpret machine code (testing only)"),
- 0));
+ clEnumValEnd));
cl::opt<std::string>
Class("class", cl::desc("Print Enum list for this class"),
cl::value_desc("directory"), cl::init(""));
}
+namespace llvm {
+ void ParseFile(const std::string &Filename,
+ const std::string &IncludeDir);
+}
-void ParseFile(const std::string &Filename, const std::string & IncludeDir);
-
-RecordKeeper Records;
+RecordKeeper llvm::Records;
static Init *getBit(Record *R, unsigned BitNo) {
const std::vector<RecordVal> &V = R->getValues();
}
}
-} // End llvm namespace
-
-using namespace llvm;
-
int main(int argc, char **argv) {
cl::ParseCommandLineOptions(argc, argv);
ParseFile(InputFilename, IncludeDir);
*Out << "\n";
break;
}
- case GenSimpInstrSel:
- SimpleInstrSelEmitter(Records).run(*Out);
- break;
default:
assert(1 && "Invalid Action");
return 1;