[llvm] [Attributor] Pack out arguments into a struct (PR #119267)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 26 05:19:33 PST 2024
================
@@ -12989,6 +12991,179 @@ struct AAAllocationInfoCallSiteArgument : AAAllocationInfoImpl {
};
} // namespace
+/// ----------- AAConvertOutArgument ----------
+namespace {
+struct AAConvertOutArgumentFunction final : AAConvertOutArgument {
+ AAConvertOutArgumentFunction(const IRPosition &IRP, Attributor &A)
+ : AAConvertOutArgument(IRP, A) {}
+
+ /// See AbstractAttribute::updateImpl(...).
+ ChangeStatus updateImpl(Attributor &A) override {
+ const Function *F = getAssociatedFunction();
+ if (!F || F->isDeclaration())
+ return indicatePessimisticFixpoint();
+
+ bool hasCandidateArg = false;
+ for (const Argument &Arg : F->args())
+ if (Arg.getType()->isPointerTy() && isEligibleArgument(Arg, A, *this))
----------------
elhewaty wrote:
Doesn't `hasPointeeInMemoryValueAttr()` do this?
https://github.com/llvm/llvm-project/pull/119267
More information about the llvm-commits
mailing list