[CodegenCleanup] Update cleanup passes according (old) PassManagerBuilder.
commit077995f6a2d999e25d5bdd2748d93d0ccf8a5994
authorMichael Kruse <llvm@meinersbur.de>
Sat, 9 Sep 2017 21:43:49 +0000 (9 21:43 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Sat, 9 Sep 2017 21:43:49 +0000 (9 21:43 +0000)
treed5fd740575e403d7bc9f411423b3235a94edc55a
parentc1dc3e2e1ad253011db4928637684f2c75d994b3
[CodegenCleanup] Update cleanup passes according (old) PassManagerBuilder.

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.

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

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@312875 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodegenCleanup.cpp