[PATCH] D50611: Remove dead code from GlobalISelEmitter

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 12 14:50:29 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL339528: [globalisel] Remove dead code from GlobalISelEmitter (authored by dsanders, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D50611?vs=160258&id=160275#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D50611

Files:
  llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp


Index: llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
+++ llvm/trunk/utils/TableGen/GlobalISelEmitter.cpp
@@ -2984,9 +2984,6 @@
   void gatherOpcodeValues();
   void gatherTypeIDValues();
   void gatherNodeEquivs();
-  // Instruction predicate code that will be emitted in generated functions.
-  SmallVector<std::string, 2> InstructionPredicateCodes;
-  unsigned getOrCreateInstructionPredicateFnId(StringRef Code);
 
   Record *findNodeEquiv(Record *N) const;
   const CodeGenInstruction *getEquivNode(Record &Equiv,
@@ -3085,20 +3082,6 @@
 void GlobalISelEmitter::gatherTypeIDValues() {
   LLTOperandMatcher::initTypeIDValuesMap();
 }
-unsigned GlobalISelEmitter::getOrCreateInstructionPredicateFnId(StringRef Code) {
-  // There's not very many predicates that need to be here at the moment so we
-  // just maintain a simple set-like vector. If it grows then we'll need to do
-  // something more efficient.
-  const auto &I = std::find(InstructionPredicateCodes.begin(),
-                            InstructionPredicateCodes.end(),
-                            Code);
-  if (I == InstructionPredicateCodes.end()) {
-    unsigned ID = InstructionPredicateCodes.size();
-    InstructionPredicateCodes.push_back(Code);
-    return ID;
-  }
-  return std::distance(InstructionPredicateCodes.begin(), I);
-}
 
 void GlobalISelEmitter::gatherNodeEquivs() {
   assert(NodeEquivs.empty());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50611.160275.patch
Type: text/x-patch
Size: 1510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180812/8870fcb4/attachment.bin>


More information about the llvm-commits mailing list