Roman Lebedev
03bd5198b6
[OldPM] Pass manager: run SROA after (simple) loop unrolling
...
I have stumbled into this pretty accidentally, when rewriting
some spaghetti-like code into something more structured,
which involved using some `std::array<>`s. And to my surprise,
the `alloca`s remained, causing about `+160%` perf regression.
https://llvm-compile-time-tracker.com/compare.php?from=bb6f4d32aac3eecb51909f4facc625219307ee68&to=d563e66f40f9d4d145cb2050e41cb961e2b37785&stat=instructions
suggests that this has geomean compile-time cost of `+0.08%`.
Note that D68593 / cecc0d27ad
already did this chage for NewPM, but left OldPM in a pessimized state.
This fixes [[ https://bugs.llvm.org/show_bug.cgi?id=40011 | PR40011 ]], [[ https://bugs.llvm.org/show_bug.cgi?id=42794 | PR42794 ]] and probably some other reports.
Reviewed By: nikic, xbolva00
Differential Revision: https://reviews.llvm.org/D87972
2020-10-04 11:53:50 +03:00