From 959d84044a70da08923fe221f999f4e406094ee9 Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 9 Sep 2024 13:50:48 +0200 Subject: [PATCH] [AMDGPU] Remove unused SplitGraph::Node::getFullCost --- llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp index 538797f722bd68..e97a7f4e075f7f 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp @@ -438,12 +438,6 @@ class SplitGraph::Node { visitAllDependencies([&](const Node &N) { BV.set(N.getID()); }); } - /// Uses \ref visitAllDependencies to aggregate the individual cost of this - /// node and all of its dependencies. - /// - /// This is cached. - CostType getFullCost() const; - private: void markAsGraphEntry() { IsGraphEntry = true; } @@ -454,9 +448,6 @@ class SplitGraph::Node { bool IsEntryFnCC : 1; bool IsGraphEntry : 1; - // TODO: Cache dependencies as well? - mutable CostType FullCost = 0; - // TODO: Use a single sorted vector (with all incoming/outgoing edges grouped // together) EdgesVec IncomingEdges; @@ -485,16 +476,6 @@ void SplitGraph::Node::visitAllDependencies( } } -CostType SplitGraph::Node::getFullCost() const { - if (FullCost) - return FullCost; - - assert(FullCost == 0); - visitAllDependencies( - [&](const Node &N) { FullCost += N.getIndividualCost(); }); - return FullCost; -} - void SplitGraph::buildGraph(CallGraph &CG) { SplitModuleTimer SMT("buildGraph", "graph construction"); LLVM_DEBUG(