aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/RegAllocPBQP.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/RegAllocPBQP.h')
-rw-r--r--include/llvm/CodeGen/RegAllocPBQP.h76
1 files changed, 3 insertions, 73 deletions
diff --git a/include/llvm/CodeGen/RegAllocPBQP.h b/include/llvm/CodeGen/RegAllocPBQP.h
index 21952272ffdb9..2cad90bbb7039 100644
--- a/include/llvm/CodeGen/RegAllocPBQP.h
+++ b/include/llvm/CodeGen/RegAllocPBQP.h
@@ -89,26 +89,7 @@ public:
std::copy(OptVec.begin(), OptVec.end(), Opts.get());
}
- AllowedRegVector(const AllowedRegVector &Other)
- : NumOpts(Other.NumOpts), Opts(new unsigned[NumOpts]) {
- std::copy(Other.Opts.get(), Other.Opts.get() + NumOpts, Opts.get());
- }
-
- AllowedRegVector(AllowedRegVector &&Other)
- : NumOpts(std::move(Other.NumOpts)), Opts(std::move(Other.Opts)) {}
-
- AllowedRegVector& operator=(const AllowedRegVector &Other) {
- NumOpts = Other.NumOpts;
- Opts.reset(new unsigned[NumOpts]);
- std::copy(Other.Opts.get(), Other.Opts.get() + NumOpts, Opts.get());
- return *this;
- }
-
- AllowedRegVector& operator=(AllowedRegVector &&Other) {
- NumOpts = std::move(Other.NumOpts);
- Opts = std::move(Other.Opts);
- return *this;
- }
+ AllowedRegVector(AllowedRegVector &&) = default;
unsigned size() const { return NumOpts; }
unsigned operator[](size_t I) const { return Opts[I]; }
@@ -163,10 +144,6 @@ public:
return VRegItr->second;
}
- void eraseNodeIdForVReg(unsigned VReg) {
- VRegToNodeId.erase(VReg);
- }
-
AllowedRegVecRef getAllowedRegs(AllowedRegVector Allowed) {
return AllowedRegVecs.getValue(std::move(Allowed));
}
@@ -199,8 +176,6 @@ public:
#endif
{}
- // FIXME: Re-implementing default behavior to work around MSVC. Remove once
- // MSVC synthesizes move constructors properly.
NodeMetadata(const NodeMetadata &Other)
: RS(Other.RS), NumOpts(Other.NumOpts), DeniedOpts(Other.DeniedOpts),
OptUnsafeEdges(new unsigned[NumOpts]), VReg(Other.VReg),
@@ -215,48 +190,9 @@ public:
}
}
- // FIXME: Re-implementing default behavior to work around MSVC. Remove once
- // MSVC synthesizes move constructors properly.
- NodeMetadata(NodeMetadata &&Other)
- : RS(Other.RS), NumOpts(Other.NumOpts), DeniedOpts(Other.DeniedOpts),
- OptUnsafeEdges(std::move(Other.OptUnsafeEdges)), VReg(Other.VReg),
- AllowedRegs(std::move(Other.AllowedRegs))
-#ifndef NDEBUG
- , everConservativelyAllocatable(Other.everConservativelyAllocatable)
-#endif
- {}
-
- // FIXME: Re-implementing default behavior to work around MSVC. Remove once
- // MSVC synthesizes move constructors properly.
- NodeMetadata& operator=(const NodeMetadata &Other) {
- RS = Other.RS;
- NumOpts = Other.NumOpts;
- DeniedOpts = Other.DeniedOpts;
- OptUnsafeEdges.reset(new unsigned[NumOpts]);
- std::copy(Other.OptUnsafeEdges.get(), Other.OptUnsafeEdges.get() + NumOpts,
- OptUnsafeEdges.get());
- VReg = Other.VReg;
- AllowedRegs = Other.AllowedRegs;
-#ifndef NDEBUG
- everConservativelyAllocatable = Other.everConservativelyAllocatable;
-#endif
- return *this;
- }
+ NodeMetadata(NodeMetadata &&Other) = default;
- // FIXME: Re-implementing default behavior to work around MSVC. Remove once
- // MSVC synthesizes move constructors properly.
- NodeMetadata& operator=(NodeMetadata &&Other) {
- RS = Other.RS;
- NumOpts = Other.NumOpts;
- DeniedOpts = Other.DeniedOpts;
- OptUnsafeEdges = std::move(Other.OptUnsafeEdges);
- VReg = Other.VReg;
- AllowedRegs = std::move(Other.AllowedRegs);
-#ifndef NDEBUG
- everConservativelyAllocatable = Other.everConservativelyAllocatable;
-#endif
- return *this;
- }
+ NodeMetadata& operator=(NodeMetadata &&Other) = default;
void setVReg(unsigned VReg) { this->VReg = VReg; }
unsigned getVReg() const { return VReg; }
@@ -284,7 +220,6 @@ public:
#endif
}
-
void handleAddEdge(const MatrixMetadata& MD, bool Transpose) {
DeniedOpts += Transpose ? MD.getWorstRow() : MD.getWorstCol();
const bool* UnsafeOpts =
@@ -369,11 +304,6 @@ public:
handleReconnectEdge(EId, G.getEdgeNode2Id(EId));
}
- void handleRemoveEdge(EdgeId EId) {
- handleDisconnectEdge(EId, G.getEdgeNode1Id(EId));
- handleDisconnectEdge(EId, G.getEdgeNode2Id(EId));
- }
-
void handleDisconnectEdge(EdgeId EId, NodeId NId) {
NodeMetadata& NMd = G.getNodeMetadata(NId);
const MatrixMetadata& MMd = G.getEdgeCosts(EId).getMetadata();