mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
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
This commit is contained in:
parent
f4f8cc9e75
commit
166c6e4bfe
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user