[llvm] [ObjCARC] Add more intrinsics that do not touch reference counts. (PR #94919)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 9 14:54:32 PDT 2024
https://github.com/AtariDreams created https://github.com/llvm/llvm-project/pull/94919
memset, memmove, and memcpy have variations that are not covered by the switch case but should be. They do not touch the retain count either.
>From 1be96ec8072339e18fa12a6d1b211e82378900ec Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Sun, 9 Jun 2024 17:45:26 -0400
Subject: [PATCH] [ObjCARC] Add more intrinsics that do not touch reference
counts.
---
llvm/lib/Analysis/ObjCARCInstKind.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/llvm/lib/Analysis/ObjCARCInstKind.cpp b/llvm/lib/Analysis/ObjCARCInstKind.cpp
index d177ee056a93a..370ed88bf57df 100644
--- a/llvm/lib/Analysis/ObjCARCInstKind.cpp
+++ b/llvm/lib/Analysis/ObjCARCInstKind.cpp
@@ -201,8 +201,13 @@ static bool isUseOnlyIntrinsic(unsigned ID) {
// TODO: Expand this into a covered switch. There is a lot more here.
switch (ID) {
case Intrinsic::memcpy:
+ case Intrinsic::memcpy_element_unordered_atomic:
+ case Intrinsic::memcpy_inline:
case Intrinsic::memmove:
+ case Intrinsic::memmove_element_unordered_atomic:
case Intrinsic::memset:
+ case Intrinsic::memset_element_unordered_atomic:
+ case Intrinsic::memset_inline:
return true;
default:
return false;
More information about the llvm-commits
mailing list