[PATCH] D63676: Early exit from Hoist() in machine licm pass based on block hotness

Lei Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 07:28:47 PDT 2019


lei added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineLICM.cpp:92
+                cl::values(clEnumValN(Disable, "disable",
+			   "disable the feature"),
+                           clEnumValN(Enable_PGO, "enable-pgo",
----------------
indentation


================
Comment at: llvm/lib/CodeGen/MachineLICM.cpp:111
+STATISTIC(NumNotHoistedDueToHotness,
+	  "Number of instructions not hoisted due to block frequency hotness");
 
----------------
nit: please follow the same indentation as the lines above.


================
Comment at: llvm/lib/CodeGen/MachineLICM.cpp:1572
+
+bool MachineLICMBase::IsHoistingFromColdToHotBlock(MachineBasicBlock *CurBB,
+    MachineBasicBlock *Preheader) {
----------------
nit: Most of the functions here use either `BB` or `MBB` for MachineBasicBlock variables.  IMHO unless there are diff BBs that are being tracked, I don't see why we need to specify this as "current"BB.  Just makes it easier to read when similar variables are being used consistently.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63676/new/

https://reviews.llvm.org/D63676





More information about the llvm-commits mailing list