Skip to content

Commit 85175fa

Browse files
committed
fixup! [ModuloSchedule] Implement modulo variable expansion for pipelining
1 parent 9f5dc31 commit 85175fa

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

llvm/lib/CodeGen/ModuloSchedule.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,7 +2670,7 @@ void ModuloScheduleExpanderMVE::expand() {
26702670
/// Check if ModuloScheduleExpanderMVE can be applied to L
26712671
bool ModuloScheduleExpanderMVE::canApply(MachineLoop &L) {
26722672
if (!L.getExitBlock()) {
2673-
LLVM_DEBUG(dbgs() << "Can not apply MVE expander\n";);
2673+
LLVM_DEBUG(dbgs() << "Can not apply MVE expander: No single exit block\n";);
26742674
return false;
26752675
}
26762676

@@ -2687,7 +2687,8 @@ bool ModuloScheduleExpanderMVE::canApply(MachineLoop &L) {
26872687
if (MO.isReg())
26882688
for (MachineInstr &Ref : MRI.use_instructions(MO.getReg()))
26892689
if (Ref.getParent() != BB || Ref.isPHI()) {
2690-
LLVM_DEBUG(dbgs() << "Can not apply MVE expander\n";);
2690+
LLVM_DEBUG(dbgs() << "Can not apply MVE expander: A phi result is "
2691+
"referenced outside of the loop or by phi.";);
26912692
return false;
26922693
}
26932694

@@ -2698,11 +2699,14 @@ bool ModuloScheduleExpanderMVE::canApply(MachineLoop &L) {
26982699
getPhiRegs(MI, MI.getParent(), InitVal, LoopVal);
26992700
if (!Register(LoopVal).isVirtual() ||
27002701
MRI.getVRegDef(LoopVal)->getParent() != BB) {
2701-
LLVM_DEBUG(dbgs() << "Can not apply MVE expander\n";);
2702+
LLVM_DEBUG(
2703+
dbgs() << "Can not apply MVE expander: A phi source value coming "
2704+
"from the loop is not defined in the loop.\n";);
27022705
return false;
27032706
}
27042707
if (UsedByPhi.count(LoopVal)) {
2705-
LLVM_DEBUG(dbgs() << "Can not apply MVE expander\n";);
2708+
LLVM_DEBUG(dbgs() << "Can not apply MVE expander: A value defined in the "
2709+
"loop is referenced by two or more phis.\n";);
27062710
return false;
27072711
}
27082712
UsedByPhi.insert(LoopVal);

0 commit comments

Comments
 (0)