[PATCH] D82927: Intergerate Loop Peeling into Loop Fusion

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 12:38:58 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:806
+        // the iterators to be nullptrs, causing memory errors.
+        for (unsigned i = 0; i < WorkList.size(); i++) {
+          Instruction *CurrentBranch = WorkList[i];
----------------
bmahjour wrote:
> Please use range-based for loops whenever possible.
LLVM style uses `++i` (http://llvm.org/docs/CodingStandards.html )


================
Comment at: llvm/test/Transforms/LoopFusion/peel.ll:20
+
+; CHECK-LABEL: void @function
+; CHECK-NEXT:  for.first.preheader:
----------------
It is usually more robust if you include `(` - when you have multiple functions named `function*`, `void @function(` will still work.


================
Comment at: llvm/test/Transforms/LoopFusion/peel.ll:106
+}
+
----------------
Delete trailing empty line


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

https://reviews.llvm.org/D82927





More information about the llvm-commits mailing list