diff options
Diffstat (limited to 'include/llvm/CodeGen/PBQP/Graph.h')
-rw-r--r-- | include/llvm/CodeGen/PBQP/Graph.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/PBQP/Graph.h b/include/llvm/CodeGen/PBQP/Graph.h index f73383ed1000..8301ca4d8536 100644 --- a/include/llvm/CodeGen/PBQP/Graph.h +++ b/include/llvm/CodeGen/PBQP/Graph.h @@ -15,12 +15,11 @@ #ifndef LLVM_CODEGEN_PBQP_GRAPH_H #define LLVM_CODEGEN_PBQP_GRAPH_H -#include "llvm/ADT/ilist.h" -#include "llvm/ADT/ilist_node.h" #include "llvm/Support/Debug.h" -#include <list> -#include <map> -#include <set> +#include <algorithm> +#include <cassert> +#include <limits> +#include <utility> #include <vector> namespace llvm { @@ -72,7 +71,7 @@ namespace PBQP { return std::numeric_limits<AdjEdgeIdx>::max(); } - NodeEntry(VectorPtr Costs) : Costs(Costs) {} + NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} AdjEdgeIdx addAdjEdgeId(EdgeId EId) { AdjEdgeIdx Idx = AdjEdgeIds.size(); @@ -103,7 +102,7 @@ namespace PBQP { class EdgeEntry { public: EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs) - : Costs(Costs) { + : Costs(std::move(Costs)) { NIds[0] = N1Id; NIds[1] = N2Id; ThisEdgeAdjIdxs[0] = NodeEntry::getInvalidAdjEdgeIdx(); @@ -348,7 +347,8 @@ namespace PBQP { Graph() : Solver(nullptr) {} /// @brief Construct an empty PBQP graph with the given graph metadata. - Graph(GraphMetadata Metadata) : Metadata(Metadata), Solver(nullptr) {} + Graph(GraphMetadata Metadata) + : Metadata(std::move(Metadata)), Solver(nullptr) {} /// @brief Get a reference to the graph metadata. GraphMetadata& getMetadata() { return Metadata; } |