[llvm] 36899d6 - [CloneFunction] Remove check that is no longer necessary (#92577)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 06:51:36 PDT 2024


Author: Danila Malyutin
Date: 2024-05-20T17:51:32+04:00
New Revision: 36899d693d91719e7e6cd0f0ee4cf579111b8509

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

LOG: [CloneFunction] Remove check that is no longer necessary (#92577)

We do not need to concern ourselves with CGSCC since all remaining CG
related updates went away in fa6ea7a419f37befbed04368bcb8af4c718facbb as
pointed out by @nikic in
https://github.com/llvm/llvm-project/pull/87963#issuecomment-2113937182.

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/CloneFunction.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 981183682b8bf..1fef8bc461211 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -825,13 +825,6 @@ void llvm::CloneAndPruneIntoFromInst(Function *NewFunc, const Function *OldFunc,
       if (!NewI)
         continue;
 
-      // Skip over non-intrinsic callsites, we don't want to remove any nodes
-      // from the CGSCC.
-      CallBase *CB = dyn_cast<CallBase>(NewI);
-      if (CB && CB->getCalledFunction() &&
-          !CB->getCalledFunction()->isIntrinsic())
-        continue;
-
       if (Value *V = simplifyInstruction(NewI, DL)) {
         NewI->replaceAllUsesWith(V);
 


        


More information about the llvm-commits mailing list