[all-commits] [llvm/llvm-project] f2cfef: Be more mathematicly precise about definition of r...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Feb 26 11:22:23 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f2cfef35966a24265b9e3c1b5ef8e64dcd5f431a
      https://github.com/llvm/llvm-project/commit/f2cfef35966a24265b9e3c1b5ef8e64dcd5f431a
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-02-26 (Fri, 26 Feb 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/ValueTracking.h
    M llvm/lib/Analysis/ValueTracking.cpp

  Log Message:
  -----------
  Be more mathematicly precise about definition of recurrence [NFC]

This clarifies the interface of the matchSimpleRecurrence helper introduced in 8020be0b8 for non-commutative operators.  After ebd3aeba, I realized the original way I framed the routine was inconsistent.  For shifts, we only matched the the LHS form, but for sub we matched both and the caller wanted that information.  So, instead, we now consistently match both forms for non-commutative operators and the caller becomes responsible for filtering if needed.  I tried to put a clear warning in the header because I suspect the RHS form of e.g. a sub recurrence is non-obvious for most folks.  (It was for me.)




More information about the All-commits mailing list