[PATCH] D24934: [LICM] Add support of a new optimization case to Loop Versioning for LICM + code clean up

Evgeny Astigeevich via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 01:57:18 PDT 2016


eastig added inline comments.


> ashutosh.nema wrote in LoopVersioningLICM.cpp:489
> Agree it does not change the existing behavior, but for new cases why you enforcing such restriction.
> 
> In your example it can be other way around as well where the inner loop has 1000 iteration and outer loop has 10 iterations and its actually beneficial to hoist load from inner load to outer lop. LoopVersioning LICM does not make any hoisting decision, actual decision & hoisting will be done later by LICM.
> 
> Are you getting issues/degrades by allowing inner loops ?

> Are you getting issues/degrades by allowing inner loops ?

No, I have not seen any issues and performance regressions yet.
I finally made runs when the pass was enabled by default as a part of the middle-end. Before I had manually run opt with the pass and then llc.
I've got +20%...+48.5% performance improvement.
This restriction is fully based on my experience of implementing different optimizations for loop nests.
I will remove the restriction.

https://reviews.llvm.org/D24934





More information about the llvm-commits mailing list