[llvm] 34ff78c - [CodeGen] Remove restrictRef (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 23:09:01 PDT 2022


Author: Kazu Hirata
Date: 2022-06-13T23:08:48-07:00
New Revision: 34ff78c5cfc7192aa3bf3c40e2c8e13006e3ca99

URL: https://github.com/llvm/llvm-project/commit/34ff78c5cfc7192aa3bf3c40e2c8e13006e3ca99
DIFF: https://github.com/llvm/llvm-project/commit/34ff78c5cfc7192aa3bf3c40e2c8e13006e3ca99.diff

LOG: [CodeGen] Remove restrictRef (NFC)

The last use was removed on Apr 14, 2017 in commit
4fe9d6c640e81457db1350766bf6dfef118bcacd.

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 e0205d7c92c8..a323ee9dc396 100644
--- a/llvm/include/llvm/CodeGen/RDFGraph.h
+++ b/llvm/include/llvm/CodeGen/RDFGraph.h
@@ -749,7 +749,6 @@ namespace rdf {
 
     RegisterRef makeRegRef(unsigned Reg, unsigned Sub) const;
     RegisterRef makeRegRef(const MachineOperand &Op) const;
-    RegisterRef restrictRef(RegisterRef AR, RegisterRef BR) const;
 
     NodeAddr<RefNode*> getNextRelated(NodeAddr<InstrNode*> IA,
         NodeAddr<RefNode*> RA) const;

diff  --git a/llvm/lib/CodeGen/RDFGraph.cpp b/llvm/lib/CodeGen/RDFGraph.cpp
index 05c1e16b7dfe..ec383b9b1c65 100644
--- a/llvm/lib/CodeGen/RDFGraph.cpp
+++ b/llvm/lib/CodeGen/RDFGraph.cpp
@@ -977,18 +977,6 @@ RegisterRef DataFlowGraph::makeRegRef(const MachineOperand &Op) const {
   return RegisterRef(PRI.getRegMaskId(Op.getRegMask()), LaneBitmask::getAll());
 }
 
-RegisterRef DataFlowGraph::restrictRef(RegisterRef AR, RegisterRef BR) const {
-  if (AR.Reg == BR.Reg) {
-    LaneBitmask M = AR.Mask & BR.Mask;
-    return M.any() ? RegisterRef(AR.Reg, M) : RegisterRef();
-  }
-  // This isn't strictly correct, because the overlap may happen in the
-  // part masked out.
-  if (PRI.alias(AR, BR))
-    return AR;
-  return RegisterRef();
-}
-
 // For each stack in the map DefM, push the delimiter for block B on it.
 void DataFlowGraph::markBlock(NodeId B, DefStackMap &DefM) {
   // Push block delimiters.


        


More information about the llvm-commits mailing list