[PATCH] D72423: [DemandedBits] Improve accuracy of Add propagator

Erika via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 14 04:42:21 PDT 2020


rrika added inline comments.


================
Comment at: llvm/include/llvm/Analysis/DemandedBits.h:64-66
+  /// Compute alive bits of one addition operand from alive output and known
+  /// operand bits
+  static APInt determineLiveOperandBitsAdd(unsigned OperandNo,
----------------
lebedev.ri wrote:
> I find the naming scheme confusing. Why [a]live?
> What we are deducing here, is what bits of operand OperandNo
> are actually *demanded* given the demanded bits of result of operation, no?
`determineLiveOperandBitsAdd` and `determineLiveOperandBitsSub` are factored out of `determineLiveOperandBits` so that's where the name is from. I believe the names demanded bits/alive bits are interchangeable in this context?


================
Comment at: llvm/include/llvm/Analysis/DemandedBits.h:76
+                                           const KnownBits &LHS,
+                                           const KnownBits &RHS);
+
----------------
RKSimon wrote:
> Would it make sense to move this into KnownBits so DAG/GlobalIsel can reuse it more easily?
Is that a question to me, or the other reviewers?


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

https://reviews.llvm.org/D72423



More information about the llvm-commits mailing list