OSDN Git Service

[TableGen] CodeGenDAGPatterns::GenerateVariants - use BitVector::set() where possible...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Sep 2018 12:23:50 +0000 (12:23 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 19 Sep 2018 12:23:50 +0000 (12:23 +0000)
In these cases we are always setting to true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@342543 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenDAGPatterns.cpp

index 52a8310..4a409f1 100644 (file)
@@ -4498,8 +4498,8 @@ void CodeGenDAGPatterns::GenerateVariants() {
         PatternsToMatch[i].getPredicates();
 
     BitVector &Matches = MatchedPredicates[i];
-    MatchedPatterns[i] = true;
-    Matches[i] = true;
+    MatchedPatterns.set(i);
+    Matches.set(i);
 
     // Don't test patterns that have already been cached - it won't match.
     for (unsigned p = 0; p != NumOriginalPatterns; ++p)
@@ -4509,7 +4509,7 @@ void CodeGenDAGPatterns::GenerateVariants() {
     // Copy this to all the matching patterns.
     for (int p = Matches.find_first(); p != -1; p = Matches.find_next(p))
       if (p != (int)i) {
-        MatchedPatterns[p] = true;
+        MatchedPatterns.set(p);
         MatchedPredicates[p] = Matches;
       }
   }