[PATCH] D111276: [ArgumentPromotion] Support opaque pointers
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 15 08:11:36 PST 2021
nikic added a comment.
This looks good to me. Regarding the tests, I'd prefer to not modify them in this way and have a separate test with opaque pointers instead, otherwise update_test_checks doesn't work, and that's always a PITA when making changes.
Also worth noting that ArgPromotion uses areFunctionArgsABICompatible(), which currently accesses pointer element types and will need a signature change.
================
Comment at: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:957
+ Type *ByValTy =
+ PtrArg->hasByValAttr() ? PtrArg->getParamByValType() : nullptr;
+ bool isSafeToPromote =
----------------
Don't think you need the hasByValAttr() call here, getParamByValType() should already return nullptr.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111276/new/
https://reviews.llvm.org/D111276
More information about the llvm-commits
mailing list