[PATCH] D136526: [AAPointerInfo] refactor how offsets and Access objects are tracked
Thorsten via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 27 08:54:53 PDT 2022
tschuett added inline comments.
================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:214
/// uncertainty and check for overlapping accesses.
-struct OffsetAndSize : public std::pair<int64_t, int64_t> {
- using BaseTy = std::pair<int64_t, int64_t>;
- OffsetAndSize(int64_t Offset, int64_t Size) : BaseTy(Offset, Size) {}
- OffsetAndSize(const BaseTy &P) : BaseTy(P) {}
- int64_t getOffset() const { return first; }
- int64_t getSize() const { return second; }
- static OffsetAndSize getUnknown() { return OffsetAndSize(Unknown, Unknown); }
- static OffsetAndSize getUnassigned() {
- return OffsetAndSize(Unassigned, Unassigned);
- }
+struct OffsetAndSize {
+ int64_t Offset = Unassigned;
----------------
Would a class with public and private make this safer to use?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136526/new/
https://reviews.llvm.org/D136526
More information about the llvm-commits
mailing list