diff options
author | Matthias Braun <matze@braunis.de> | 2016-12-05 08:15:57 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-12-05 08:15:57 +0000 |
commit | ec0b0b548e1cfbe9ea4e9d3fc1c0f68e753818a0 (patch) | |
tree | 90df068b847efb19f4833a36a5513b386d21a95c /llvm/utils/TableGen/AsmMatcherEmitter.cpp | |
parent | b3189a1802e493fd819b766c2051bda04f18617c (diff) | |
download | bcm5719-llvm-ec0b0b548e1cfbe9ea4e9d3fc1c0f68e753818a0.tar.gz bcm5719-llvm-ec0b0b548e1cfbe9ea4e9d3fc1c0f68e753818a0.zip |
TableGen/AsmMatcherEmitter: Trust that stable_sort works
A debug build of AsmMatcherEmitter would use a quadratic algorithm to
check whether std::stable_sort() actually sorted. Let's hope the authors
of our C++ standard library did that testing for us. Removing the check
gives a 3x speedup in the X86 case.
llvm-svn: 288655
Diffstat (limited to 'llvm/utils/TableGen/AsmMatcherEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index a403ab7d6b5..a8a984db19b 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp @@ -2719,16 +2719,6 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { const std::unique_ptr<MatchableInfo> &b){ return *a < *b;}); -#ifndef NDEBUG - // Verify that the table is now sorted - for (auto I = Info.Matchables.begin(), E = Info.Matchables.end(); I != E; - ++I) { - for (auto J = I; J != E; ++J) { - assert(!(**J < **I)); - } - } -#endif // NDEBUG - DEBUG_WITH_TYPE("instruction_info", { for (const auto &MI : Info.Matchables) MI->dump(); |