This is an archive of the discontinued LLVM Phabricator instance.

[Polly][CodegenCleanup] Update cleanup passes according (old) PassManagerBuilder.
ClosedPublic

Authored by Meinersbur on Sep 7 2017, 8:09 AM.

Details

Summary

Update CodegenCleanup using the function-level passes added by populatePassManager that run between EP_EarlyAsPossible and EP_VectorizerStart in -O3.

The changes in particular are:

  • Added pass create arguments, e.g. ExpensiveCombines for InstCombine.
  • Remove reroll pass. The option -reroll-loops is disabled by default.
  • Add passes run with UnitAtATime, which is the default.
  • Add instances of LibCallsShrinkWrap, TailCallElimination, SCCP (sparse conditional constant propagation), Float2Int that did not run before.
  • Add instances of GVN as in the default pipeline.

Notes:

  • GVNHoist, GVNSink, NewGVN are still disabled in the -O3 pipeline.
  • The optimization level and other optimization parameters are not accessible outside of PassManagerBuilder, hence we cannot add passes depending on these.

Diff Detail

Event Timeline

Meinersbur created this revision.Sep 7 2017, 8:09 AM
Meinersbur updated this revision to Diff 114181.Sep 7 2017, 8:12 AM

Add ExpensiveCombines argument.

grosser accepted this revision.Sep 7 2017, 8:16 AM
This revision is now accepted and ready to land.Sep 7 2017, 8:16 AM
philip.pfaffe accepted this revision.Sep 9 2017, 9:32 AM

LGTM. It would be great to actually have a testcase for this, so we'd be able to see any changes earlier.

This revision was automatically updated to reflect the committed changes.

LGTM. It would be great to actually have a testcase for this, so we'd be able to see any changes earlier.

What do you think should be tested?

Testing end-to-end full-pipeline optimizations are purposefully not done in LLVM. These would be fragile tests that potentially break with any change in the cleanup passes.

What do you think should be tested?

Not the actual optimizations of course, but the sequence of optimization passes that are being run. Take a look at the new-pm-defaults.ll testcase for an example.