[llvm] r232132 - Use the variable names from the TargetInstrInfo source when we
Eric Christopher
echristo at gmail.com
Thu Mar 12 18:26:39 PDT 2015
Author: echristo
Date: Thu Mar 12 20:26:39 2015
New Revision: 232132
URL: http://llvm.org/viewvc/llvm-project?rev=232132&view=rev
Log:
Use the variable names from the TargetInstrInfo source when we
reference them in the generated files. A few characters aren't huge
here and CFSetupOpcode is much more readable than S0.
Modified:
llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=232132&r1=232131&r2=232132&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Thu Mar 12 20:26:39 2015
@@ -430,7 +430,8 @@ void InstrInfoEmitter::run(raw_ostream &
std::string ClassName = TargetName + "GenInstrInfo";
OS << "namespace llvm {\n";
OS << "struct " << ClassName << " : public TargetInstrInfo {\n"
- << " explicit " << ClassName << "(int SO = -1, int DO = -1);\n"
+ << " explicit " << ClassName
+ << "(int CFSetupOpcode = -1, int CFDestroyOpcode = -1);\n"
<< " virtual ~" << ClassName << "();\n"
<< "};\n";
OS << "} // End llvm namespace \n";
@@ -444,10 +445,11 @@ void InstrInfoEmitter::run(raw_ostream &
OS << "extern const MCInstrDesc " << TargetName << "Insts[];\n";
OS << "extern const unsigned " << TargetName << "InstrNameIndices[];\n";
OS << "extern const char " << TargetName << "InstrNameData[];\n";
- OS << ClassName << "::" << ClassName << "(int SO, int DO)\n"
- << " : TargetInstrInfo(SO, DO) {\n"
- << " InitMCInstrInfo(" << TargetName << "Insts, "
- << TargetName << "InstrNameIndices, " << TargetName << "InstrNameData, "
+ OS << ClassName << "::" << ClassName
+ << "(int CFSetupOpcode, int CFDestroyOpcode)\n"
+ << " : TargetInstrInfo(CFSetupOpcode, CFDestroyOpcode) {\n"
+ << " InitMCInstrInfo(" << TargetName << "Insts, " << TargetName
+ << "InstrNameIndices, " << TargetName << "InstrNameData, "
<< NumberedInstructions.size() << ");\n}\n"
<< ClassName << "::~" << ClassName << "() {}\n";
OS << "} // End llvm namespace \n";
More information about the llvm-commits
mailing list