================
@@ -5501,7 +5505,32 @@ 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;
+ SmallVector<Attributor::AlignmentCallbackTy, 1> AligmentCBs =
+ A.getAlignmentCallback(getIRPosition());
+
+ for (Attributor::AlignmentCallbackTy CB : AligmentCBs)
+ CB(getIRPosition(), this, Values);
+
+ if (!Values.empty()) {
+ StateType T;
+ for (AA::ValueAndContext &VAC : Values) {
+ const AAAlign *AA = A.getAAFor<AAAlign>(
+ *this, IRPosition::value(*VAC.getValue()), DepClassTy::REQUIRED);
+ if (AA && this != AA) {
----------------
shiltian wrote:
Not sure if that's a good idea to compare AA directly instead of comparing the
associated value.
https://github.com/llvm/llvm-project/pull/145278
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits