Transfer physical register spill info when load / store folding happens.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48246 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index cce36e5..3b6612d 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -35,6 +35,7 @@
using namespace llvm;
STATISTIC(NumSpills, "Number of register spills");
+STATISTIC(NumPSpills,"Number of physical register spills");
STATISTIC(NumReMats, "Number of re-materialization");
STATISTIC(NumDRM , "Number of re-materializable defs elided");
STATISTIC(NumStores, "Number of stores added");
@@ -1079,7 +1080,7 @@
TII->loadRegFromStackSlot(MBB, next(MII), PhysReg, SS, RC);
MachineInstr *LoadMI = next(MII);
VRM.addSpillSlotUse(SS, LoadMI);
- ++NumSpills;
+ ++NumPSpills;
}
}