[llvm] [LAA] Prepare to handle diff type sizes v2 (NFC) (PR #161238)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 23:51:59 PDT 2026
================
@@ -419,29 +419,30 @@ class MemoryDepChecker {
uint64_t MaxStride;
std::optional<uint64_t> CommonStride;
- /// TypeByteSize is either the common store size of both accesses, or 0 when
- /// store sizes mismatch.
- uint64_t TypeByteSize;
+ /// TypeByteSize is a pair of alloc sizes of the source and sink.
+ std::pair<uint64_t, uint64_t> TypeByteSize;
+
+ // HasSameSize is a boolean indicating whether the store sizes of the source
+ // and sink are equal.
+ // TODO: Remove this.
+ bool HasSameSize;
----------------
artagnon wrote:
The issue is that HasSameSize isn't a name I picked, and is already present in existing code:
```cpp
if (SE.isKnownNonPositive(Dist)) {
if (SE.isKnownNonNegative(Dist)) {
if (HasSameSize) {
```
I think that maybe a rename along with the existing NFC patch would make it even more confusing? Yes, it would be removed in a follow-up following the three follow-ups I already listed.
https://github.com/llvm/llvm-project/pull/161238
More information about the llvm-commits
mailing list