Skip to content

Commit

Permalink
[AMDGPU] Remove unused SplitGraph::Node::getFullCost
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-vh committed Sep 9, 2024
1 parent b8b8fbe commit 959d840
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }

Expand All @@ -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;
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 959d840

Please sign in to comment.