This patch adds option to skip control flow equivalence checks, there are passes which has code-motion in control flow equivalent blocks and due to unavailability of PDT, it doesn't allow us to use CodeMoverUtils in it. The code-motion client can pass true for skipping control flow equivalence and can also pass PDT as an argument instead of true/false if it is available.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
80 ms | windows > LLVM.Other::change-printer.ll |
Event Timeline
llvm/lib/Transforms/Utils/CodeMoverUtils.cpp | ||
---|---|---|
313 | 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. |
clang-tidy: warning: invalid case style for parameter 'skipControlFlowEquivalence' [readability-identifier-naming]
not useful