[llvm] r342536 - [TableGen] CodeGenDAGPatterns::GenerateVariants - use BitVector::push_back()
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 19 04:18:49 PDT 2018
Author: rksimon
Date: Wed Sep 19 04:18:49 2018
New Revision: 342536
URL: http://llvm.org/viewvc/llvm-project?rev=342536&view=rev
Log:
[TableGen] CodeGenDAGPatterns::GenerateVariants - use BitVector::push_back()
As mentioned on D52236, this saves 10secs in debug builds of x86 -gen-dag-isel
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=342536&r1=342535&r2=342536&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Wed Sep 19 04:18:49 2018
@@ -4552,9 +4552,8 @@ void CodeGenDAGPatterns::GenerateVariant
MatchedPredicates.push_back(Matches);
// Add a new match the same as this pattern.
- unsigned NumPatterns = PatternsToMatch.size();
for (auto &P : MatchedPredicates)
- P.resize(NumPatterns, P[i]);
+ P.push_back(P[i]);
}
LLVM_DEBUG(errs() << "\n");
More information about the llvm-commits
mailing list