[all-commits] [llvm/llvm-project] 1f5542: [LoopCacheAnalysis]: Add support for negative stride

rcraik via All-commits all-commits at lists.llvm.org
Mon Feb 10 10:23:35 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1f5542006502784e21e1a832221ff8cb56c7dbd2
      https://github.com/llvm/llvm-project/commit/1f5542006502784e21e1a832221ff8cb56c7dbd2
  Author: Rachel Craik <rcraik at ca.ibm.com>
  Date:   2020-02-10 (Mon, 10 Feb 2020)

  Changed paths:
    M llvm/lib/Analysis/LoopCacheAnalysis.cpp
    M llvm/test/Analysis/LoopCacheAnalysis/PowerPC/compute-cost.ll

  Log Message:
  -----------
  [LoopCacheAnalysis]: Add support for negative stride

LoopCacheAnalysis currently assumes the loop will be iterated over in
a forward direction. This patch addresses the issue by using the
absolute value of the stride when iterating backwards.

Note: this patch will treat negative and positive array access the
same, resulting in the same cost being calculated for single and
bi-directional access patterns. This should be improved in a
subsequent patch.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D73064




More information about the All-commits mailing list