1. [CMake] Add llvm-profgen to LLVM_TEST_DEPENDS (details)
  2. Reland Pin -loop-reduce to legacy PM (details)
Commit b4cbb87feab0ce5fe0658711cce0e71075206c6f by i
[CMake] Add llvm-profgen to LLVM_TEST_DEPENDS

Otherwise `check-llvm-*` may not rebuild llvm-profgen, causing llvm-profgen tests
to fail if llvm-profgen happens to be stale.
The file was modifiedllvm/test/CMakeLists.txt
Commit 664b187160dc951c2cea3b69f92decf358d8e75a by aeubanks
Reland Pin -loop-reduce to legacy PM

This was accidentally reverted by a later change.

LSR currently only runs in the codegen pass manager.
There are a couple issues with LSR and the NPM.
1) Lots of tests assume that LCSSA isn't run before LSR. This breaks a
bunch of tests' expected output. This is fixable with some time put in.
2) LSR doesn't preserve LCSSA. See
llvm/test/Analysis/MemorySSA/update-remove-deadblocks.ll. LSR's use of
SCEVExpander is the only use of SCEVExpander where the PreserveLCSSA option is
off. Turning it on causes some code sinking out of loops to fail due to
SCEVExpander's inability to handle the newly created trivial PHI nodes in the
broken critical edge (I was looking at
I also tried simply just calling formLCSSA() at the end of LSR, but the extra
PHI nodes cause regressions in codegen tests.

We'll delay figuring these issues out until later.

This causes the number of check-llvm failures with -enable-new-pm true
by default to go from 60 to 29.

Reviewed By: asbirlea

Differential Revision:
The file was modifiedllvm/tools/opt/opt.cpp