[PATCH] D157068: [Attributor] New attribute to identify what byte ranges are alive for an allocation
Vidhush Singhal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 20 07:00:02 PDT 2023
vidsinghal added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:12224
+
+ const auto &OtherAAImpl = static_cast<const AAPointerInfoImpl &>(*PI);
+ const auto &State = OtherAAImpl.getState();
----------------
jdoerfert wrote:
> We should not cast things to the Impl. Expose the functions you need in the AAPointerInfo interface instead.
I think it might make sense to expose the state in the AAPointerInfo struct.
AAAllocation Info might need more information from AAPointerInfo for more complex cases.
But I wanted to get an opinion before doing that.
Right now, State is defined in the AAPointerInfo namespace in llvm/lib/Transforms/IPO/AttributorAttributes.cpp
However, the AAPointerInfo struct does not store it, so that information cannot be accessed without casting to AAPointerInfoImpl.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157068/new/
https://reviews.llvm.org/D157068
More information about the llvm-commits
mailing list