[llvm] [CopyProf] Prefer RequirePassInfoMixin (PR #218197)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 22 22:27:42 PDT 2026


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/218197

PassInfoMixin will be removed soon. Given these passes are sanitizer
passes, we also probably want them to run regardless of the presence of
optnone.


>From 62d19d54c2bd140ffca1041f7ea268af4a2f2d0a Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Sun, 23 Aug 2026 05:27:29 +0000
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.7
---
 llvm/include/llvm/Transforms/Instrumentation/CopyProf.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/include/llvm/Transforms/Instrumentation/CopyProf.h b/llvm/include/llvm/Transforms/Instrumentation/CopyProf.h
index 5755b4ccd693b..53586b5d6c01f 100644
--- a/llvm/include/llvm/Transforms/Instrumentation/CopyProf.h
+++ b/llvm/include/llvm/Transforms/Instrumentation/CopyProf.h
@@ -20,7 +20,7 @@ namespace llvm {
 
 // Early-stage pass that instruments special member functions to call into the
 // CopyProf runtime.
-class CopyProfPass : public PassInfoMixin<CopyProfPass> {
+class CopyProfPass : public RequiredPassInfoMixin<CopyProfPass> {
 public:
   CopyProfPass() = default;
   LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);
@@ -30,7 +30,7 @@ class CopyProfPass : public PassInfoMixin<CopyProfPass> {
 
 // Module-level pass that inserts the CopyProf runtime initialization
 // constructor and hooks it into @llvm.global_ctors.
-class ModuleCopyProfPass : public PassInfoMixin<ModuleCopyProfPass> {
+class ModuleCopyProfPass : public RequiredPassInfoMixin<ModuleCopyProfPass> {
 public:
   ModuleCopyProfPass() = default;
   LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
@@ -40,7 +40,7 @@ class ModuleCopyProfPass : public PassInfoMixin<ModuleCopyProfPass> {
 
 // Late-stage pass that instruments store instructions to detect whether an
 // object copy has been modified before it is destructed.
-class CopyProfStoresPass : public PassInfoMixin<CopyProfStoresPass> {
+class CopyProfStoresPass : public RequiredPassInfoMixin<CopyProfStoresPass> {
 public:
   CopyProfStoresPass() = default;
   LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &FAM);



More information about the llvm-commits mailing list