[PATCH] D128481: Add expensive/extensive pass to set Load/Store alignment

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 01:26:33 PDT 2022


nikic added inline comments.
Herald added a subscriber: steakhal.


================
Comment at: llvm/lib/Transforms/Scalar/SetLoadStoreAlignment.cpp:59
+  auto it = FuncKnownBits.find(&I);
+  Optional<KnownBits> previousValue;
+  if (it != FuncKnownBits.end()) {
----------------
nit: PreviousValue


================
Comment at: llvm/lib/Transforms/Scalar/SetLoadStoreAlignment.cpp:69
+  FuncKnownBits[&I] = Known;
+  // If there is no update return early and don't add uses to the worklist.
+  if (previousValue && *previousValue == Known)
----------------
Assert monotonic lattice here? If I got the logic right:
```
assert((Known.One & PreviousValue->One) == PreviousValue->One);
assert((Known.Zero & PreviousValue->Zero) == PreviousValue->Zero);
```



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

https://reviews.llvm.org/D128481



More information about the llvm-commits mailing list