[PATCH] D15922: [Cloning] rename cloneLoopWithPreheader() and add assert to ensure no sub-loops
Ashutosh Nema via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 17 22:50:39 PDT 2016
ashutosh.nema added a comment.
I see lot of indentation problems here, please correct them.
Try using clang-format its useful.
================
Comment at: lib/Transforms/Scalar/LoopDistribute.cpp:125
@@ -124,3 +124,3 @@
/// LoopDomBB dominates the loop.
- Loop *cloneLoopWithPreheader(BasicBlock *InsertBefore, BasicBlock *LoopDomBB,
+ Loop *cloneInnerLoopWithPreheader(BasicBlock *InsertBefore, BasicBlock *LoopDomBB,
unsigned Index, LoopInfo *LI,
----------------
Correct indentation
================
Comment at: lib/Transforms/Scalar/LoopDistribute.cpp:128
@@ -127,3 +127,3 @@
DominatorTree *DT) {
- ClonedLoop = ::cloneLoopWithPreheader(InsertBefore, LoopDomBB, OrigLoop,
+ ClonedLoop = ::cloneInnerLoopWithPreheader(InsertBefore, LoopDomBB, OrigLoop,
VMap, Twine(".ldist") + Twine(Index),
----------------
Correct indentation
================
Comment at: lib/Transforms/Utils/CloneFunction.cpp:706
@@ -706,1 +705,3 @@
+/// \p OrigLoop should not have sub-loops.
+Loop *llvm::cloneInnerLoopWithPreheader(BasicBlock *Before, BasicBlock *LoopDomBB,
Loop *OrigLoop, ValueToValueMapTy &VMap,
----------------
Correct indentation.
================
Comment at: lib/Transforms/Utils/CloneFunction.cpp:711
@@ -709,2 +710,3 @@
SmallVectorImpl<BasicBlock *> &Blocks) {
+ assert(OrigLoop->getSubLoops().empty() && "Loop to be cloned cannot have inner loop");
Function *F = OrigLoop->getHeader()->getParent();
----------------
Correct indentation.
================
Comment at: lib/Transforms/Utils/LoopVersioning.cpp:106
@@ -106,2 +105,3 @@
+ cloneInnerLoopWithPreheader(PH, RuntimeCheckBB, VersionedLoop, VMap,
".lver.orig", LI, DT, NonVersionedLoopBlocks);
remapInstructionsInBlocks(NonVersionedLoopBlocks, VMap);
----------------
Correct indentation.
http://reviews.llvm.org/D15922
More information about the llvm-commits
mailing list