Lines Matching defs:ChainT

212 struct ChainT;
246 ChainT *CurChain{nullptr};
282 struct ChainT {
283 ChainT(const ChainT &) = delete;
284 ChainT(ChainT &&) = default;
285 ChainT &operator=(const ChainT &) = delete;
286 ChainT &operator=(ChainT &&) = default;
288 explicit ChainT(uint64_t Id, NodeT *Node)
306 ChainEdge *getEdge(ChainT *Other) const {
314 void removeEdge(ChainT *Other) {
325 void addEdge(ChainT *Other, ChainEdge *Edge) {
329 void merge(ChainT *Other, std::vector<NodeT *> MergedBlocks) {
342 void mergeEdges(ChainT *Other);
363 std::vector<std::pair<ChainT *, ChainEdge *>> Edges;
379 ChainT *srcChain() const { return SrcChain; }
381 ChainT *dstChain() const { return DstChain; }
395 void changeEndpoint(ChainT *From, ChainT *To) {
402 bool hasCachedMergeGain(ChainT *Src, ChainT *Dst) const {
406 MergeGainT getCachedMergeGain(ChainT *Src, ChainT *Dst) const {
410 void setCachedMergeGain(ChainT *Src, ChainT *Dst, MergeGainT MergeGain) {
433 ChainT *SrcChain{nullptr};
435 ChainT *DstChain{nullptr};
473 void ChainT::mergeEdges(ChainT *Other) {
476 ChainT *TargetChain = DstChain == Other ? this : DstChain;
743 auto compareChainPairs = [](const ChainT *A1, const ChainT *B1,
744 const ChainT *A2, const ChainT *B2) {
749 ChainT *BestChainPred = nullptr;
750 ChainT *BestChainSucc = nullptr;
753 for (ChainT *ChainPred : HotChains) {
813 ChainT *SrcChain = AllNodes[SrcBB].CurChain;
814 ChainT *DstChain = AllNodes[DstBB].CurChain;
851 MergeGainT getBestMergeGain(ChainT *ChainPred, ChainT *ChainSucc,
931 MergeGainT computeMergeGain(const ChainT *ChainPred, const ChainT *ChainSucc,
950 void mergeChains(ChainT *Into, ChainT *From, size_t MergeOffset,
982 std::vector<const ChainT *> SortedChains;
983 for (ChainT &Chain : AllChains) {
990 [&](const ChainT *L, const ChainT *R) {
1003 for (const ChainT *Chain : SortedChains)
1026 std::vector<ChainT> AllChains;
1032 std::vector<ChainT *> HotChains;
1165 ChainT *BestSrcChain = BestEdge->srcChain();
1166 ChainT *BestDstChain = BestEdge->dstChain();
1213 ChainT *SrcChain = Edge->srcChain();
1214 ChainT *DstChain = Edge->dstChain();
1250 MergeGainT computeMergeGain(ChainT *ChainPred, ChainT *ChainSucc,
1271 double freqBasedLocalityGain(ChainT *ChainPred, ChainT *ChainSucc) const {
1323 void mergeChains(ChainT *Into, ChainT *From, size_t MergeOffset,
1340 std::vector<const ChainT *> SortedChains;
1341 DenseMap<const ChainT *, double> ChainDensity;
1342 for (ChainT &Chain : AllChains) {
1359 [&](const ChainT *L, const ChainT *R) {
1370 for (const ChainT *Chain : SortedChains)
1396 std::vector<ChainT> AllChains;