This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Add -polly-dump-module pass.
ClosedPublic

Authored by Meinersbur on Mar 9 2017, 12:54 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Mar 9 2017, 12:54 PM
grosser accepted this revision.Mar 9 2017, 1:11 PM

Hi Michael,

this looks good to me.

This revision is now accepted and ready to land.Mar 9 2017, 1:11 PM
This revision was automatically updated to reflect the committed changes.