mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
Fix generation of multi-stage instruction itineraries. Patch by
giuma.cordes@gmail.com git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
af4fc28b56
commit
d963ab1f58
@ -272,6 +272,7 @@ void SubtargetEmitter::EmitStageData(std::ostream &OS,
|
||||
OS << "static const llvm::InstrStage Stages[] = {\n"
|
||||
" { 0, 0 }, // No itinerary\n";
|
||||
|
||||
unsigned StageCount = 1;
|
||||
unsigned ItinEnum = 1;
|
||||
std::map<std::string, unsigned> ItinMap;
|
||||
for (unsigned i = 0, N = ProcItinList.size(); i < N; i++) {
|
||||
@ -308,8 +309,10 @@ void SubtargetEmitter::EmitStageData(std::ostream &OS,
|
||||
if (Find == 0) {
|
||||
// Emit as { cycles, u1 | u2 | ... | un }, // index
|
||||
OS << ItinString << ", // " << ItinEnum << "\n";
|
||||
// Record Itin class number
|
||||
ItinMap[ItinString] = Find = ItinEnum++;
|
||||
// Record Itin class number.
|
||||
ItinMap[ItinString] = Find = StageCount;
|
||||
StageCount += NStages;
|
||||
ItinEnum++;
|
||||
}
|
||||
|
||||
// Set up itinerary as location and location + stage count
|
||||
|
Loading…
Reference in New Issue
Block a user