diff options
author | Andrew Trick <atrick@apple.com> | 2012-10-03 23:06:25 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-10-03 23:06:25 +0000 |
commit | fe05d98c253676d1ae6e0f03efde6b75fdae105d (patch) | |
tree | f60826629a442cb274bdad112a707241e65175f1 /utils | |
parent | d494a3bfc5a4c9a335775669cfd6d804bc88d00a (diff) |
Cleanup TableGen subtarget emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/CodeGenSchedule.cpp | 5 | ||||
-rw-r--r-- | utils/TableGen/SubtargetEmitter.cpp | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/utils/TableGen/CodeGenSchedule.cpp b/utils/TableGen/CodeGenSchedule.cpp index e54202e3f2..15af7a8ae2 100644 --- a/utils/TableGen/CodeGenSchedule.cpp +++ b/utils/TableGen/CodeGenSchedule.cpp @@ -72,9 +72,6 @@ CodeGenSchedModels::CodeGenSchedModels(RecordKeeper &RK, // Infer new SchedClasses from SchedVariant. inferSchedClasses(); - DEBUG(for (unsigned i = 0; i < SchedClasses.size(); ++i) - SchedClasses[i].dump(this)); - // Populate each CodeGenProcModel's WriteResDefs, ReadAdvanceDefs, and // ProcResourceDefs. collectProcResources(); @@ -475,7 +472,7 @@ void CodeGenSchedModels::collectSchedClasses() { RWI != RWE; ++RWI) { const CodeGenProcModel &ProcModel = getProcModel((*RWI)->getValueAsDef("SchedModel")); - dbgs() << "InstrRW on " << ProcModel.ModelName << " for " << InstName; + dbgs() << "InstRW on " << ProcModel.ModelName << " for " << InstName; IdxVec Writes; IdxVec Reads; findRWs((*RWI)->getValueAsListOfDefs("OperandReadWrites"), diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index 4127b379b1..f115af1016 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -11,6 +11,8 @@ // //===----------------------------------------------------------------------===// +#define DEBUG_TYPE "subtarget-emitter" + #include "CodeGenTarget.h" #include "CodeGenSchedule.h" #include "llvm/ADT/StringExtras.h" @@ -769,6 +771,8 @@ void SubtargetEmitter::GenSchedClassTables(const CodeGenProcModel &ProcModel, std::vector<MCSchedClassDesc> &SCTab = SchedTables.ProcSchedClasses.back(); for (CodeGenSchedModels::SchedClassIter SCI = SchedModels.schedClassBegin(), SCE = SchedModels.schedClassEnd(); SCI != SCE; ++SCI) { + DEBUG(SCI->dump(&SchedModels)); + SCTab.resize(SCTab.size() + 1); MCSchedClassDesc &SCDesc = SCTab.back(); // SCDesc.Name is guarded by NDEBUG @@ -817,8 +821,8 @@ void SubtargetEmitter::GenSchedClassTables(const CodeGenProcModel &ProcModel, } } else if (!SCI->InstRWs.empty()) { - assert(SCI->Writes.empty() && SCI->Reads.empty() && - "InstRW class should not have its own ReadWrites"); + // This class may have a default ReadWrite list which can be overriden by + // InstRW definitions. Record *RWDef = 0; for (RecIter RWI = SCI->InstRWs.begin(), RWE = SCI->InstRWs.end(); RWI != RWE; ++RWI) { |