================
@@ -19,12 +19,9 @@
 
 using namespace llvm;
 
-static bool canReplaceFunction(Function *F) {
-  return all_of(F->uses(), [](Use &Op) {
-    if (auto *CI = dyn_cast<CallBase>(Op.getUser()))
-      return &CI->getCalledOperandUse() == &Op;
-    return false;
-  });
+static bool canReplaceFunction(const Function &F) {
+  // TODO: Add controls to avoid ABI breaks (e.g. don't break main)
----------------
arsenm wrote:

It shoul, but it would be useful to have a mode to opt out and avoid breaking 
anything needed to execute the function (bugpoint has a more primitive version 
of the option than the one I would like)

https://github.com/llvm/llvm-project/pull/133854
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to