From edfcc3a5d5d9120163cd5a24058dbc424c56c65f Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Tue, 6 Jun 2023 07:51:27 -0700 Subject: [PATCH] [RDF] Remove unused parameter AllRefs from buildPhis --- llvm/include/llvm/CodeGen/RDFGraph.h | 2 +- llvm/lib/CodeGen/RDFGraph.cpp | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/llvm/include/llvm/CodeGen/RDFGraph.h b/llvm/include/llvm/CodeGen/RDFGraph.h index 0d6361b..e865bc8 100644 --- a/llvm/include/llvm/CodeGen/RDFGraph.h +++ b/llvm/include/llvm/CodeGen/RDFGraph.h @@ -847,7 +847,7 @@ private: void buildStmt(Block BA, MachineInstr &In); void recordDefsForDF(BlockRefsMap &PhiM, Block BA); - void buildPhis(BlockRefsMap &PhiM, RegisterSet &AllRefs, Block BA); + void buildPhis(BlockRefsMap &PhiM, Block BA); void removeUnusedPhis(); void pushClobbers(Instr IA, DefStackMap &DM); diff --git a/llvm/lib/CodeGen/RDFGraph.cpp b/llvm/lib/CodeGen/RDFGraph.cpp index 1eba06c..dc35ca3 100644 --- a/llvm/lib/CodeGen/RDFGraph.cpp +++ b/llvm/lib/CodeGen/RDFGraph.cpp @@ -873,13 +873,6 @@ void DataFlowGraph::build(unsigned Options) { Block EA = TheFunc.Addr->getEntryBlock(*this); NodeList Blocks = TheFunc.Addr->members(*this); - // Collect information about block references. - RegisterSet AllRefs(getPRI()); - for (Block BA : Blocks) - for (Instr IA : BA.Addr->members(*this)) - for (Ref RA : IA.Addr->members(*this)) - AllRefs.insert(RA.Addr->getRegRef(*this)); - // Collect function live-ins and entry block live-ins. MachineRegisterInfo &MRI = MF.getRegInfo(); MachineBasicBlock &EntryB = *EA.Addr->getCode(); @@ -938,7 +931,7 @@ void DataFlowGraph::build(unsigned Options) { for (Block BA : Blocks) recordDefsForDF(PhiM, BA); for (Block BA : Blocks) - buildPhis(PhiM, AllRefs, BA); + buildPhis(PhiM, BA); // Link all the refs. This will recursively traverse the dominator tree. DefStackMap DM; @@ -1385,8 +1378,7 @@ void DataFlowGraph::recordDefsForDF(BlockRefsMap &PhiM, Block BA) { // Given the locations of phi nodes in the map PhiM, create the phi nodes // that are located in the block node BA. -void DataFlowGraph::buildPhis(BlockRefsMap &PhiM, RegisterSet &AllRefs, - Block BA) { +void DataFlowGraph::buildPhis(BlockRefsMap &PhiM, Block BA) { // Check if this blocks has any DF defs, i.e. if there are any defs // that this block is in the iterated dominance frontier of. auto HasDF = PhiM.find(BA.Id); -- 2.7.4