[PATCH] D120586: [Attributor] Add AAAddressSpace to deduce address spaces
Shilei Tian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 9 19:27:17 PDT 2023
tianshilei1992 added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11944
+ bool takeAddressSpace(uint32_t AS) {
+ int32_t Cast = static_cast<int32_t>(AS);
+ if (AssumedAddressSpace == NoAddressSpace) {
----------------
jdoerfert wrote:
> Why do we cast this? Keep one type consistently.
`getPointerAddressSpace()` returns `uint32_t` but `AssumedAddressSpace` is `int32_t` since `AssumedAddressSpace` can be `-1`. There must be a cast.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120586/new/
https://reviews.llvm.org/D120586
More information about the llvm-commits
mailing list