[llvm] edfcc3a - [RDF] Remove unused parameter AllRefs from buildPhis
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 06:18:10 PDT 2023
Author: Krzysztof Parzyszek
Date: 2023-06-14T06:17:32-07:00
New Revision: edfcc3a5d5d9120163cd5a24058dbc424c56c65f
URL: https://github.com/llvm/llvm-project/commit/edfcc3a5d5d9120163cd5a24058dbc424c56c65f
DIFF: https://github.com/llvm/llvm-project/commit/edfcc3a5d5d9120163cd5a24058dbc424c56c65f.diff
LOG: [RDF] Remove unused parameter AllRefs from buildPhis
Added:
Modified:
llvm/include/llvm/CodeGen/RDFGraph.h
llvm/lib/CodeGen/RDFGraph.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/RDFGraph.h b/llvm/include/llvm/CodeGen/RDFGraph.h
index 0d6361bba3ba1..e865bc89bbfe3 100644
--- a/llvm/include/llvm/CodeGen/RDFGraph.h
+++ b/llvm/include/llvm/CodeGen/RDFGraph.h
@@ -847,7 +847,7 @@ struct DataFlowGraph {
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 1eba06c03ce50..dc35ca3708a4c 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);
More information about the llvm-commits
mailing list