From 9de2850201edaff8705a705a29fefefc96d69d95 Mon Sep 17 00:00:00 2001 From: Danila Malyutin Date: Fri, 17 May 2024 20:35:08 +0400 Subject: [PATCH] [CloneFunction] Remove check that is no longer necessary We do not need to concern ourselves with CGSCC since all remaining CG related updates went away in fa6ea7a419f37befbed04368bcb8af4c718facbb. --- llvm/lib/Transforms/Utils/CloneFunction.cpp | 7 ------- 1 file changed, 7 deletions(-) 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(NewI); - if (CB && CB->getCalledFunction() && - !CB->getCalledFunction()->isIntrinsic()) - continue; - if (Value *V = simplifyInstruction(NewI, DL)) { NewI->replaceAllUsesWith(V);