[PATCH] D20505: Codegen: Outline for chains of tail-duplicable blocks.
Kyle Butt via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 15:53:54 PDT 2016
iteratee added inline comments.
================
Comment at: include/llvm/Analysis/LoopInfoImpl.h:188
@@ -187,3 +187,3 @@
addBasicBlockToLoop(BlockT *NewBB, LoopInfoBase<BlockT, LoopT> &LIB) {
- assert((Blocks.empty() || LIB[getHeader()] == this) &&
- "Incorrect LI specified for this loop!");
+#ifndef NDEBUG
+ if (!Blocks.empty()) {
----------------
I should probably split this out.
================
Comment at: lib/CodeGen/MachineBlockPlacement.cpp:1030
@@ +1029,3 @@
+ // Check for that now.
+ if (TailDupPlacement && BestSucc) {
+ DEBUG(dbgs() << "Redoing tail duplication for BestSucc#"
----------------
davidxl wrote:
> Please outline this big part into its own method.
This was pulled into D18226 and placed in its own method there.
================
Comment at: lib/CodeGen/TailDuplicator.cpp:872
@@ -853,2 +871,3 @@
// AnalyzeBranch.
- if (ForcedLayoutPred == nullptr && PrevBB->succ_size() == 1 &&
+ if (PrevBB->succ_size() == 1 &&
+ *PrevBB->succ_begin() == TailBB &&
----------------
davidxl wrote:
> Split out the clean-up changes.
I think you mean the line below. I'll split that out. The line above isn't clean up.
https://reviews.llvm.org/D20505
More information about the llvm-commits
mailing list