[PATCH] D120586: [Attributor] Add AAAddressSpaceInfo to deduce address spaces

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 19:13:32 PDT 2023


tianshilei1992 added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11900
+  int32_t getAddressSpace() const override {
+    if (!isValidState())
+      return 0;
----------------
We probably want an assertion here. Returning 0 is not necessarily correct for the case where the AS associated with the value is non-zero but somehow the state is invalid. Essentially we don't want users to call this method if the AA is invalid.


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