[PATCH] D133192: [LICM] Allow load-only scalar promotion in the presence of aliasing loads

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 30 07:54:11 PDT 2022


nikic added a comment.

Okay, I've gotten around to investigating the compile-time impact here a bit more. Apart from BatchAA-based optimization, the key insight was that if we have a set that only contains stores, and there are reads outside the set, then we will not be able to promote and can discard such cases early. This cuts down the number of promotion candidates we consider by half.

With this, the LICM promotion statistics look as follows:

                              |  Old |  New
  licm.NumPromotionCandidates | 4448 | 6038
  licm.NumLoadPromoted        |  479 | 1069
  licm.NumLoadStorePromoted   | 1459 | 1459

As expected, load+store promotions remain unchanged, while load-only promotions increase by a factor of two.

New compile-time numbers are: http://llvm-compile-time-tracker.com/compare.php?from=57f7f0d6cf0706a88e1ecb74f3d3e8891cceabfa&to=72b811738148aab399966a0435f13b695da1c1c8&stat=instructions It's still not free, but seems to be mostly focused on SPASS now.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133192/new/

https://reviews.llvm.org/D133192



More information about the llvm-commits mailing list