[llvm] 52ecd94 - Remove last remnants of PR49607 migration [NFC]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 07:57:14 PDT 2021


Author: Philip Reames
Date: 2021-04-06T07:56:55-07:00
New Revision: 52ecd94cfbca726aae2532db43aac5dec92ced15

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

LOG: Remove last remnants of PR49607 migration [NFC]

The key change (4f5e92c) to switch gc.result and gc.relocate to being readnone landed nearly two weeks ago, and we haven't seen any fallout.  Time to remove the code added to make reverting easy.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/EarlyCSE.cpp
    llvm/lib/Transforms/Scalar/GVN.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
index 9c7d43078821..125e00482210 100644
--- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
@@ -109,9 +109,6 @@ struct SimpleValue {
 
   static bool canHandle(Instruction *Inst) {
     // This can only handle non-void readnone functions.
-    if (isa<GCRelocateInst>(Inst))
-      // Migration assistant for PR49607, to be removed once complete
-      return true;
     if (CallInst *CI = dyn_cast<CallInst>(Inst))
       return CI->doesNotAccessMemory() && !CI->getType()->isVoidTy();
     return isa<CastInst>(Inst) || isa<UnaryOperator>(Inst) ||

diff  --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index 40eff58650f1..6d5042165ad8 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -397,9 +397,7 @@ void GVN::ValueTable::add(Value *V, uint32_t num) {
 }
 
 uint32_t GVN::ValueTable::lookupOrAddCall(CallInst *C) {
-  // The gc.relocate specific check is to simplify migration under PR49607, and
-  // is to be removed once complete.
-  if (AA->doesNotAccessMemory(C) || isa<GCRelocateInst>(C)) {
+  if (AA->doesNotAccessMemory(C)) {
     Expression exp = createExpr(C);
     uint32_t e = assignExpNewValueNum(exp).first;
     valueNumbering[C] = e;


        


More information about the llvm-commits mailing list