summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-11-30 18:54:35 +0000
committerNate Begeman <natebegeman@mac.com>2005-11-30 18:54:35 +0000
commit6f8c1ace6e6091765137a321f55a830b544d6980 (patch)
tree6cf4dcfb538812f575819c53cafd480a4b4ec42d /llvm/utils/TableGen
parentf621b333f3dbfbab96ff763c679ae1fe4ab85ba7 (diff)
downloadbcm5719-llvm-6f8c1ace6e6091765137a321f55a830b544d6980.tar.gz
bcm5719-llvm-6f8c1ace6e6091765137a321f55a830b544d6980.zip
No longer track value types for asm printer operands, and remove them as
an argument to every operand printing function. Requires some slight tweaks to x86, the only user. llvm-svn: 24541
Diffstat (limited to 'llvm/utils/TableGen')
-rw-r--r--llvm/utils/TableGen/AsmWriterEmitter.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp
index eeabd8a0891..cc59aa105ad 100644
--- a/llvm/utils/TableGen/AsmWriterEmitter.cpp
+++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp
@@ -38,21 +38,16 @@ namespace {
/// machine instruction.
unsigned MIOpNo;
- /// OpVT - For isMachineInstrOperand, this is the value type for the
- /// operand.
- MVT::ValueType OpVT;
-
AsmWriterOperand(const std::string &LitStr)
- : OperandType(isLiteralTextOperand), Str(LitStr) {}
+ : OperandType(isLiteralTextOperand), Str(LitStr) {}
- AsmWriterOperand(const std::string &Printer, unsigned OpNo,
- MVT::ValueType VT) : OperandType(isMachineInstrOperand),
- Str(Printer), MIOpNo(OpNo), OpVT(VT){}
+ AsmWriterOperand(const std::string &Printer, unsigned OpNo)
+ : OperandType(isMachineInstrOperand), Str(Printer), MIOpNo(OpNo) {}
bool operator!=(const AsmWriterOperand &Other) const {
if (OperandType != Other.OperandType || Str != Other.Str) return true;
if (OperandType == isMachineInstrOperand)
- return MIOpNo != Other.MIOpNo || OpVT != Other.OpVT;
+ return MIOpNo != Other.MIOpNo;
return false;
}
bool operator==(const AsmWriterOperand &Other) const {
@@ -90,7 +85,7 @@ void AsmWriterOperand::EmitCode(std::ostream &OS) const {
if (OperandType == isLiteralTextOperand)
OS << "O << \"" << Str << "\"; ";
else
- OS << Str << "(MI, " << MIOpNo << ", MVT::" << getEnumName(OpVT) << "); ";
+ OS << Str << "(MI, " << MIOpNo << "); ";
}
@@ -204,8 +199,7 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant) {
--MIOp;
}
- Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName,
- MIOp, OpInfo.Ty));
+ Operands.push_back(AsmWriterOperand(OpInfo.PrinterMethodName, MIOp));
LastEmitted = VarEnd;
}
}
OpenPOWER on IntegriCloud