[llvm] [IR] Remove getDestAlignment and getSourceAlignment (PR #151282)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 23:22:15 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/151282

This patch removes getDestAlignment and getSourceAlignment as they
have been deprecated for more than two years since:

  commit 135f23d67bf5397745be1897afd0a3a50119089f
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   Mon Jan 16 12:34:40 2023 +0000

I'm not aware of any downstream users AFAIK.


>From 90190211b165090a645e12055ecf3927059cc9f1 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 29 Jul 2025 14:27:09 -0700
Subject: [PATCH] [IR] Remove getDestAlignment and getSourceAlignment

This patch removes getDestAlignment and getSourceAlignment as they
have been deprecated for more than two years since:

  commit 135f23d67bf5397745be1897afd0a3a50119089f
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   Mon Jan 16 12:34:40 2023 +0000

I'm not aware of any downstream users AFAIK.
---
 llvm/include/llvm/IR/IntrinsicInst.h | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/llvm/include/llvm/IR/IntrinsicInst.h b/llvm/include/llvm/IR/IntrinsicInst.h
index 0318427bf8a1c..2e1389633d7e4 100644
--- a/llvm/include/llvm/IR/IntrinsicInst.h
+++ b/llvm/include/llvm/IR/IntrinsicInst.h
@@ -996,14 +996,6 @@ template <typename Derived> class MemIntrinsicBase : public IntrinsicInst {
     return cast<PointerType>(getRawDest()->getType())->getAddressSpace();
   }
 
-  /// FIXME: Remove this function once transition to Align is over.
-  /// Use getDestAlign() instead.
-  LLVM_DEPRECATED("Use getDestAlign() instead", "getDestAlign")
-  unsigned getDestAlignment() const {
-    if (auto MA = getParamAlign(ARG_DEST))
-      return MA->value();
-    return 0;
-  }
   MaybeAlign getDestAlign() const { return getParamAlign(ARG_DEST); }
 
   /// Set the specified arguments of the instruction.
@@ -1057,15 +1049,6 @@ template <class BaseCL> class MemTransferBase : public BaseCL {
     return cast<PointerType>(getRawSource()->getType())->getAddressSpace();
   }
 
-  /// FIXME: Remove this function once transition to Align is over.
-  /// Use getSourceAlign() instead.
-  LLVM_DEPRECATED("Use getSourceAlign() instead", "getSourceAlign")
-  unsigned getSourceAlignment() const {
-    if (auto MA = BaseCL::getParamAlign(ARG_SOURCE))
-      return MA->value();
-    return 0;
-  }
-
   MaybeAlign getSourceAlign() const {
     return BaseCL::getParamAlign(ARG_SOURCE);
   }



More information about the llvm-commits mailing list