[PATCH] D17555: [Feedback requested] Implement cold spliting

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 17:17:02 PST 2016

deadalnix added inline comments.

Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:895
@@ +894,3 @@
+      if (IsCold) {
+        CurSection = ColdSection;
+        ColdFragmentStart = &MBB;
In practice it works, as this ends up being more or less what you get out of the MachineBlockPlacement pass. Ideally, that's be indeed preferable that MachineBlockPlacement flag a BB after which all BB are cold or something.

Having one split is preferable, as well as having all exception unwinding related code is the same fragment. You don't want to jump back and forth between cold and hot code, and generating LSDA would become way too hairy =.

Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:977
@@ -919,1 +976,3 @@
+  if (CurSection == ColdSection) {
+    CurSection = HotSection;
I'm not sure what you mean here. Cold code is physically separated from hot, so you need symbols to express ranges in both.


More information about the llvm-commits mailing list