[all-commits] [llvm/llvm-project] 4e4abd: [Deref] Use maximum trip count instead of exact tr...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Oct 28 14:33:53 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e4abd16a74d432e29c27cc68b0493e46f679a91
      https://github.com/llvm/llvm-project/commit/4e4abd16a74d432e29c27cc68b0493e46f679a91
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2020-10-28 (Wed, 28 Oct 2020)

  Changed paths:
    M llvm/lib/Analysis/Loads.cpp
    M llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll

  Log Message:
  -----------
  [Deref] Use maximum trip count instead of exact trip count

When trying to prove that a memory access touches only dereferenceable memory across all iterations of a loop, use the maximum exit count rather than an exact one.  In many cases we can't prove exact exit counts whereas we can prove an upper bound.

The test included is for a single exit loop with a min(C,V) exit count, but the true motivation is support for multiple exits loops.  It's just really hard to write a test case for multiple exits because the vectorizer (the primary user of this API), bails far before this.  For multiple exits, this allows a mix of analyzeable and unanalyzable exits when only analyzeable exits are needed to prove deref.




More information about the All-commits mailing list