[PATCH] D110378: [CodeMoverUtils] Enhance isSafeToMoveBefore() when moving BBs

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 19:46:02 PDT 2021


Whitney 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(
----------------
Do you think this is more clear? 
`if (CheckForEntireBlock && I.getParent() == OpInst->getParent() && DT.dominates(OpInst, &I))`


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