diff options
-rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 2 | ||||
-rw-r--r-- | llvm/utils/TableGen/CodeGenSchedule.cpp | 8 | ||||
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 2 | ||||
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.h | 3 | ||||
-rw-r--r-- | llvm/utils/TableGen/InstrInfoEmitter.cpp | 4 |
5 files changed, 8 insertions, 11 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index 6e9a9484dc8..80da342906c 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -1400,7 +1400,7 @@ void AsmMatcherInfo::buildInfo() { AsmVariant->getValueAsString("BreakCharacters"); Variant.AsmVariantNo = AsmVariant->getValueAsInt("Variant"); - for (const CodeGenInstruction *CGI : Target.instructions()) { + for (const CodeGenInstruction *CGI : Target.getInstructionsByEnumValue()) { // If the tblgen -match-prefix option is specified (for tblgen hackers), // filter the set of instructions we consider. diff --git a/llvm/utils/TableGen/CodeGenSchedule.cpp b/llvm/utils/TableGen/CodeGenSchedule.cpp index c98f6234534..ecae859c9dd 100644 --- a/llvm/utils/TableGen/CodeGenSchedule.cpp +++ b/llvm/utils/TableGen/CodeGenSchedule.cpp @@ -68,7 +68,7 @@ struct InstRegexOp : public SetTheory::Operator { } RegexList.push_back(Regex(pat)); } - for (const CodeGenInstruction *Inst : Target.instructions()) { + for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) { for (auto &R : RegexList) { if (R.match(Inst->TheDef->getName())) Elts.insert(Inst->TheDef); @@ -204,7 +204,7 @@ void CodeGenSchedModels::collectSchedRW() { // Find all SchedReadWrites referenced by instruction defs. RecVec SWDefs, SRDefs; - for (const CodeGenInstruction *Inst : Target.instructions()) { + for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) { Record *SchedDef = Inst->TheDef; if (SchedDef->isValueUnset("SchedRW")) continue; @@ -498,7 +498,7 @@ void CodeGenSchedModels::collectSchedClasses() { // Create a SchedClass for each unique combination of itinerary class and // SchedRW list. - for (const CodeGenInstruction *Inst : Target.instructions()) { + for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) { Record *ItinDef = Inst->TheDef->getValueAsDef("Itinerary"); IdxVec Writes, Reads; if (!Inst->TheDef->isValueUnset("SchedRW")) @@ -523,7 +523,7 @@ void CodeGenSchedModels::collectSchedClasses() { if (!EnableDump) return; - for (const CodeGenInstruction *Inst : Target.instructions()) { + for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) { std::string InstName = Inst->TheDef->getName(); unsigned SCIdx = InstrClassMap.lookup(Inst->TheDef); if (!SCIdx) { diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index aaad4225ace..3cae27f82b0 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -162,7 +162,7 @@ const std::string &CodeGenTarget::getName() const { } std::string CodeGenTarget::getInstNamespace() const { - for (const CodeGenInstruction *Inst : instructions()) { + for (const CodeGenInstruction *Inst : getInstructionsByEnumValue()) { // Make sure not to pick up "TargetOpcode" by accidentally getting // the namespace off the PHI instruction or something. if (Inst->Namespace != "TargetOpcode") diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h index da420c4f1a9..72145133aa7 100644 --- a/llvm/utils/TableGen/CodeGenTarget.h +++ b/llvm/utils/TableGen/CodeGenTarget.h @@ -170,9 +170,6 @@ public: typedef ArrayRef<const CodeGenInstruction *>::const_iterator inst_iterator; inst_iterator inst_begin() const{return getInstructionsByEnumValue().begin();} inst_iterator inst_end() const { return getInstructionsByEnumValue().end(); } - iterator_range<inst_iterator> instructions() const { - return make_range(inst_begin(), inst_end()); - } /// isLittleEndianEncoding - are instruction bit patterns defined as [0..n]? diff --git a/llvm/utils/TableGen/InstrInfoEmitter.cpp b/llvm/utils/TableGen/InstrInfoEmitter.cpp index a6583399fa2..388c4276688 100644 --- a/llvm/utils/TableGen/InstrInfoEmitter.cpp +++ b/llvm/utils/TableGen/InstrInfoEmitter.cpp @@ -177,7 +177,7 @@ void InstrInfoEmitter::EmitOperandInfo(raw_ostream &OS, OS << "\n"; const CodeGenTarget &Target = CDP.getTargetInfo(); - for (const CodeGenInstruction *Inst : Target.instructions()) { + for (const CodeGenInstruction *Inst : Target.getInstructionsByEnumValue()) { std::vector<std::string> OperandInfo = GetOperandInfo(*Inst); unsigned &N = OperandInfoIDs[OperandInfo]; if (N != 0) continue; @@ -358,7 +358,7 @@ void InstrInfoEmitter::run(raw_ostream &OS) { unsigned ListNumber = 0; // Emit all of the instruction's implicit uses and defs. - for (const CodeGenInstruction *II : Target.instructions()) { + for (const CodeGenInstruction *II : Target.getInstructionsByEnumValue()) { Record *Inst = II->TheDef; std::vector<Record*> Uses = Inst->getValueAsListOfDefs("Uses"); if (!Uses.empty()) { |