HomePhabricator

[OldPM] Pass manager: run SROA after (simple) loop unrolling

Authored by lebedev.ri on Oct 4 2020, 1:27 AM.

Description

[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 allocas 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 / cecc0d27ad58c0aed8ef9ed99bbf691e137a0f26
already did this chage for NewPM, but left OldPM in a pessimized state.

This fixes PR40011, PR42794 and probably some other reports.

Reviewed By: nikic, xbolva00

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

Details

Committed
lebedev.riOct 4 2020, 1:53 AM
Reviewer
nikic
Differential Revision
D87972: [OldPM] Pass manager: run SROA after (simple) loop unrolling
Parents
rG51beb0c80dc4: [RISCV][ASAN] unwind fixup
Branches
Unknown
Tags
Unknown