[TableGen] Add some std::move to the PatternToMatch constructor.
authorCraig Topper <craig.topper@intel.com>
Sun, 15 Jul 2018 01:10:28 +0000 (01:10 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 15 Jul 2018 01:10:28 +0000 (01:10 +0000)
The are two vectors passed by value to the constructor. We should be able to move them into the object.

llvm-svn: 337114

llvm/utils/TableGen/CodeGenDAGPatterns.h

index c682f3d..5bdf4cd 100644 (file)
@@ -1022,7 +1022,7 @@ public:
                  std::vector<Record *> dstregs, int complexity,
                  unsigned uid, unsigned setmode = 0)
       : SrcRecord(srcrecord), SrcPattern(src), DstPattern(dst),
-        Predicates(preds), Dstregs(dstregs),
+        Predicates(std::move(preds)), Dstregs(std::move(dstregs)),
         AddedComplexity(complexity), ID(uid), ForceMode(setmode) {}
 
   Record          *SrcRecord;   // Originating Record for the pattern.