[PATCH] D30788: [Polly] Add -polly-dump-module pass.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 12:54:05 PST 2017


Meinersbur created this revision.
Meinersbur added a project: Polly.
Herald added a subscriber: mgorny.

This pass allows writing the LLVM-IR just before and after the Polly
passes to a file.

Dumping the IR before Polly helps reproducing bugs that occur in code
generated by clang. It is the only reliable way to get the IR that
triggers a bug. The alternative is to emit the IR with

  clang -c -emit-llvm -S -o dump.ll

then pass it through all optimization passes

  opt dump.ll -basicaa -sroa ... -S -o optdump.ll

to then reproduce the error with

  opt optdump.ll -polly-opt-isl -polly-codegen -analyze

However, the IR is not the same. -O3 uses a PassBuilder than creates passes
with different parameters than the default.

Dumping the IR after Polly is useful to compare a miscompilation with
a known-good configuration.


https://reviews.llvm.org/D30788

Files:
  include/polly/LinkAllPasses.h
  include/polly/Support/DumpModulePass.h
  lib/CMakeLists.txt
  lib/Support/DumpModulePass.cpp
  lib/Support/RegisterPasses.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30788.91211.patch
Type: text/x-patch
Size: 8174 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170309/2a84d14e/attachment.bin>


More information about the llvm-commits mailing list