[PATCH] D11662: Filter cold blocks off the loop chain when profile data is available.

David davidxl at google.com
Fri Jul 31 11:16:04 PDT 2015


davidxl added a comment.

Ok -- the change is made to be consistent with existing trace formation heuristic to improve locality. It outlines the cold blocks and allow them to be pushed away further so that trace can be formed from the current loop with loop exit blocks..


================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:826
@@ +825,3 @@
+    // We use the threshold 20% here to filter cold blocks.
+    const unsigned LoopToColdBBRatio = 5;
+    for (MachineBasicBlock *LoopBB : L.getBlocks()) {
----------------
Try to avoid hard-coding parameter like this.


http://reviews.llvm.org/D11662







More information about the llvm-commits mailing list