diff options
author | Diana Picus <diana.picus@linaro.org> | 2016-08-01 15:13:28 +0300 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2016-08-01 15:15:51 +0300 |
commit | 5f9ef4cd38655ba26e0f4728530a5d3c2c627d25 (patch) | |
tree | e3626d3cae2c4b0ade2c0c43779e166f4fc4baeb | |
parent | 3e1e8aa74c2e10909c0284ab67da2b3c7b1b1d7d (diff) |
Gather statistics from MLx expansion passlinaro-local/ExpandMLx
-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; |