[PATCH] D134907: [LiveRangeEdit] Add a statistic variable for rematerialization
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 14:19:43 PDT 2022
Carrot updated this revision to Diff 464031.
Carrot marked an inline comment as done.
Carrot added a comment.
Thanks for the quick review. Will check in this version.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134907/new/
https://reviews.llvm.org/D134907
Files:
llvm/lib/CodeGen/LiveRangeEdit.cpp
Index: llvm/lib/CodeGen/LiveRangeEdit.cpp
===================================================================
--- llvm/lib/CodeGen/LiveRangeEdit.cpp
+++ llvm/lib/CodeGen/LiveRangeEdit.cpp
@@ -24,9 +24,10 @@
#define DEBUG_TYPE "regalloc"
-STATISTIC(NumDCEDeleted, "Number of instructions deleted by DCE");
-STATISTIC(NumDCEFoldedLoads, "Number of single use loads folded after DCE");
-STATISTIC(NumFracRanges, "Number of live ranges fractured by DCE");
+STATISTIC(NumDCEDeleted, "Number of instructions deleted by DCE");
+STATISTIC(NumDCEFoldedLoads, "Number of single use loads folded after DCE");
+STATISTIC(NumFracRanges, "Number of live ranges fractured by DCE");
+STATISTIC(NumReMaterialization, "Number of instructions rematerialized");
void LiveRangeEdit::Delegate::anchor() { }
@@ -193,6 +194,8 @@
// is true.
(*--MI).getOperand(0).setIsDead(false);
Rematted.insert(RM.ParentVNI);
+ ++NumReMaterialization;
+
if (ReplaceIndexMI)
return LIS.ReplaceMachineInstrInMaps(*ReplaceIndexMI, *MI).getRegSlot();
return LIS.getSlotIndexes()->insertMachineInstrInMaps(*MI, Late).getRegSlot();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134907.464031.patch
Type: text/x-patch
Size: 1144 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220929/18fa9e7b/attachment.bin>
More information about the llvm-commits
mailing list