[all-commits] [llvm/llvm-project] 6249bf: [Polly][CodeGen] Remove use of ScalarEvolution.

Michael Kruse via All-commits all-commits at lists.llvm.org
Mon Dec 7 13:22:52 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6249bfeefeed7ee2634355d4d7523b46fb00fda6
      https://github.com/llvm/llvm-project/commit/6249bfeefeed7ee2634355d4d7523b46fb00fda6
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M polly/lib/CodeGen/IRBuilder.cpp
    A polly/test/Isl/CodeGen/scev-backedgetaken.ll

  Log Message:
  -----------
  [Polly][CodeGen] Remove use of ScalarEvolution.

ScalarEvolution::getSCEV cannot be used during codegen. ScalarEvolution
assumes a stable IR and control flow which is under construction during
Polly's CodeGen. In particular, it uses DominatorTree for compute the
backedge taken count. However the DominatorTree is not updated during
codegen.

In this case, SCEV was used to determine the base pointer of an array
access. Replace it by our own function. Polly generates only GEP and
BitCasts for array acceses, i.e. it is sufficient to handle these to to
find the base pointer.

Fixes llvm.org/PR48422




More information about the All-commits mailing list