[PATCH] D110378: [CodeMoverUtils] Enhance isSafeToMoveBefore() when moving BBs
Congzhe Cao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 20:19:31 PDT 2021
congzhe added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:348
+ // I, then it is okay to move since OpInst will still be available.
+ BasicBlock::iterator it(&I);
+ if (std::find_if(
----------------
Whitney wrote:
> Do you think this is more clear?
> `if (CheckForEntireBlock && I.getParent() == OpInst->getParent() && DT.dominates(OpInst, &I))`
Thanks for the suggestion! It's definitely more clear. I updated the patch accordingly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110378/new/
https://reviews.llvm.org/D110378
More information about the llvm-commits
mailing list