summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-09-18 03:55:55 +0000
committerAndrew Trick <atrick@apple.com>2012-09-18 03:55:55 +0000
commite3dbc98a4fc2a31102e4ace6317eac9cf16afb9c (patch)
tree9841d9393899638dd2445a567160048a16ee2025 /utils
parent4d2d1c49d7262c55302a6ffd995e5e13fe522091 (diff)
downloadexternal_llvm-e3dbc98a4fc2a31102e4ace6317eac9cf16afb9c.zip
external_llvm-e3dbc98a4fc2a31102e4ace6317eac9cf16afb9c.tar.gz
external_llvm-e3dbc98a4fc2a31102e4ace6317eac9cf16afb9c.tar.bz2
TableGen subtarget emitter. Use getSchedClassIdx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/CodeGenSchedule.h9
-rw-r--r--utils/TableGen/InstrInfoEmitter.cpp3
2 files changed, 1 insertions, 11 deletions
diff --git a/utils/TableGen/CodeGenSchedule.h b/utils/TableGen/CodeGenSchedule.h
index 992ae82..0c86944 100644
--- a/utils/TableGen/CodeGenSchedule.h
+++ b/utils/TableGen/CodeGenSchedule.h
@@ -304,15 +304,6 @@ public:
return SchedClasses[Idx];
}
- // Get an itinerary class's index. Value indices are '0' for NoItinerary up to
- // and including numItineraryClasses().
- unsigned getItinClassIdx(Record *ItinDef) const {
- assert(SchedClassIdxMap.count(ItinDef->getName()) && "missing ItinClass");
- unsigned Idx = SchedClassIdxMap.lookup(ItinDef->getName());
- assert(Idx <= NumItineraryClasses && "bad ItinClass index");
- return Idx;
- }
-
// Get the SchedClass index for an instruction. Instructions with no
// itinerary, no SchedReadWrites, and no InstrReadWrites references return 0
// for NoItinerary.
diff --git a/utils/TableGen/InstrInfoEmitter.cpp b/utils/TableGen/InstrInfoEmitter.cpp
index b41ad94..79602da 100644
--- a/utils/TableGen/InstrInfoEmitter.cpp
+++ b/utils/TableGen/InstrInfoEmitter.cpp
@@ -304,11 +304,10 @@ void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num,
MinOperands = Inst.Operands.back().MIOperandNo +
Inst.Operands.back().MINumOperands;
- Record *ItinDef = Inst.TheDef->getValueAsDef("Itinerary");
OS << " { ";
OS << Num << ",\t" << MinOperands << ",\t"
<< Inst.Operands.NumDefs << ",\t"
- << SchedModels.getItinClassIdx(ItinDef) << ",\t"
+ << SchedModels.getSchedClassIdx(Inst) << ",\t"
<< Inst.TheDef->getValueAsInt("Size") << ",\t0";
// Emit all of the target indepedent flags...