[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:04:28 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()) {
+ for (const auto &CB : AligmentCBs) {
+ CB(getIRPosition(), this, Values);
+ }
+
+ if (!Values.empty()) {
+ StateType T;
+ for (const auto &VAC : Values) {
----------------
shiltian wrote:
no auto
https://github.com/llvm/llvm-project/pull/145278
More information about the cfe-commits
mailing list