[all-commits] [llvm/llvm-project] de34b5: [SCEV] Swap guards estimation sequence. NFC

Daniil Fukalov via All-commits all-commits at lists.llvm.org
Mon Jan 20 05:41:22 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: de34b54edce4b7b4e4a68a02fae10283b3e2d7ea
      https://github.com/llvm/llvm-project/commit/de34b54edce4b7b4e4a68a02fae10283b3e2d7ea
  Author: dfukalov <daniil.fukalov at amd.com>
  Date:   2020-01-20 (Mon, 20 Jan 2020)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp

  Log Message:
  -----------
  [SCEV] Swap guards estimation sequence. NFC

Summary:
Loop unroll spends a lot of time in SCEVs processing in case when a function
contains hundreds of simple 'for' loops with a quite complex arrays indexes like

  for (int i = 0; i < 8; ++i) {
    for (int j = 0; j < 32; ++j) {
      C[j*8+i] = B[j*32+i+128] + A[i*64+128];
    }
  }
  for (int i = 0; i < 8; ++i) {
    for (int j = 0; j < 8; ++j) {
      for (int k = 0; k < 32; ++k) {
        D[k*64+i*8+j] = D[k*64+i*8+j] + E[i+16] * C[k*8+j+256];
      }
    }
  }

The patch improves loop unroll speed since isLoopBackedgeGuardedByCond takes
much less time than isLoopEntryGuardedByCond in the edge case.

Reviewers: skatkov, sanjoy, mkazantsev

Reviewed By: sanjoy

Subscribers: fhahn, hiraditya, javed.absar, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list