[PATCH] D29016: [LoopUnswitch] Do not freeze condition if hoisted branch is guaranteed to be reachable
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 13:47:54 PST 2017
efriedma added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:631
+ // is needed.
+ bool NeedFreeze = true;
+ {
----------------
Maybe we should be a little more aggressive here? LoopUnswitch::TryTrivialLoopUnswitch has a branch-following loop which special-cases conditional branches with a constant condition.
Can we compute this once for the whole loop, rather than iterating over the whole loop for each basic block?
https://reviews.llvm.org/D29016
More information about the llvm-commits
mailing list