[PATCH] D141164: [WIP][AAUnderlyingObjects] Introduce an AA for getting underlying objects of a pointer

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 15:16:20 PST 2023


jdoerfert added inline comments.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:5470
+  static const char ID;
+};
+
----------------
You miss a public interface here, right?


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11248
+/// A type to track all underlying objects for AAUnderlyingObjects.
+struct AA::UnderlyingObjects::State : public AbstractState {
+  /// Return the best possible representable state.
----------------
If you don't use it elsewhere, just put it in the AA...Impl class below.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11330
+        continue;
+      }
+
----------------
PHI and select, not load, at least not yet. Though we could do the PHI + select logic also for loads.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11533
+// TODO: This should not be all positions. IRP_FUNCTION is invalid.
+CREATE_ALL_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAUnderlyingObjects)
 
----------------
You want to allow function positions, the result is just the function.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141164/new/

https://reviews.llvm.org/D141164



More information about the llvm-commits mailing list