[llvm] r337114 - [TableGen] Add some std::move to the PatternToMatch constructor.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 14 18:10:29 PDT 2018


Author: ctopper
Date: Sat Jul 14 18:10:28 2018
New Revision: 337114

URL: http://llvm.org/viewvc/llvm-project?rev=337114&view=rev
Log:
[TableGen] Add some std::move to the PatternToMatch constructor.

The are two vectors passed by value to the constructor. We should be able to move them into the object.

Modified:
    llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h

Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h?rev=337114&r1=337113&r2=337114&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.h Sat Jul 14 18:10:28 2018
@@ -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.




More information about the llvm-commits mailing list