diff options
-rw-r--r-- | lib/Target/ARM/MLxExpansionPass.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/Target/ARM/MLxExpansionPass.cpp b/lib/Target/ARM/MLxExpansionPass.cpp index 76759c421e1..ac8baba9784 100644 --- a/lib/Target/ARM/MLxExpansionPass.cpp +++ b/lib/Target/ARM/MLxExpansionPass.cpp @@ -37,6 +37,9 @@ static cl::opt<bool> DisableMLxExpansion("disable-mlx-expansion", cl::init(false), cl::Hidden); STATISTIC(NumExpand, "Number of fp MLA / MLS instructions expanded"); +STATISTIC(VMLA_VMLA_Hazards, "Number of fp MLA / MLA hazards identified"); +STATISTIC(VMLA_VADD_Stalls, "Number of fp MLA / MADD stalls identified"); +STATISTIC(VMLA_VADD_Hazards, "Number of fp MLA / MADD hazards identified"); namespace { struct MLxExpansion : public MachineFunctionPass { @@ -230,6 +233,7 @@ bool MLxExpansion::FindMLxHazard(MachineInstr *MI) { // r3 = vadd r0, r4 // takes about 14 - 15 cycles even with vmul stalling for 4 cycles. IgnoreStall.insert(DefMI); + ++VMLA_VMLA_Hazards; return true; } @@ -256,13 +260,17 @@ bool MLxExpansion::FindMLxHazard(MachineInstr *MI) { continue; if (TII->canCauseFpMLxStall(NextMI->getOpcode())) { - if (i <= Limit1) + if (i <= Limit1) { + ++VMLA_VADD_Stalls; return true; + } } // Look for VMLx RAW hazard. - if (i <= Limit2 && hasRAWHazard(getDefReg(MI), NextMI)) + if (i <= Limit2 && hasRAWHazard(getDefReg(MI), NextMI)) { + ++VMLA_VADD_Hazards; return true; + } } return false; |