[llvm] e76ddfa - [Transforms] Remove HasValueForBlock (NFC)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 30 08:57:01 PDT 2021


Author: Kazu Hirata
Date: 2021-07-30T08:56:49-07:00
New Revision: e76ddfa9ef718a8b9b13fb76ac8ee061015175c6

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

LOG: [Transforms] Remove HasValueForBlock (NFC)

The function seems to be unused for at least one year.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h
    llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h b/llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h
index 3a78e22b7e945..5de575aed0596 100644
--- a/llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h
+++ b/llvm/include/llvm/Transforms/Utils/SSAUpdaterBulk.h
@@ -70,10 +70,6 @@ class SSAUpdaterBulk {
   /// rewritten value when RewriteAllUses is called.
   void AddUse(unsigned Var, Use *U);
 
-  /// Return true if the SSAUpdater already has a value for the specified
-  /// variable in the specified block.
-  bool HasValueForBlock(unsigned Var, BasicBlock *BB);
-
   /// Perform all the necessary updates, including new PHI-nodes insertion and
   /// the requested uses update.
   ///

diff  --git a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
index 917d5e0a1ef0a..7de76b86817b3 100644
--- a/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
+++ b/llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp
@@ -65,12 +65,6 @@ void SSAUpdaterBulk::AddUse(unsigned Var, Use *U) {
   Rewrites[Var].Uses.push_back(U);
 }
 
-/// Return true if the SSAUpdater already has a value for the specified variable
-/// in the specified block.
-bool SSAUpdaterBulk::HasValueForBlock(unsigned Var, BasicBlock *BB) {
-  return (Var < Rewrites.size()) ? Rewrites[Var].Defines.count(BB) : false;
-}
-
 // Compute value at the given block BB. We either should already know it, or we
 // should be able to recursively reach it going up dominator tree.
 Value *SSAUpdaterBulk::computeValueAt(BasicBlock *BB, RewriteInfo &R,


        


More information about the llvm-commits mailing list