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

via flang-commits flang-commits at lists.llvm.org
Thu Jan 25 15:08:01 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);
+
+static VPBlockBase *cloneVPB(VPBlockBase *BB) {
----------------
ayalz wrote:

Well, the term `clone()` refers to "w/o-remapping-operands" when applied to recipes - as a virtual method rather than a static cloneR() function - so may seem natural if applied as such to their containing VPBB's and regions. The exception is VPlan::clone() which also takes care of remapping the operands. To better indicate when operands are remapped and when not, perhaps `unmappedClone()` and `mappedClone()` could be used instead, or `clone()` for w/o remapping, and, say, `VPlan::duplicate()` for w/ remapping (or vise versa).

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


More information about the flang-commits mailing list