[all-commits] [llvm/llvm-project] 0aff31: [CodeGen] Fix getArrayAccessFor crashes as in bug ...

Michael Kruse via All-commits all-commits at lists.llvm.org
Tue Nov 12 11:59:54 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0aff3174dcc00516fd26c6554266b05a236166bb
      https://github.com/llvm/llvm-project/commit/0aff3174dcc00516fd26c6554266b05a236166bb
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2019-11-12 (Tue, 12 Nov 2019)

  Changed paths:
    M polly/lib/CodeGen/BlockGenerators.cpp

  Log Message:
  -----------
  [CodeGen] Fix getArrayAccessFor crashes as in bug 32534 with -polly-vectorizer=polly.

Root cause is VectorBlockGenerator::copyStmt iterates all instructions
in basic block, however some load instructions may be not unnecessary
thus removed by simplification. As a result, these load instructions
don't have a corresponding array.

Looking at BlockGenerator::copyBB, it only iterates instructions list
of ScopStmt. Given it must be a block type scop in case of
vectorization, I think we should do the same in
VectorBlockGenerator::copyStmt.

Patch by bin.narwal <bin.narwal at gmail.com>

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




More information about the All-commits mailing list