[flang-commits] [clang-tools-extra] [clang] [llvm] [libc] [flang] [lld] [lldb] [libcxx] [compiler-rt] [VPlan] Implement cloning of VPlans. (PR #73158)

via flang-commits flang-commits at lists.llvm.org
Thu Jan 25 06:42:48 PST 2024


================
@@ -614,6 +614,61 @@ void VPBasicBlock::print(raw_ostream &O, const Twine &Indent,
   printSuccessors(O, Indent);
 }
 #endif
+static void cloneCFG(VPBlockBase *Entry,
+                     DenseMap<VPBlockBase *, VPBlockBase *> &Old2NewVPBlocks);
----------------
ayalz wrote:

This cloning is recursive, so perhaps more accurately called `cloneHCFG()`.
It also clones a (maximal(*)) SESE region, so could be called `cloneSESE()`, and return a pair of VPB's - the new entry and new exit? Could `Old2NewVPBlocks` map be internal to the function, rather than an in/out parameter?

(*) There are currently two callees: the top-level of VPlan consisting of the vector-loop-preheader - loop-region - middle-block, and the internal CFG of a region from its entry/header to its exit(ing)/latch.

https://github.com/llvm/llvm-project/pull/73158


More information about the flang-commits mailing list