Skip to content

Commit 9bc38df

Browse files
authored
[LoopFusion] Simplifying the legality checks (#171889)
Considering that the current loop fusion only supports adjacent loops, we are able to simplify the checks in this pass. By removing `isControlFlowEquivalent` check, this patch fixes multiple issues including #166560, #166535, #165031, #80301 and #168263. Now only the sequential/adjacent candidates are collected in the same list. This patch is the implementation of approach 2 discussed in post #171207.
1 parent 0603d4a commit 9bc38df

File tree

6 files changed

+233
-816
lines changed

6 files changed

+233
-816
lines changed

llvm/include/llvm/Transforms/Utils/CodeMoverUtils.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,6 @@ class DominatorTree;
2727
class Instruction;
2828
class PostDominatorTree;
2929

30-
/// Return true if \p I0 and \p I1 are control flow equivalent.
31-
/// Two instructions are control flow equivalent if their basic blocks are
32-
/// control flow equivalent.
33-
LLVM_ABI bool isControlFlowEquivalent(const Instruction &I0,
34-
const Instruction &I1,
35-
const DominatorTree &DT,
36-
const PostDominatorTree &PDT);
37-
38-
/// Return true if \p BB0 and \p BB1 are control flow equivalent.
39-
/// Two basic blocks are control flow equivalent if when one executes, the other
40-
/// is guaranteed to execute.
41-
LLVM_ABI bool isControlFlowEquivalent(const BasicBlock &BB0,
42-
const BasicBlock &BB1,
43-
const DominatorTree &DT,
44-
const PostDominatorTree &PDT);
45-
4630
/// Return true if \p I can be safely moved before \p InsertPoint.
4731
LLVM_ABI bool isSafeToMoveBefore(Instruction &I, Instruction &InsertPoint,
4832
DominatorTree &DT,

0 commit comments

Comments
 (0)