[llvm] [CodeLayout] Faster basic block reordering, ext-tsp (PR #68617)
David Li via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 18:28:57 PDT 2023
================
@@ -475,14 +478,14 @@ void ChainT::mergeEdges(ChainT *Other) {
}
}
-using NodeIter = std::vector<NodeT *>::const_iterator;
+/// A wrapper around three concatenated vectors (chains) of objects; it is used
+/// to avoid extra instantiation of the vectors.
+template <typename ObjType> struct MergedVector {
+ using ObjIter = typename std::vector<ObjType *>::const_iterator;
-/// A wrapper around three chains of nodes; it is used to avoid extra
-/// instantiation of the vectors.
-struct MergedChain {
- MergedChain(NodeIter Begin1, NodeIter End1, NodeIter Begin2 = NodeIter(),
- NodeIter End2 = NodeIter(), NodeIter Begin3 = NodeIter(),
- NodeIter End3 = NodeIter())
+ MergedVector(ObjIter Begin1, ObjIter End1, ObjIter Begin2 = ObjIter(),
----------------
david-xl wrote:
perhaps a separate PR?
https://github.com/llvm/llvm-project/pull/68617
More information about the llvm-commits
mailing list