ArrayRef-ize the Feature and Processor tables for SubtargetFeatures.

This removes arguments passed everywhere and allows the use of
standard iteration over lists.
Should be no functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208127 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-05-06 20:23:04 +00:00
parent 3949749701
commit d474181920
5 changed files with 73 additions and 98 deletions
+12 -12
View File
@@ -1454,11 +1454,11 @@ void SubtargetEmitter::run(raw_ostream &OS) {
if (NumFeatures)
OS << Target << "FeatureKV, ";
else
OS << "0, ";
OS << "None, ";
if (NumProcs)
OS << Target << "SubTypeKV, ";
else
OS << "0, ";
OS << "None, ";
OS << '\n'; OS.indent(22);
OS << Target << "ProcSchedKV, "
<< Target << "WriteProcResTable, "
@@ -1468,10 +1468,10 @@ void SubtargetEmitter::run(raw_ostream &OS) {
OS << '\n'; OS.indent(22);
OS << Target << "Stages, "
<< Target << "OperandCycles, "
<< Target << "ForwardingPaths, ";
<< Target << "ForwardingPaths";
} else
OS << "0, 0, 0, ";
OS << NumFeatures << ", " << NumProcs << ");\n}\n\n";
OS << "0, 0, 0";
OS << ");\n}\n\n";
OS << "} // End llvm namespace \n";
@@ -1532,13 +1532,13 @@ void SubtargetEmitter::run(raw_ostream &OS) {
<< " : TargetSubtargetInfo() {\n"
<< " InitMCSubtargetInfo(TT, CPU, FS, ";
if (NumFeatures)
OS << Target << "FeatureKV, ";
OS << "makeArrayRef(" << Target << "FeatureKV, " << NumFeatures << "), ";
else
OS << "0, ";
OS << "None, ";
if (NumProcs)
OS << Target << "SubTypeKV, ";
OS << "makeArrayRef(" << Target << "SubTypeKV, " << NumProcs << "), ";
else
OS << "0, ";
OS << "None, ";
OS << '\n'; OS.indent(22);
OS << Target << "ProcSchedKV, "
<< Target << "WriteProcResTable, "
@@ -1548,10 +1548,10 @@ void SubtargetEmitter::run(raw_ostream &OS) {
if (SchedModels.hasItineraries()) {
OS << Target << "Stages, "
<< Target << "OperandCycles, "
<< Target << "ForwardingPaths, ";
<< Target << "ForwardingPaths";
} else
OS << "0, 0, 0, ";
OS << NumFeatures << ", " << NumProcs << ");\n}\n\n";
OS << "0, 0, 0";
OS << ");\n}\n\n";
EmitSchedModelHelpers(ClassName, OS);