[PATCH] D32433: Compute safety information in a much finer granularity.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 12:20:19 PDT 2017
efriedma added inline comments.
================
Comment at: llvm/trunk/lib/Transforms/Utils/LoopUtils.cpp:1050
+ for (Instruction *ExitInst : SafetyInfo->EarlyExits)
+ if (!DT->dominates(&Inst, ExitInst))
+ return false;
----------------
This could be slow: if the two instructions are in the same basic block, dominates() will iterate over the whole block. And you don't attempt to prune the EarlyExits list, which could make LICM O(N^3) overall for a large loop with a single basic block.
I guess we'll see if it matters in practice.
Repository:
rL LLVM
https://reviews.llvm.org/D32433
More information about the llvm-commits
mailing list