[llvm] [SystemZ] Add proper mcount handling (PR #135767)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 25 06:27:37 PDT 2025


================
@@ -63,6 +63,12 @@ static void insertCall(Function &CurFn, StringRef Func,
                                   false));
       CallInst *Call = CallInst::Create(Fn, RetAddr, "", InsertionPt);
       Call->setDebugLoc(DL);
+    } else if (TargetTriple.isSystemZ()) {
+      M.getOrInsertFunction(Func, Type::getVoidTy(C));
----------------
uweigand wrote:

Do we need to do this here, or can this be delayed until where the function is used in the backend?  Looks a bit strange to have this call without any use of the return value ...

https://github.com/llvm/llvm-project/pull/135767


More information about the llvm-commits mailing list