diff options
author | Daniel Sanders <daniel_l_sanders@apple.com> | 2018-08-12 21:49:42 +0000 |
---|---|---|
committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2018-08-12 21:49:42 +0000 |
commit | f1e8e3b316dd3e434983f0a7c24e129cf57d6636 (patch) | |
tree | c49e1bc82f29ad68816ded16d9ee82832257e77c /llvm/utils | |
parent | 8cd96484d2e2e09a126f5f599382cd5be1252e41 (diff) | |
download | bcm5719-llvm-f1e8e3b316dd3e434983f0a7c24e129cf57d6636.tar.gz bcm5719-llvm-f1e8e3b316dd3e434983f0a7c24e129cf57d6636.zip |
[globalisel] Remove dead code from GlobalISelEmitter
Summary: Found by GCC's -Wunused-function.
Patch by Kim Gräsman
Reviewers: ab, dsanders, llvm-commits
Reviewed By: dsanders
Subscribers: rovka, kristof.beyls
Differential Revision: https://reviews.llvm.org/D50611
llvm-svn: 339528
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/GlobalISelEmitter.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp index 69726cc9f25..a02f31a8723 100644 --- a/llvm/utils/TableGen/GlobalISelEmitter.cpp +++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp @@ -2984,9 +2984,6 @@ private: 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::gatherOpcodeValues() { 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()); |