[PATCH] D50891: [LICM] Hoist guards from non-header blocks

Fedor Sergeev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 17 05:52:16 PDT 2018


fedor.sergeev added inline comments.


================
Comment at: include/llvm/Analysis/MustExecute.h:77
 
+  /// Returns true if we could not execute a memory-modifying instruction before
+  /// we enter \p BB under assumption that \p CurLoop is entered.
----------------
'could not' does not seem to be a right verb here.

Perhaps 'does not' better meets the purpose (doesNotWriteMemoryBefore?).


================
Comment at: lib/Analysis/MustExecute.cpp:193
+  // to memory.
+  // TODO: Cache this in a manner like ICF?
+  for (auto *Pred : Predecessors)
----------------
Since current usage of this interface is limited to invariant guards only it should not be a pressing problem compile-time wise.
But it is worth to at least consider our options.
Did you think about extending ICF to track this information as well?



https://reviews.llvm.org/D50891





More information about the llvm-commits mailing list