[PATCH] D146233: [LICM] Don't promote store to global even in single-thread mode

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 13:55:34 PDT 2023


nikic added a comment.

In D146233#4200306 <https://reviews.llvm.org/D146233#4200306>, @jdoerfert wrote:

> Can we make this less drastic by checking the global. If it is internal and doesn't have its address taken there are no aliasing pointers, I think/hope.

I don't think there's any simple way to do this. Note that this does not actually require the address to be taken -- creating a noalias pointer does not constitute a capture.

It's probably worth pointing out that this code was only recently introduced by D130466 <https://reviews.llvm.org/D130466> and only applies under `-mthread-model=single`. This change does not affect/regress normal LICM.


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

https://reviews.llvm.org/D146233



More information about the llvm-commits mailing list