[PATCH] D32720: [LICM] Introduce a finer granularity option to compute early exits.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 12:21:17 PDT 2017


efriedma requested changes to this revision.
efriedma added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/Transforms/Utils/LoopUtils.cpp:1053
+    for (Instruction *ExitInst : SafetyInfo->EarlyExits)
+      if (!SafetyInfo->OI.dominates(&Inst, ExitInst))
+        return false;
----------------
Actually, one more issue we probably need to address.

This is potentially linear in the number of calls in the loop, since we don't try to prune EarlyExits at all.  This makes LICM potentially O(n^2) overall.  Can we store this information in some more efficient way?


https://reviews.llvm.org/D32720





More information about the llvm-commits mailing list