[PATCH] D88669: [ValueTracking] Add tracking of the alignment assume bundle

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 16:11:10 PDT 2020


jdoerfert added a subscriber: arichardson.
jdoerfert added a comment.

Reverse ping. More comments (nits) and notice that we should merge this, D89830 <https://reviews.llvm.org/D89830> reimplemented it in the meantime, see my comment there too.



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:676
+  if (Q.CxtI && V->getType()->isPointerTy()) {
+    SmallVector<Attribute::AttrKind, 2> AttrKinds{Attribute::Alignment};
+    if (RetainedKnowledge RK =
----------------
No need for the vector, replace it below with `{Attribute::Alignment}`.

In D89830 @arichardson uses `Log2_32` instead of `countTrailingZeros`. I think that makes sense since we have a power of 2.


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

https://reviews.llvm.org/D88669



More information about the llvm-commits mailing list