[PATCH] D121619: [LV] Do not create separate latch block in VPlan::execute.

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 20 16:12:56 PDT 2022


Ayal accepted this revision.
Ayal added a comment.
This revision is now accepted and ready to land.

Nice! Looks good to me.



================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:762
     // through State.CFG.LastBB.
-    BasicBlock *Exit =
-        cast<BranchInst>(State.CFG.LastBB->getTerminator())->getSuccessor(0);
+    BasicBlock *Exit = State.CFG.LastBB;
 
----------------
Rename it State.CFG.ExitBB?
Update above TODO?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.cpp:925
 
-  // 2. Generate code in loop body.
+  // 1. Generate code in loop body.
   State->CFG.PrevVPBB = nullptr;
----------------
Only "1" is left, can be removed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121619/new/

https://reviews.llvm.org/D121619



More information about the llvm-commits mailing list