[llvm] [ThinLTO] Don't mark calloc function dead (PR #72673)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 02:02:17 PST 2023


================
@@ -0,0 +1,11 @@
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare ptr @malloc(i64)
+
+define ptr @_ZnwmRKSt9nothrow_t(i64 %size, ptr %0) {
----------------
eleviant wrote:

Originally it was in separate source file (as part of larger C++ program), but as we don't run optimizations on source IR this "operator new" won't be converted to calloc by opt, so we can safely move it to main input file. I'll update the patch.

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


More information about the llvm-commits mailing list