diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
tree | 4def12e759965de927d963ac65840d663ef9d1ea /include/llvm/CodeGen/PBQP/Graph.h | |
parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) |
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 f73383ed10007..8301ca4d85366 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; } |