[PATCH] D80084: [CodeMoverUtils] Use dominator tree level to decide the direction of code motion
Whitney Tsang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 12:06:54 PDT 2020
Whitney added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:337
SmallPtrSet<Instruction *, 10> InstsToCheck;
collectInstructionsInBetween(StartInst, EndInst, InstsToCheck);
if (!MoveForward)
----------------
nikic wrote:
> Side note: collectInstructionsInBetween() seems to collect much more instructions than it actually needs. If there is a control flow split and the end instruction is on one side, it will still visit the other one, and everything that is reachable from it.
If there is a control flow split, then isControlFlowEquivalent check on line 317 will exit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80084/new/
https://reviews.llvm.org/D80084
More information about the llvm-commits
mailing list