[PATCH] D87094: [CodeMoverUtils]Add option to skip control flow equivalence checks when sure
Bardia Mahjour via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 09:20:56 PDT 2020
bmahjour requested changes to this revision.
bmahjour added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:313
+ // TODO remove this limitation.
+ if (!isControlFlowEquivalent(I, InsertPoint, DT, *PDT))
+ return reportInvalidCandidate(I, NotControlFlowEquivalent);
----------------
PDT could be nullptr and *PDT could cause a segfault.
We don't need yet another version of `isSafeToMoveBefore`. Can you add `bool skipControlFlowEquivalence` to the existing `isSafeToMoveBefore` functions? If the boolean flag is on, then PDT is used, otherwise PDT will be unused. If a nullptr PDT is provided and the flag is on, then it returns unsafe to move.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87094/new/
https://reviews.llvm.org/D87094
More information about the llvm-commits
mailing list