[NewPM] Remove SpeculateAroundPHIs pass
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 15 Jun 2021 17:32:43 +0000 (20:32 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 15 Jun 2021 17:35:55 +0000 (20:35 +0300)
commite52364532afb2748c324f360bc1cc12605d314f3
tree5342d0ec4d609d6f94677348a80dfbc347aac379
parentb8567559cf3872d0cc2a0ed24a171da8b1ff400f
[NewPM] Remove SpeculateAroundPHIs pass

Addition of this pass has been botched.
There is no particular reason why it had to be sold as an inseparable part
of new-pm transition. It was added when old-pm was still the default,
and very *very* few users were actually tracking new-pm,
so it's effects weren't measured.

Which means, some of the turnoil of the new-pm transition
are actually likely regressions due to this pass.

Likewise, there has been a number of post-commit feedback
(post new-pm switch), namely
* https://reviews.llvm.org/D37467#2787157 (regresses HW-loops)
* https://reviews.llvm.org/D37467#2787259 (should not be in middle-end, should run after LSR, not before)
* https://reviews.llvm.org/D95789 (an attempt to fix bad loop backedge metadata)
and in the half year past, the pass authors (google) still haven't found time to respond to any of that.

Hereby it is proposed to backout the pass from the pipeline,
until someone who cares about it can address the issues reported,
and properly start the process of adding a new pass into the pipeline,
with proper performance evaluation.

Furthermore, neither google nor facebook reports any perf changes
from this change, so i'm dropping the pass completely.
It can always be re-reverted should/if anyone want to pick it up again.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D104099
17 files changed:
clang/test/CodeGen/thinlto-distributed-newpm.ll
llvm/include/llvm/Transforms/Scalar/SpeculateAroundPHIs.h [deleted file]
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/Scalar/CMakeLists.txt
llvm/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp [deleted file]
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-thinlto-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
llvm/test/Transforms/LoopUnroll/AArch64/runtime-unroll-generic.ll
llvm/test/Transforms/PhaseOrdering/AArch64/hoisting-sinking-required-for-vectorization.ll
llvm/test/Transforms/PhaseOrdering/loop-rotation-vs-common-code-hoisting.ll
llvm/test/Transforms/SpeculateAroundPHIs/basic-x86.ll [deleted file]
llvm/test/Transforms/SpeculateAroundPHIs/convergent.ll [deleted file]
llvm/test/Transforms/SpeculateAroundPHIs/pr42991.ll [deleted file]
llvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn