[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 25 10:03:37 PDT 2025


================
@@ -5500,7 +5504,34 @@ struct AAAlignCallSiteReturned final
   using Base = AACalleeToCallSite<AAAlign, AAAlignImpl>;
   AAAlignCallSiteReturned(const IRPosition &IRP, Attributor &A)
       : Base(IRP, A) {}
+  ChangeStatus updateImpl(Attributor &A) override {
+    SmallVector<AA::ValueAndContext> Values;
+    const auto &AligmentCBs = A.getAlignmentCallback(getIRPosition());
+
+    if (!AligmentCBs.empty()) {
----------------
shiltian wrote:

since `lookup` will do a default construct, you don't need to check emptiness here.

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


More information about the cfe-commits mailing list