[PATCH] D10825: Improvement on computing edge probabilities when choosing the best successor in machine block placement.
David
davidxl at google.com
Thu Jul 23 16:26:50 PDT 2015
davidxl added inline comments.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:373
@@ +372,3 @@
+ bool SkipSucc = false;
+ if (BlockFilter && !BlockFilter->count(Succ)) {
+ SkipSucc = true;
----------------
This is the case where Succ is in the outer loop of the current loop being laid out. In such a case, Succ can still be a viable layout successor of BB if BB ends up being the end of the current chain. This is tricky to handle as loop rotation may also change that -- so it seems to good to add this skipping condition, but I'd like to see test cases that can validate it.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:381
@@ +380,3 @@
+ SkipSucc = true;
+ } else if (Succ != *SuccChain->begin()) {
+ DEBUG(dbgs() << " " << getBlockName(Succ) << " -> Mid chain!\n");
----------------
This is a good one to add.
http://reviews.llvm.org/D10825
More information about the llvm-commits
mailing list