[PATCH] D38392: Disallow sinking of unordered atomic loads into loops

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 09:11:39 PDT 2017


reames added a comment.

In https://reviews.llvm.org/D38392#884553, @danielcdh wrote:

> Is it legal to hoist an atomic load out of the loop?


Yes, that strictly reduces the number of loads.  You can think of hoisting as reusing the load from the first iteration across future iterations and just moving where in the first iteration that load runs.  As long as that repositioning is legal, the rest of the transform is just basic FRE.


https://reviews.llvm.org/D38392





More information about the llvm-commits mailing list