Open llvmbot opened 11 years ago
I've noticed (belatedly) that the -scalarrepl pass is the legacy scalar replacement of aggregates pass, and that it has been superceded by -sroa in LLVM 3.2. Executing opt with -sroa is fast - though I now need to run a separate pass of -mem2reg, which is still slow (0.5s).
So perhaps this bug could be better categorized as a performance regression in the mem2reg pass, not SROA.
Test with:
time opt -mem2reg slow_sroa.ll
The attachement "slow_sroa.ll" is 2.7Mb and was not able to attach. I can email it to any interested developers.
Can you try compressing it with xz?
The attachement "slow_sroa.ll" is 2.7Mb and was not able to attach. I can email it to any interested developers.
Extended Description
This was originally sent to the LLVM mailing list after the LLVM 3.0 release, but it still seems to be an issue in 3.2. The attached file optimizes much faster (about 3x better) in LLVM 2.8 compared to 3.2. Performance didn't change on this test case between 3.0 and 3.2.
time opt -scalarrepl slow_sroa.ll
On my system: 2.8: 0.16s 3.2: 0.5s
This is from email correspondence on llvm-dev:
Actually, -scalarrepl-ssa is the slower one.
On 04/05/2012 06:56 PM, Andrew Clinton wrote: