[PATCH] D48026: [ScopHelper] Provide support for recognising collective invariant loads

SAHIL GIRISH YERAWAR via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 07:04:49 PDT 2018


cs15btech11044 added inline comments.


================
Comment at: lib/Analysis/ScopDetection.cpp:1168
+              invariantLS.insert(Load);
+              break;
+            } else {
----------------
philip.pfaffe wrote:
> Why do you break on the first invariant load? Why not mark all hoistables in one go?
As soon as it is decided that a load is invariant, it is put in a set and we restart this process. This would ensure invariant loads which are collective(i.e a load depending on a previous invariant load instruction), if they appear out-of-order during iteration, we still detect it as invariant.


https://reviews.llvm.org/D48026





More information about the llvm-commits mailing list