diff options
author | David Goodwin <david_goodwin@apple.com> | 2009-08-12 18:31:53 +0000 |
---|---|---|
committer | David Goodwin <david_goodwin@apple.com> | 2009-08-12 18:31:53 +0000 |
commit | 1a8f36e3ce5b9c230781b66600c81536128abfb5 (patch) | |
tree | bd61effd4e8892ef92fa3c21b5e66933c0b74ad5 /utils/TableGen | |
parent | 4e97a0f0cb1b1b266d2653e44eb31374f2685c2b (diff) | |
download | external_llvm-1a8f36e3ce5b9c230781b66600c81536128abfb5.zip external_llvm-1a8f36e3ce5b9c230781b66600c81536128abfb5.tar.gz external_llvm-1a8f36e3ce5b9c230781b66600c81536128abfb5.tar.bz2 |
Enhance the InstrStage object to enable the specification of an Itinerary with overlapping stages. The default is to maintain the current behavior that the "next" stage immediately follows the previous one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78827 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/SubtargetEmitter.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index 919ac66..4a0bacd 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -215,7 +215,7 @@ void SubtargetEmitter::FormItineraryString(Record *ItinData, // Next stage const Record *Stage = StageList[i]; - // Form string as ,{ cycles, u1 | u2 | ... | un } + // Form string as ,{ cycles, u1 | u2 | ... | un, timeinc } int Cycles = Stage->getValueAsInt("Cycles"); ItinString += " { " + itostr(Cycles) + ", "; @@ -229,6 +229,9 @@ void SubtargetEmitter::FormItineraryString(Record *ItinData, if (++j < M) ItinString += " | "; } + int TimeInc = Stage->getValueAsInt("TimeInc"); + ItinString += ", " + itostr(TimeInc); + // Close off stage ItinString += " }"; if (++i < N) ItinString += ", "; @@ -252,7 +255,7 @@ void SubtargetEmitter::EmitStageData(raw_ostream &OS, // Begin stages table OS << "static const llvm::InstrStage Stages[] = {\n" - " { 0, 0 }, // No itinerary\n"; + " { 0, 0, 0 }, // No itinerary\n"; unsigned StageCount = 1; unsigned ItinEnum = 1; @@ -289,7 +292,7 @@ void SubtargetEmitter::EmitStageData(raw_ostream &OS, // If new itinerary if (Find == 0) { - // Emit as { cycles, u1 | u2 | ... | un }, // index + // Emit as { cycles, u1 | u2 | ... | un, timeinc }, // index OS << ItinString << ", // " << ItinEnum << "\n"; // Record Itin class number. ItinMap[ItinString] = Find = StageCount; @@ -313,7 +316,7 @@ void SubtargetEmitter::EmitStageData(raw_ostream &OS, } // Closing stage - OS << " { 0, 0 } // End itinerary\n"; + OS << " { 0, 0, 0 } // End itinerary\n"; // End stages table OS << "};\n"; |