[PATCH] D17625: Do not select EhPad BB in MachineBlockPlacement when there is regular BB to schedule

David Li via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 22:42:10 PST 2016


davidxl added inline comments.

================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:545
@@ -543,1 +544,3 @@
 
+    // We prefer non ehpad over ehpads.
+    bool IsCandidateEHPad = MBB->isEHPad();
----------------
The new code really lowers the readability. Can you describe the algorithm here? Is it
1) if the best non eh block exists, return it; otherwise
2) return the least likely eh pad?

if that is the case, why not simply skip eh blocks in the original worklist loop. If the best bb is found return it, otherwise have another helper loop to find the least likely eh pad?


http://reviews.llvm.org/D17625





More information about the llvm-commits mailing list