[all-commits] [llvm/llvm-project] 3d6fe7: [LoopCacheAnalysis] Use stable_sort() to avoid non...

CongzheUalberta via All-commits all-commits at lists.llvm.org
Sun May 1 21:55:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d6fe7ace8b0a335273162a977439d5521e6548b
      https://github.com/llvm/llvm-project/commit/3d6fe7ace8b0a335273162a977439d5521e6548b
  Author: Congzhe Cao <congzhe.cao at huawei.com>
  Date:   2022-05-02 (Mon, 02 May 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/LoopCacheAnalysis.h
    M llvm/test/Analysis/LoopCacheAnalysis/PowerPC/LoopnestFixedSize.ll
    M llvm/test/Analysis/LoopCacheAnalysis/PowerPC/loads-store.ll
    M llvm/test/Analysis/LoopCacheAnalysis/PowerPC/matmul.ll
    M llvm/test/Analysis/LoopCacheAnalysis/PowerPC/matvecmul.ll
    M llvm/test/Analysis/LoopCacheAnalysis/PowerPC/single-store.ll
    M llvm/test/Analysis/LoopCacheAnalysis/PowerPC/stencil.ll

  Log Message:
  -----------
  [LoopCacheAnalysis] Use stable_sort() to avoid non-deterministic print output

The print output of loop cache analysis sometimes has a non-deterministic order
and therefore we have been using `CHECK-DAG` in its lit tests. This patch changes
the sorting of LoopCosts to llvm::stable_sort() where we compare loop cost numbers
and sort the loops. In case of the same loop cost numbers, llvm::stable_sort() now
would output a deterministic loop order.

Reviewed By: Meinersbur, fhahn, #loopoptwg

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




More information about the All-commits mailing list