summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeEmitterGen.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-08-07 14:21:18 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-08-07 14:21:18 +0000
commitf8b27c41e84cefba4be361b96cc0bd545e1dc64d (patch)
tree30da06ab749221027f133c39c8d85ade1bdc2807 /llvm/utils/TableGen/CodeEmitterGen.cpp
parent84d35dfe962dcac4833381e5bd52eddcbcb91662 (diff)
downloadbcm5719-llvm-f8b27c41e84cefba4be361b96cc0bd545e1dc64d.tar.gz
bcm5719-llvm-f8b27c41e84cefba4be361b96cc0bd545e1dc64d.zip
Nuke the old JIT.
I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! llvm-svn: 215111
Diffstat (limited to 'llvm/utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r--llvm/utils/TableGen/CodeEmitterGen.cpp26
1 files changed, 6 insertions, 20 deletions
diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp
index 4d0c0ca8e70..11911b63b7b 100644
--- a/llvm/utils/TableGen/CodeEmitterGen.cpp
+++ b/llvm/utils/TableGen/CodeEmitterGen.cpp
@@ -24,14 +24,6 @@
#include <vector>
using namespace llvm;
-// FIXME: Somewhat hackish to use a command line option for this. There should
-// be a CodeEmitter class in the Target.td that controls this sort of thing
-// instead.
-static cl::opt<bool>
-MCEmitter("mc-emitter",
- cl::desc("Generate CodeEmitter for use with the MC library."),
- cl::init(false));
-
namespace {
class CodeEmitterGen {
@@ -134,15 +126,13 @@ AddCodeToMergeInOperand(Record *R, BitsInit *BI, const std::string &VarName,
if (SO.second == 0) {
Case += " // op: " + VarName + "\n" +
" op = " + EncoderMethodName + "(MI, " + utostr(OpIdx);
- if (MCEmitter)
- Case += ", Fixups, STI";
+ Case += ", Fixups, STI";
Case += ");\n";
}
} else {
Case += " // op: " + VarName + "\n" +
" op = getMachineOpValue(MI, MI.getOperand(" + utostr(OpIdx) + ")";
- if (MCEmitter)
- Case += ", Fixups, STI";
+ Case += ", Fixups, STI";
Case += ");\n";
}
@@ -223,8 +213,7 @@ std::string CodeEmitterGen::getInstructionCase(Record *R,
std::string PostEmitter = R->getValueAsString("PostEncoderMethod");
if (!PostEmitter.empty()) {
Case += " Value = " + PostEmitter + "(MI, Value";
- if (MCEmitter)
- Case += ", STI";
+ Case += ", STI";
Case += ");\n";
}
@@ -243,12 +232,9 @@ void CodeEmitterGen::run(raw_ostream &o) {
// Emit function declaration
o << "uint64_t " << Target.getName();
- if (MCEmitter)
- o << "MCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,\n"
- << " SmallVectorImpl<MCFixup> &Fixups,\n"
- << " const MCSubtargetInfo &STI) const {\n";
- else
- o << "CodeEmitter::getBinaryCodeForInstr(const MachineInstr &MI) const {\n";
+ o << "MCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,\n"
+ << " SmallVectorImpl<MCFixup> &Fixups,\n"
+ << " const MCSubtargetInfo &STI) const {\n";
// Emit instruction base values
o << " static const uint64_t InstBits[] = {\n";
OpenPOWER on IntegriCloud