[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
Loading
Please sign in to comment